chore: bump ext-apps to 1.5.0 (#588)
* chore: bump ext-apps to 1.5.0 * style: auto-fix prettier formatting --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
parent
61fe39b4db
commit
621a70a724
3 changed files with 58 additions and 56 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@modelcontextprotocol/server-pdf",
|
||||
"version": "1.4.0",
|
||||
"version": "1.5.0",
|
||||
"type": "module",
|
||||
"description": "MCP server for loading and extracting text from PDF files with chunked pagination and interactive viewer",
|
||||
"repository": {
|
||||
|
|
|
|||
|
|
@ -864,7 +864,10 @@ describe("buildAnnotatedPdfBytes", () => {
|
|||
|
||||
// Now remove the first one by ref.
|
||||
const stripped = await buildAnnotatedPdfBytes(seeded, [], new Map(), [
|
||||
{ objectNumber: ref0.objectNumber, generationNumber: ref0.generationNumber },
|
||||
{
|
||||
objectNumber: ref0.objectNumber,
|
||||
generationNumber: ref0.generationNumber,
|
||||
},
|
||||
]);
|
||||
const strippedDoc = await PDFDocument.load(stripped);
|
||||
const remaining = strippedDoc.getPage(0).node.Annots();
|
||||
|
|
|
|||
|
|
@ -1123,8 +1123,7 @@ export function importPdfjsAnnotation(
|
|||
// a placement-only record that the renderer fills with the rasterized
|
||||
// appearance from pdf.js's annotationCanvasMap. This keeps Ink, Polygon,
|
||||
// image-signature stamps, etc. visible AND selectable in our layer.
|
||||
const importAsBitmap =
|
||||
!ourType || (ourType === "stamp" && ann.hasAppearance);
|
||||
const importAsBitmap = !ourType || (ourType === "stamp" && ann.hasAppearance);
|
||||
if (importAsBitmap) {
|
||||
if (!ann.rect) return null;
|
||||
const r = pdfjsRectToRect(ann.rect);
|
||||
|
|
|
|||
Loading…
Reference in a new issue