@embedpdf/engine-core 3.0.0-next.15 → 3.0.0-next.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/dist/{AnnotationList-CkijRHet.d.cts → AnnotationList-DcyhF2kU.d.cts} +1836 -1308
  2. package/dist/{AnnotationList-CkijRHet.d.ts → AnnotationList-DcyhF2kU.d.ts} +1836 -1308
  3. package/dist/{Change-CjImsrN0.cjs → Change-Ct-dB8D5.cjs} +115 -2
  4. package/dist/Change-Ct-dB8D5.cjs.map +1 -0
  5. package/dist/{Change-CKoxfTNY.js → Change-tMR34hTU.js} +92 -3
  6. package/dist/Change-tMR34hTU.js.map +1 -0
  7. package/dist/{DocumentRenderService-BfFdFSwI.cjs → DocumentRenderService-9IjSQEIU.cjs} +2 -1
  8. package/dist/{DocumentRenderService-BfFdFSwI.cjs.map → DocumentRenderService-9IjSQEIU.cjs.map} +1 -1
  9. package/dist/{DocumentRenderService-DV3J9lMz.js → DocumentRenderService-DFrZ9wfW.js} +2 -1
  10. package/dist/{DocumentRenderService-DV3J9lMz.js.map → DocumentRenderService-DFrZ9wfW.js.map} +1 -1
  11. package/dist/{DocumentSecurityService-e6vp2de8.d.cts → DocumentSecurityService-D2zA4NKi.d.cts} +2 -2
  12. package/dist/{DocumentSecurityService-CU1M6Q7m.d.ts → DocumentSecurityService-YJV9df8P.d.ts} +2 -2
  13. package/dist/{LocalEngine-DFoBm4B3.d.cts → LocalEngine-DBt2-GWF.d.ts} +102 -18
  14. package/dist/{LocalEngine-DPriFujS.d.ts → LocalEngine-IA9zh3Jh.d.cts} +102 -18
  15. package/dist/{authority-DLMNR7ff.cjs → authority-BFp6XM04.cjs} +373 -52
  16. package/dist/authority-BFp6XM04.cjs.map +1 -0
  17. package/dist/{authority-B3BklsB4.js → authority-PuxpGFhJ.js} +320 -53
  18. package/dist/authority-PuxpGFhJ.js.map +1 -0
  19. package/dist/{builders-CNj0POeY.js → builders-DV62HA3I.js} +6 -2
  20. package/dist/builders-DV62HA3I.js.map +1 -0
  21. package/dist/{builders-Cgdp_YCn.cjs → builders-DgTAj_tP.cjs} +6 -2
  22. package/dist/builders-DgTAj_tP.cjs.map +1 -0
  23. package/dist/{calibrate-DJBXnhLE.cjs → calibrate-DJbi1wuK.cjs} +118 -25
  24. package/dist/calibrate-DJbi1wuK.cjs.map +1 -0
  25. package/dist/{calibrate-7T3fnP8-.js → calibrate-nQFgCuki.js} +83 -26
  26. package/dist/calibrate-nQFgCuki.js.map +1 -0
  27. package/dist/charmap-Cprti1ta.js.map +1 -1
  28. package/dist/charmap-aYlefQP9.cjs.map +1 -1
  29. package/dist/conformance.cjs +1744 -75
  30. package/dist/conformance.cjs.map +1 -1
  31. package/dist/conformance.d.cts +105 -10
  32. package/dist/conformance.d.ts +105 -10
  33. package/dist/conformance.js +1738 -76
  34. package/dist/conformance.js.map +1 -1
  35. package/dist/index.cjs +25 -6
  36. package/dist/index.d.cts +2 -2
  37. package/dist/index.d.ts +2 -2
  38. package/dist/index.js +7 -7
  39. package/dist/public.cjs +6 -4
  40. package/dist/public.d.cts +5 -5
  41. package/dist/public.d.ts +5 -5
  42. package/dist/public.js +5 -5
  43. package/dist/{resolver-CzxmD9Ck.js → resolver-BBggAxQc.js} +6 -3
  44. package/dist/resolver-BBggAxQc.js.map +1 -0
  45. package/dist/{resolver-D2OCtE8F.cjs → resolver-BWSWSF6R.cjs} +6 -3
  46. package/dist/resolver-BWSWSF6R.cjs.map +1 -0
  47. package/dist/{runtime-Cl0v56mm.d.ts → runtime-BaDKjxiu.d.ts} +67 -140
  48. package/dist/{runtime-p1WDzDo4.d.cts → runtime-CWEuiwbk.d.cts} +67 -140
  49. package/dist/runtime.cjs +267 -7
  50. package/dist/runtime.cjs.map +1 -1
  51. package/dist/runtime.d.cts +5 -5
  52. package/dist/runtime.d.ts +5 -5
  53. package/dist/runtime.js +246 -8
  54. package/dist/runtime.js.map +1 -1
  55. package/dist/{schema-DzlUNk38.js → schema-6S2VmlAj.js} +8 -2
  56. package/dist/schema-6S2VmlAj.js.map +1 -0
  57. package/dist/{schema-C-gU4vj7.cjs → schema-miH6tWQC.cjs} +13 -1
  58. package/dist/schema-miH6tWQC.cjs.map +1 -0
  59. package/dist/{schemas-D6xOGjqg.js → schemas-BE2QGOit.js} +256 -59
  60. package/dist/schemas-BE2QGOit.js.map +1 -0
  61. package/dist/{schemas-Berf1swF.cjs → schemas-DljJR9ut.cjs} +397 -80
  62. package/dist/schemas-DljJR9ut.cjs.map +1 -0
  63. package/dist/validation.cjs +1 -1
  64. package/dist/validation.d.cts +1 -1
  65. package/dist/validation.d.ts +1 -1
  66. package/dist/validation.js +1 -1
  67. package/dist/{viewport-DlL5Bxbg.cjs → viewport-CHG9qQUb.cjs} +2 -2
  68. package/dist/{viewport-DlL5Bxbg.cjs.map → viewport-CHG9qQUb.cjs.map} +1 -1
  69. package/dist/{viewport-BJW13EGZ.js → viewport-DQR5LyX3.js} +2 -2
  70. package/dist/{viewport-BJW13EGZ.js.map → viewport-DQR5LyX3.js.map} +1 -1
  71. package/dist/wire.cjs +225 -57
  72. package/dist/wire.cjs.map +1 -1
  73. package/dist/wire.d.cts +3548 -1151
  74. package/dist/wire.d.ts +3548 -1151
  75. package/dist/wire.js +198 -53
  76. package/dist/wire.js.map +1 -1
  77. package/package.json +1 -1
  78. package/dist/Change-CKoxfTNY.js.map +0 -1
  79. package/dist/Change-CjImsrN0.cjs.map +0 -1
  80. package/dist/authority-B3BklsB4.js.map +0 -1
  81. package/dist/authority-DLMNR7ff.cjs.map +0 -1
  82. package/dist/builders-CNj0POeY.js.map +0 -1
  83. package/dist/builders-Cgdp_YCn.cjs.map +0 -1
  84. package/dist/calibrate-7T3fnP8-.js.map +0 -1
  85. package/dist/calibrate-DJBXnhLE.cjs.map +0 -1
  86. package/dist/resolver-CzxmD9Ck.js.map +0 -1
  87. package/dist/resolver-D2OCtE8F.cjs.map +0 -1
  88. package/dist/schema-C-gU4vj7.cjs.map +0 -1
  89. package/dist/schema-DzlUNk38.js.map +0 -1
  90. package/dist/schemas-Berf1swF.cjs.map +0 -1
  91. package/dist/schemas-D6xOGjqg.js.map +0 -1
@@ -1,5 +1,5 @@
1
- import { E_ as Identity, Ep as CharMapAnchor, Jg as PdfRect, Nd as AnnotationResources, Ng as PageBox, Pg as PagePoint, Wm as PageTabOrder, Yg as PdfRotation, _t as LineDraft, _v as DocumentMetadata, bs as AnnotationDraft, dn as HighlightDraft, nt as InkDraft, t as AnnotationList } from "./AnnotationList-CkijRHet.cjs";
2
- import { _ as Engine, t as LocalEngine, y as DocumentHandle } from "./LocalEngine-DFoBm4B3.cjs";
1
+ import { F_ as PdfRect, Fs as AnnotationDraft, I_ as PdfRotation, Vd as AnnotationResources, _t as LineDraft, b_ as PageBox, dn as HighlightDraft, gh as PageTabOrder, iy as DocumentMetadata, nt as InkDraft, pv as Identity, t as AnnotationList, x_ as PagePoint, zp as CharMapAnchor } from "./AnnotationList-DcyhF2kU.cjs";
2
+ import { _ as Engine, t as LocalEngine, y as DocumentHandle } from "./LocalEngine-IA9zh3Jh.cjs";
3
3
  //#region src/conformance/runMetadataConformance.d.ts
4
4
  interface ConformanceTestRunner {
5
5
  describe(name: string, fn: () => void): void;
@@ -564,6 +564,59 @@ interface PageRenderConformanceOptions {
564
564
  */
565
565
  declare function runPageRenderConformance(runner: ConformanceTestRunner, opts: PageRenderConformanceOptions): void;
566
566
  //#endregion
567
+ //#region src/conformance/runPrintRenderConformance.d.ts
568
+ /**
569
+ * A 200 × 200 page with one black 40 × 40 square for each print rule, and an
570
+ * A0 page (2384 × 3370) with nothing on it:
571
+ *
572
+ * - a layer that only prints, and one only shown on screen (`/Usage`
573
+ * `/PrintState` and `/ViewState`, as Acrobat's watermarks write them);
574
+ * - four squares: one that only prints (`noView` + `print`), one only on
575
+ * screen (no `print`), one on both (`print`), one on neither (`hidden`);
576
+ * - two form fields: a push button only on screen (Acrobat's "Visible but
577
+ * doesn't print") and a text field that only prints ("Hidden but
578
+ * printable").
579
+ */
580
+ declare const PRINT_RULES_PDF: Uint8Array<ArrayBufferLike>;
581
+ /** The rights each case opens with: everything, no print, print but not high. */
582
+ declare const PRINT_SCOPES: {
583
+ readonly everything: readonly ["*"];
584
+ readonly screen: readonly ["doc.open", "doc.render", "doc.annotate.read", "doc.forms.read"];
585
+ readonly print: readonly ["doc.open", "doc.render", "doc.annotate.read", "doc.forms.read", "doc.print"];
586
+ };
587
+ interface PrintRenderConformanceOptions {
588
+ label: string;
589
+ /** Build a fresh engine for this suite. The suite tears it down at the end. */
590
+ makeEngine: () => Promise<Engine> | Engine;
591
+ /** Open a fresh copy of {@link PRINT_RULES_PDF} with `scope`. */
592
+ open: (engine: Engine, scope: readonly string[]) => Promise<DocumentHandle>;
593
+ }
594
+ /**
595
+ * Print pictures on both engines (`usage: 'print'` with a `dpi` viewport).
596
+ * A print picture follows
597
+ * the print rules where a screen picture follows the screen's: layers by
598
+ * their print state, annotations and form fields by their `print` flag,
599
+ * `noView` ones included, `hidden` ones never. It is the whole page at its
600
+ * DPI, never more pixels than the page fitted to A4 or Letter needs, and its
601
+ * transform is `pageTransform`'s. It needs `doc.print`, and 300 DPI
602
+ * `doc.print.high`; options that don't fit a print picture are refused.
603
+ */
604
+ declare function runPrintRenderConformance(runner: ConformanceTestRunner, opts: PrintRenderConformanceOptions): void;
605
+ /**
606
+ * The print copy on both engines: `pages.extract(pages, { flatten })` makes
607
+ * the pages as they draw for `flatten.usage`, so a print copy, printed, shows
608
+ * what a print picture of the page shows (layers by their print state,
609
+ * annotations and fields by their `print` flag), with nothing interactive
610
+ * left. `includeAnnotations` and `includeFormFields` choose what it paints,
611
+ * with a page picture's defaults; they take `flatten`. A flattened copy needs
612
+ * `doc.download` or `doc.download.flattened`, a plain one `doc.download`.
613
+ */
614
+ interface PrintCopyConformanceOptions extends PrintRenderConformanceOptions {
615
+ /** Open `bytes`, a copy the engine made, with every right. */
616
+ openCopy: (engine: Engine, bytes: Uint8Array) => Promise<DocumentHandle>;
617
+ }
618
+ declare function runPrintCopyConformance(runner: ConformanceTestRunner, opts: PrintCopyConformanceOptions): void;
619
+ //#endregion
567
620
  //#region src/conformance/pageSpaceFixtures.d.ts
568
621
  /**
569
622
  * Small PDFs whose page boxes are odd in every way ISO 32000 allows, and in
@@ -859,17 +912,17 @@ declare function runPageExtractConformance(runner: ConformanceTestRunner, opts:
859
912
  * Attachment conformance suite. Fixture requirement: a document whose
860
913
  * `/EmbeddedFiles` name tree contains at least one embedded file.
861
914
  *
862
- * Both attachment surfaces are optional on the contract (the
863
- * `downloadLayer?` pattern), probed independently and skipped cleanly:
864
- * - `doc.attachments?` — document-level EmbeddedFiles (list/download)
865
- * - `page.annotations.downloadResource(ref, 'file')` — annotation-level file bytes
915
+ * Both homes of a file: `doc.attachments` (the `/EmbeddedFiles` name tree)
916
+ * and a file-attachment annotation's `file` resource
917
+ * (`page.annotations.downloadResource(ref, 'file')`). Both downloads answer
918
+ * the bytes; the name and type are what the listing says.
866
919
  *
867
920
  * Invariants:
868
921
  * 1. `list()` reflects the name tree: positional indices, non-empty
869
922
  * names, and repeated calls agree (a read).
870
- * 2. `download(index)` round-trips the listed metadata and returns
871
- * exactly `size` decoded bytes when the fixture declares one.
872
- * 3. Unknown indices reject with an `EngineError`.
923
+ * 2. `download(ref)` returns exactly `size` decoded bytes when the
924
+ * fixture declares one.
925
+ * 3. Unknown keys reject with an `EngineError`.
873
926
  * 4. A created file-attachment annotation round-trips its file:
874
927
  * metadata inline on the DTO (never bytes), bytes byte-identical
875
928
  * as its `file` resource.
@@ -968,6 +1021,48 @@ declare function runChangeConformance(runner: ConformanceTestRunner, opts: Chang
968
1021
  /** A PDF file of `objects`, numbered from 1, with its cross-reference table. */
969
1022
  declare function pdfOf(objects: readonly string[]): Uint8Array;
970
1023
  //#endregion
1024
+ //#region src/conformance/runOutlineConformance.d.ts
1025
+ /**
1026
+ * Two pages of 300 × 300 and an outline, five items showing when it opens:
1027
+ *
1028
+ * - A (6), open: to page 3 at (20, 280) in the file; its child A1 (10) fits page 4.
1029
+ * - B (7): red and bold, a URI action.
1030
+ * - C (8), closed: the named destination `chapter-two` (page 4, `/FitH` 250);
1031
+ * its child C1 (11) goes nowhere.
1032
+ * - D (9): a JavaScript action.
1033
+ */
1034
+ declare const OUTLINE_FIXTURE_PDF: Uint8Array<ArrayBufferLike>;
1035
+ /**
1036
+ * An outline a write never made: One (4) and Two (5), whose `/Next` comes
1037
+ * back to One, and after One a direct item no one can name.
1038
+ */
1039
+ declare const BROKEN_OUTLINE_FIXTURE_PDF: Uint8Array<ArrayBufferLike>;
1040
+ interface OutlineConformanceOptions {
1041
+ label: string;
1042
+ makeEngine: () => Promise<Engine> | Engine;
1043
+ /** Open `bytes`, one of the fixtures here, fresh for each call, with write access. */
1044
+ open: (engine: Engine, bytes: Uint8Array) => Promise<DocumentHandle>;
1045
+ /** Open `bytes` with the rights to open and read it only (`doc.open`, `doc.render`). */
1046
+ openReadOnly: (engine: Engine, bytes: Uint8Array) => Promise<DocumentHandle>;
1047
+ }
1048
+ /**
1049
+ * The document's outline (`doc.outline`), the same on every engine:
1050
+ *
1051
+ * - A read lists every item depth first, with its parent, its target read the
1052
+ * way a link's is (in page space, a named destination resolved), its `/A`
1053
+ * tree, its colour and style, and whether it opens.
1054
+ * - Writes name items by object number and places by neighbour; moves keep
1055
+ * subtrees and numbers; deletes take the items under an item with it, and
1056
+ * an undo brings the same items back.
1057
+ * - Each write publishes its `outline.*` event; without `doc.outline.modify`
1058
+ * every write is refused and reading still works.
1059
+ * - A target reads the same however the file stores it: written into the
1060
+ * item or shared, named in the `/Names` tree or the old `/Dests`, a page
1061
+ * by index. A new target or an undo never changes an action an item shares.
1062
+ * - A broken outline reads what it can and says `incomplete`.
1063
+ */
1064
+ declare function runOutlineConformance(runner: ConformanceTestRunner, opts: OutlineConformanceOptions): void;
1065
+ //#endregion
971
1066
  //#region src/conformance/runPermissionConformance.d.ts
972
1067
  /**
973
1068
  * The two read families, through three tokens: one that may do everything,
@@ -1527,5 +1622,5 @@ interface FieldGroupsConformanceOptions {
1527
1622
  }
1528
1623
  declare function runFieldGroupsConformance(runner: ConformanceTestRunner, opts: FieldGroupsConformanceOptions): void;
1529
1624
  //#endregion
1530
- export { APPEARANCE_STATES_FIXTURE_PDF, type ActionsConformanceFixtures, type ActionsConformanceOptions, type AnnotationAppearanceConformanceFixture, type AnnotationAppearanceConformanceOptions, type AnnotationAttributionConformanceOptions, type AnnotationConformanceOptions, type AnnotationDeclarationConformanceOptions, type AnnotationDeclarationFixture, type AnnotationMutationConformanceFixture, type AnnotationMutationConformanceOptions, type AnnotationPredictionConformanceOptions, type AnnotationReadConformanceFixture, type AnnotationResourceConformanceOptions, type AnnotationResourceFixture, type AnnotationRotationConformanceOptions, type AnnotationRotationFixture, type AnnotationTransferConformanceOptions, type AppearanceStatesConformanceOptions, type AttributionSession, BARE_PAGE_FIXTURE_PDF, CHANGE_FIXTURE_PDF, COLOR_FIXTURE_PDF, CROP_OFFSET_PDF, type ChangeConformanceOptions, type ColorConformanceOptions, type ConformanceExpect, type ConformanceFixture, type ConformanceOptions, type ConformanceTestRunner, type Creatable, DRAWING_FIXTURE_PDF, type DateConformanceOptions, type DrawingDetailsConformanceOptions, type DrawingDetailsFixture, FIELD_GROUPS_PDF, FIELD_GROUP_TOKENS, type FieldGroupToken, type FieldGroupsConformanceOptions, type FormAttributionConformanceOptions, type FormConformanceFixtures, type FormConformanceOptions, type FormPredictionConformanceOptions, type FormScriptConformanceOptions, type FormTransferConformanceOptions, OBJECT_NUMBER_FIXTURE_PDF, type ObjectNumberConformanceOptions, PAGE_SPACE_FIXTURES, PERMISSION_TOKENS, PREDICTION_FIXTURE_PDF, type PageGeometryOrientationFixture, type PageGeometryOrientationOptions, type PageRenderConformanceOptions, type PageReorderConformanceFixture, type PageReorderConformanceOptions, type PageSpaceConformanceOptions, type PageSpaceFixture, type PageSpaceFixturePage, type PageTextConformanceFixture, type PageTextConformanceOptions, type PermissionConformanceOptions, type PermissionToken, type PieceInfoConformanceOptions, type RedactionApplyConformanceOptions, type SearchConformanceFixture, type SearchConformanceOptions, type SignatureConformanceFixtures, type SignatureConformanceOptions, TEXT_DIVERGENCE_CASES, TURNED_FIELDS_PDF, TWO_PAGES_PDF, type TextDivergenceCase, type TextDivergenceConformanceFixture, type TextDivergenceConformanceOptions, WIDGET_FINDING_CASES, type WidgetFindingCase, type WidgetFindingCaseName, type WidgetFindingConformanceOptions, type WidgetRotationConformanceOptions, annotationReadDriftOf, creatables, diffAnnotationList, iconRect, pdfOf, runActionsConformance, runAnnotationAppearanceConformance, runAnnotationAppearanceExportConformance, runAnnotationAttributionConformance, runAnnotationDeclarationConformance, runAnnotationExportConformance, runAnnotationFlattenConformance, runAnnotationImportConformance, runAnnotationMutationConformance, runAnnotationPredictionConformance, runAnnotationReadConformance, runAnnotationResourceConformance, runAnnotationRotationConformance, runAnnotationTransferConformance, runAppearanceStatesConformance, runAttachmentConformance, runChangeConformance, runColorConformance, runDateConformance, runDocumentEventsConformance, runDrawingDetailsConformance, runFieldGroupsConformance, runFormAttributionConformance, runFormConformance, runFormPredictionConformance, runFormScriptConformance, runFormTransferConformance, runMeasurementConformance, runMetadataConformance, runNamedPagesConformance, runObjectNumberConformance, runPageDeleteConformance, runPageExtractConformance, runPageFlattenConformance, runPageGeometryOrientationConformance, runPageInsertBlankConformance, runPageInsertConformance, runPageRenderConformance, runPageReorderConformance, runPageRotateConformance, runPageSpaceConformance, runPageTextConformance, runPermissionConformance, runPieceInfoConformance, runRedactionApplyConformance, runSearchConformance, runSignatureConformance, runTextDivergenceConformance, runWidgetFindingConformance, runWidgetRotationConformance };
1625
+ export { APPEARANCE_STATES_FIXTURE_PDF, type ActionsConformanceFixtures, type ActionsConformanceOptions, type AnnotationAppearanceConformanceFixture, type AnnotationAppearanceConformanceOptions, type AnnotationAttributionConformanceOptions, type AnnotationConformanceOptions, type AnnotationDeclarationConformanceOptions, type AnnotationDeclarationFixture, type AnnotationMutationConformanceFixture, type AnnotationMutationConformanceOptions, type AnnotationPredictionConformanceOptions, type AnnotationReadConformanceFixture, type AnnotationResourceConformanceOptions, type AnnotationResourceFixture, type AnnotationRotationConformanceOptions, type AnnotationRotationFixture, type AnnotationTransferConformanceOptions, type AppearanceStatesConformanceOptions, type AttributionSession, BARE_PAGE_FIXTURE_PDF, BROKEN_OUTLINE_FIXTURE_PDF, CHANGE_FIXTURE_PDF, COLOR_FIXTURE_PDF, CROP_OFFSET_PDF, type ChangeConformanceOptions, type ColorConformanceOptions, type ConformanceExpect, type ConformanceFixture, type ConformanceOptions, type ConformanceTestRunner, type Creatable, DRAWING_FIXTURE_PDF, type DateConformanceOptions, type DrawingDetailsConformanceOptions, type DrawingDetailsFixture, FIELD_GROUPS_PDF, FIELD_GROUP_TOKENS, type FieldGroupToken, type FieldGroupsConformanceOptions, type FormAttributionConformanceOptions, type FormConformanceFixtures, type FormConformanceOptions, type FormPredictionConformanceOptions, type FormScriptConformanceOptions, type FormTransferConformanceOptions, OBJECT_NUMBER_FIXTURE_PDF, OUTLINE_FIXTURE_PDF, type ObjectNumberConformanceOptions, type OutlineConformanceOptions, PAGE_SPACE_FIXTURES, PERMISSION_TOKENS, PREDICTION_FIXTURE_PDF, PRINT_RULES_PDF, PRINT_SCOPES, type PageGeometryOrientationFixture, type PageGeometryOrientationOptions, type PageRenderConformanceOptions, type PageReorderConformanceFixture, type PageReorderConformanceOptions, type PageSpaceConformanceOptions, type PageSpaceFixture, type PageSpaceFixturePage, type PageTextConformanceFixture, type PageTextConformanceOptions, type PermissionConformanceOptions, type PermissionToken, type PieceInfoConformanceOptions, type PrintCopyConformanceOptions, type PrintRenderConformanceOptions, type RedactionApplyConformanceOptions, type SearchConformanceFixture, type SearchConformanceOptions, type SignatureConformanceFixtures, type SignatureConformanceOptions, TEXT_DIVERGENCE_CASES, TURNED_FIELDS_PDF, TWO_PAGES_PDF, type TextDivergenceCase, type TextDivergenceConformanceFixture, type TextDivergenceConformanceOptions, WIDGET_FINDING_CASES, type WidgetFindingCase, type WidgetFindingCaseName, type WidgetFindingConformanceOptions, type WidgetRotationConformanceOptions, annotationReadDriftOf, creatables, diffAnnotationList, iconRect, pdfOf, runActionsConformance, runAnnotationAppearanceConformance, runAnnotationAppearanceExportConformance, runAnnotationAttributionConformance, runAnnotationDeclarationConformance, runAnnotationExportConformance, runAnnotationFlattenConformance, runAnnotationImportConformance, runAnnotationMutationConformance, runAnnotationPredictionConformance, runAnnotationReadConformance, runAnnotationResourceConformance, runAnnotationRotationConformance, runAnnotationTransferConformance, runAppearanceStatesConformance, runAttachmentConformance, runChangeConformance, runColorConformance, runDateConformance, runDocumentEventsConformance, runDrawingDetailsConformance, runFieldGroupsConformance, runFormAttributionConformance, runFormConformance, runFormPredictionConformance, runFormScriptConformance, runFormTransferConformance, runMeasurementConformance, runMetadataConformance, runNamedPagesConformance, runObjectNumberConformance, runOutlineConformance, runPageDeleteConformance, runPageExtractConformance, runPageFlattenConformance, runPageGeometryOrientationConformance, runPageInsertBlankConformance, runPageInsertConformance, runPageRenderConformance, runPageReorderConformance, runPageRotateConformance, runPageSpaceConformance, runPageTextConformance, runPermissionConformance, runPieceInfoConformance, runPrintCopyConformance, runPrintRenderConformance, runRedactionApplyConformance, runSearchConformance, runSignatureConformance, runTextDivergenceConformance, runWidgetFindingConformance, runWidgetRotationConformance };
1531
1626
  //# sourceMappingURL=conformance.d.cts.map
@@ -1,5 +1,5 @@
1
- import { E_ as Identity, Ep as CharMapAnchor, Jg as PdfRect, Nd as AnnotationResources, Ng as PageBox, Pg as PagePoint, Wm as PageTabOrder, Yg as PdfRotation, _t as LineDraft, _v as DocumentMetadata, bs as AnnotationDraft, dn as HighlightDraft, nt as InkDraft, t as AnnotationList } from "./AnnotationList-CkijRHet.js";
2
- import { _ as Engine, t as LocalEngine, y as DocumentHandle } from "./LocalEngine-DPriFujS.js";
1
+ import { F_ as PdfRect, Fs as AnnotationDraft, I_ as PdfRotation, Vd as AnnotationResources, _t as LineDraft, b_ as PageBox, dn as HighlightDraft, gh as PageTabOrder, iy as DocumentMetadata, nt as InkDraft, pv as Identity, t as AnnotationList, x_ as PagePoint, zp as CharMapAnchor } from "./AnnotationList-DcyhF2kU.js";
2
+ import { _ as Engine, t as LocalEngine, y as DocumentHandle } from "./LocalEngine-DBt2-GWF.js";
3
3
  //#region src/conformance/runMetadataConformance.d.ts
4
4
  interface ConformanceTestRunner {
5
5
  describe(name: string, fn: () => void): void;
@@ -564,6 +564,59 @@ interface PageRenderConformanceOptions {
564
564
  */
565
565
  declare function runPageRenderConformance(runner: ConformanceTestRunner, opts: PageRenderConformanceOptions): void;
566
566
  //#endregion
567
+ //#region src/conformance/runPrintRenderConformance.d.ts
568
+ /**
569
+ * A 200 × 200 page with one black 40 × 40 square for each print rule, and an
570
+ * A0 page (2384 × 3370) with nothing on it:
571
+ *
572
+ * - a layer that only prints, and one only shown on screen (`/Usage`
573
+ * `/PrintState` and `/ViewState`, as Acrobat's watermarks write them);
574
+ * - four squares: one that only prints (`noView` + `print`), one only on
575
+ * screen (no `print`), one on both (`print`), one on neither (`hidden`);
576
+ * - two form fields: a push button only on screen (Acrobat's "Visible but
577
+ * doesn't print") and a text field that only prints ("Hidden but
578
+ * printable").
579
+ */
580
+ declare const PRINT_RULES_PDF: Uint8Array<ArrayBufferLike>;
581
+ /** The rights each case opens with: everything, no print, print but not high. */
582
+ declare const PRINT_SCOPES: {
583
+ readonly everything: readonly ["*"];
584
+ readonly screen: readonly ["doc.open", "doc.render", "doc.annotate.read", "doc.forms.read"];
585
+ readonly print: readonly ["doc.open", "doc.render", "doc.annotate.read", "doc.forms.read", "doc.print"];
586
+ };
587
+ interface PrintRenderConformanceOptions {
588
+ label: string;
589
+ /** Build a fresh engine for this suite. The suite tears it down at the end. */
590
+ makeEngine: () => Promise<Engine> | Engine;
591
+ /** Open a fresh copy of {@link PRINT_RULES_PDF} with `scope`. */
592
+ open: (engine: Engine, scope: readonly string[]) => Promise<DocumentHandle>;
593
+ }
594
+ /**
595
+ * Print pictures on both engines (`usage: 'print'` with a `dpi` viewport).
596
+ * A print picture follows
597
+ * the print rules where a screen picture follows the screen's: layers by
598
+ * their print state, annotations and form fields by their `print` flag,
599
+ * `noView` ones included, `hidden` ones never. It is the whole page at its
600
+ * DPI, never more pixels than the page fitted to A4 or Letter needs, and its
601
+ * transform is `pageTransform`'s. It needs `doc.print`, and 300 DPI
602
+ * `doc.print.high`; options that don't fit a print picture are refused.
603
+ */
604
+ declare function runPrintRenderConformance(runner: ConformanceTestRunner, opts: PrintRenderConformanceOptions): void;
605
+ /**
606
+ * The print copy on both engines: `pages.extract(pages, { flatten })` makes
607
+ * the pages as they draw for `flatten.usage`, so a print copy, printed, shows
608
+ * what a print picture of the page shows (layers by their print state,
609
+ * annotations and fields by their `print` flag), with nothing interactive
610
+ * left. `includeAnnotations` and `includeFormFields` choose what it paints,
611
+ * with a page picture's defaults; they take `flatten`. A flattened copy needs
612
+ * `doc.download` or `doc.download.flattened`, a plain one `doc.download`.
613
+ */
614
+ interface PrintCopyConformanceOptions extends PrintRenderConformanceOptions {
615
+ /** Open `bytes`, a copy the engine made, with every right. */
616
+ openCopy: (engine: Engine, bytes: Uint8Array) => Promise<DocumentHandle>;
617
+ }
618
+ declare function runPrintCopyConformance(runner: ConformanceTestRunner, opts: PrintCopyConformanceOptions): void;
619
+ //#endregion
567
620
  //#region src/conformance/pageSpaceFixtures.d.ts
568
621
  /**
569
622
  * Small PDFs whose page boxes are odd in every way ISO 32000 allows, and in
@@ -859,17 +912,17 @@ declare function runPageExtractConformance(runner: ConformanceTestRunner, opts:
859
912
  * Attachment conformance suite. Fixture requirement: a document whose
860
913
  * `/EmbeddedFiles` name tree contains at least one embedded file.
861
914
  *
862
- * Both attachment surfaces are optional on the contract (the
863
- * `downloadLayer?` pattern), probed independently and skipped cleanly:
864
- * - `doc.attachments?` — document-level EmbeddedFiles (list/download)
865
- * - `page.annotations.downloadResource(ref, 'file')` — annotation-level file bytes
915
+ * Both homes of a file: `doc.attachments` (the `/EmbeddedFiles` name tree)
916
+ * and a file-attachment annotation's `file` resource
917
+ * (`page.annotations.downloadResource(ref, 'file')`). Both downloads answer
918
+ * the bytes; the name and type are what the listing says.
866
919
  *
867
920
  * Invariants:
868
921
  * 1. `list()` reflects the name tree: positional indices, non-empty
869
922
  * names, and repeated calls agree (a read).
870
- * 2. `download(index)` round-trips the listed metadata and returns
871
- * exactly `size` decoded bytes when the fixture declares one.
872
- * 3. Unknown indices reject with an `EngineError`.
923
+ * 2. `download(ref)` returns exactly `size` decoded bytes when the
924
+ * fixture declares one.
925
+ * 3. Unknown keys reject with an `EngineError`.
873
926
  * 4. A created file-attachment annotation round-trips its file:
874
927
  * metadata inline on the DTO (never bytes), bytes byte-identical
875
928
  * as its `file` resource.
@@ -968,6 +1021,48 @@ declare function runChangeConformance(runner: ConformanceTestRunner, opts: Chang
968
1021
  /** A PDF file of `objects`, numbered from 1, with its cross-reference table. */
969
1022
  declare function pdfOf(objects: readonly string[]): Uint8Array;
970
1023
  //#endregion
1024
+ //#region src/conformance/runOutlineConformance.d.ts
1025
+ /**
1026
+ * Two pages of 300 × 300 and an outline, five items showing when it opens:
1027
+ *
1028
+ * - A (6), open: to page 3 at (20, 280) in the file; its child A1 (10) fits page 4.
1029
+ * - B (7): red and bold, a URI action.
1030
+ * - C (8), closed: the named destination `chapter-two` (page 4, `/FitH` 250);
1031
+ * its child C1 (11) goes nowhere.
1032
+ * - D (9): a JavaScript action.
1033
+ */
1034
+ declare const OUTLINE_FIXTURE_PDF: Uint8Array<ArrayBufferLike>;
1035
+ /**
1036
+ * An outline a write never made: One (4) and Two (5), whose `/Next` comes
1037
+ * back to One, and after One a direct item no one can name.
1038
+ */
1039
+ declare const BROKEN_OUTLINE_FIXTURE_PDF: Uint8Array<ArrayBufferLike>;
1040
+ interface OutlineConformanceOptions {
1041
+ label: string;
1042
+ makeEngine: () => Promise<Engine> | Engine;
1043
+ /** Open `bytes`, one of the fixtures here, fresh for each call, with write access. */
1044
+ open: (engine: Engine, bytes: Uint8Array) => Promise<DocumentHandle>;
1045
+ /** Open `bytes` with the rights to open and read it only (`doc.open`, `doc.render`). */
1046
+ openReadOnly: (engine: Engine, bytes: Uint8Array) => Promise<DocumentHandle>;
1047
+ }
1048
+ /**
1049
+ * The document's outline (`doc.outline`), the same on every engine:
1050
+ *
1051
+ * - A read lists every item depth first, with its parent, its target read the
1052
+ * way a link's is (in page space, a named destination resolved), its `/A`
1053
+ * tree, its colour and style, and whether it opens.
1054
+ * - Writes name items by object number and places by neighbour; moves keep
1055
+ * subtrees and numbers; deletes take the items under an item with it, and
1056
+ * an undo brings the same items back.
1057
+ * - Each write publishes its `outline.*` event; without `doc.outline.modify`
1058
+ * every write is refused and reading still works.
1059
+ * - A target reads the same however the file stores it: written into the
1060
+ * item or shared, named in the `/Names` tree or the old `/Dests`, a page
1061
+ * by index. A new target or an undo never changes an action an item shares.
1062
+ * - A broken outline reads what it can and says `incomplete`.
1063
+ */
1064
+ declare function runOutlineConformance(runner: ConformanceTestRunner, opts: OutlineConformanceOptions): void;
1065
+ //#endregion
971
1066
  //#region src/conformance/runPermissionConformance.d.ts
972
1067
  /**
973
1068
  * The two read families, through three tokens: one that may do everything,
@@ -1527,5 +1622,5 @@ interface FieldGroupsConformanceOptions {
1527
1622
  }
1528
1623
  declare function runFieldGroupsConformance(runner: ConformanceTestRunner, opts: FieldGroupsConformanceOptions): void;
1529
1624
  //#endregion
1530
- export { APPEARANCE_STATES_FIXTURE_PDF, type ActionsConformanceFixtures, type ActionsConformanceOptions, type AnnotationAppearanceConformanceFixture, type AnnotationAppearanceConformanceOptions, type AnnotationAttributionConformanceOptions, type AnnotationConformanceOptions, type AnnotationDeclarationConformanceOptions, type AnnotationDeclarationFixture, type AnnotationMutationConformanceFixture, type AnnotationMutationConformanceOptions, type AnnotationPredictionConformanceOptions, type AnnotationReadConformanceFixture, type AnnotationResourceConformanceOptions, type AnnotationResourceFixture, type AnnotationRotationConformanceOptions, type AnnotationRotationFixture, type AnnotationTransferConformanceOptions, type AppearanceStatesConformanceOptions, type AttributionSession, BARE_PAGE_FIXTURE_PDF, CHANGE_FIXTURE_PDF, COLOR_FIXTURE_PDF, CROP_OFFSET_PDF, type ChangeConformanceOptions, type ColorConformanceOptions, type ConformanceExpect, type ConformanceFixture, type ConformanceOptions, type ConformanceTestRunner, type Creatable, DRAWING_FIXTURE_PDF, type DateConformanceOptions, type DrawingDetailsConformanceOptions, type DrawingDetailsFixture, FIELD_GROUPS_PDF, FIELD_GROUP_TOKENS, type FieldGroupToken, type FieldGroupsConformanceOptions, type FormAttributionConformanceOptions, type FormConformanceFixtures, type FormConformanceOptions, type FormPredictionConformanceOptions, type FormScriptConformanceOptions, type FormTransferConformanceOptions, OBJECT_NUMBER_FIXTURE_PDF, type ObjectNumberConformanceOptions, PAGE_SPACE_FIXTURES, PERMISSION_TOKENS, PREDICTION_FIXTURE_PDF, type PageGeometryOrientationFixture, type PageGeometryOrientationOptions, type PageRenderConformanceOptions, type PageReorderConformanceFixture, type PageReorderConformanceOptions, type PageSpaceConformanceOptions, type PageSpaceFixture, type PageSpaceFixturePage, type PageTextConformanceFixture, type PageTextConformanceOptions, type PermissionConformanceOptions, type PermissionToken, type PieceInfoConformanceOptions, type RedactionApplyConformanceOptions, type SearchConformanceFixture, type SearchConformanceOptions, type SignatureConformanceFixtures, type SignatureConformanceOptions, TEXT_DIVERGENCE_CASES, TURNED_FIELDS_PDF, TWO_PAGES_PDF, type TextDivergenceCase, type TextDivergenceConformanceFixture, type TextDivergenceConformanceOptions, WIDGET_FINDING_CASES, type WidgetFindingCase, type WidgetFindingCaseName, type WidgetFindingConformanceOptions, type WidgetRotationConformanceOptions, annotationReadDriftOf, creatables, diffAnnotationList, iconRect, pdfOf, runActionsConformance, runAnnotationAppearanceConformance, runAnnotationAppearanceExportConformance, runAnnotationAttributionConformance, runAnnotationDeclarationConformance, runAnnotationExportConformance, runAnnotationFlattenConformance, runAnnotationImportConformance, runAnnotationMutationConformance, runAnnotationPredictionConformance, runAnnotationReadConformance, runAnnotationResourceConformance, runAnnotationRotationConformance, runAnnotationTransferConformance, runAppearanceStatesConformance, runAttachmentConformance, runChangeConformance, runColorConformance, runDateConformance, runDocumentEventsConformance, runDrawingDetailsConformance, runFieldGroupsConformance, runFormAttributionConformance, runFormConformance, runFormPredictionConformance, runFormScriptConformance, runFormTransferConformance, runMeasurementConformance, runMetadataConformance, runNamedPagesConformance, runObjectNumberConformance, runPageDeleteConformance, runPageExtractConformance, runPageFlattenConformance, runPageGeometryOrientationConformance, runPageInsertBlankConformance, runPageInsertConformance, runPageRenderConformance, runPageReorderConformance, runPageRotateConformance, runPageSpaceConformance, runPageTextConformance, runPermissionConformance, runPieceInfoConformance, runRedactionApplyConformance, runSearchConformance, runSignatureConformance, runTextDivergenceConformance, runWidgetFindingConformance, runWidgetRotationConformance };
1625
+ export { APPEARANCE_STATES_FIXTURE_PDF, type ActionsConformanceFixtures, type ActionsConformanceOptions, type AnnotationAppearanceConformanceFixture, type AnnotationAppearanceConformanceOptions, type AnnotationAttributionConformanceOptions, type AnnotationConformanceOptions, type AnnotationDeclarationConformanceOptions, type AnnotationDeclarationFixture, type AnnotationMutationConformanceFixture, type AnnotationMutationConformanceOptions, type AnnotationPredictionConformanceOptions, type AnnotationReadConformanceFixture, type AnnotationResourceConformanceOptions, type AnnotationResourceFixture, type AnnotationRotationConformanceOptions, type AnnotationRotationFixture, type AnnotationTransferConformanceOptions, type AppearanceStatesConformanceOptions, type AttributionSession, BARE_PAGE_FIXTURE_PDF, BROKEN_OUTLINE_FIXTURE_PDF, CHANGE_FIXTURE_PDF, COLOR_FIXTURE_PDF, CROP_OFFSET_PDF, type ChangeConformanceOptions, type ColorConformanceOptions, type ConformanceExpect, type ConformanceFixture, type ConformanceOptions, type ConformanceTestRunner, type Creatable, DRAWING_FIXTURE_PDF, type DateConformanceOptions, type DrawingDetailsConformanceOptions, type DrawingDetailsFixture, FIELD_GROUPS_PDF, FIELD_GROUP_TOKENS, type FieldGroupToken, type FieldGroupsConformanceOptions, type FormAttributionConformanceOptions, type FormConformanceFixtures, type FormConformanceOptions, type FormPredictionConformanceOptions, type FormScriptConformanceOptions, type FormTransferConformanceOptions, OBJECT_NUMBER_FIXTURE_PDF, OUTLINE_FIXTURE_PDF, type ObjectNumberConformanceOptions, type OutlineConformanceOptions, PAGE_SPACE_FIXTURES, PERMISSION_TOKENS, PREDICTION_FIXTURE_PDF, PRINT_RULES_PDF, PRINT_SCOPES, type PageGeometryOrientationFixture, type PageGeometryOrientationOptions, type PageRenderConformanceOptions, type PageReorderConformanceFixture, type PageReorderConformanceOptions, type PageSpaceConformanceOptions, type PageSpaceFixture, type PageSpaceFixturePage, type PageTextConformanceFixture, type PageTextConformanceOptions, type PermissionConformanceOptions, type PermissionToken, type PieceInfoConformanceOptions, type PrintCopyConformanceOptions, type PrintRenderConformanceOptions, type RedactionApplyConformanceOptions, type SearchConformanceFixture, type SearchConformanceOptions, type SignatureConformanceFixtures, type SignatureConformanceOptions, TEXT_DIVERGENCE_CASES, TURNED_FIELDS_PDF, TWO_PAGES_PDF, type TextDivergenceCase, type TextDivergenceConformanceFixture, type TextDivergenceConformanceOptions, WIDGET_FINDING_CASES, type WidgetFindingCase, type WidgetFindingCaseName, type WidgetFindingConformanceOptions, type WidgetRotationConformanceOptions, annotationReadDriftOf, creatables, diffAnnotationList, iconRect, pdfOf, runActionsConformance, runAnnotationAppearanceConformance, runAnnotationAppearanceExportConformance, runAnnotationAttributionConformance, runAnnotationDeclarationConformance, runAnnotationExportConformance, runAnnotationFlattenConformance, runAnnotationImportConformance, runAnnotationMutationConformance, runAnnotationPredictionConformance, runAnnotationReadConformance, runAnnotationResourceConformance, runAnnotationRotationConformance, runAnnotationTransferConformance, runAppearanceStatesConformance, runAttachmentConformance, runChangeConformance, runColorConformance, runDateConformance, runDocumentEventsConformance, runDrawingDetailsConformance, runFieldGroupsConformance, runFormAttributionConformance, runFormConformance, runFormPredictionConformance, runFormScriptConformance, runFormTransferConformance, runMeasurementConformance, runMetadataConformance, runNamedPagesConformance, runObjectNumberConformance, runOutlineConformance, runPageDeleteConformance, runPageExtractConformance, runPageFlattenConformance, runPageGeometryOrientationConformance, runPageInsertBlankConformance, runPageInsertConformance, runPageRenderConformance, runPageReorderConformance, runPageRotateConformance, runPageSpaceConformance, runPageTextConformance, runPermissionConformance, runPieceInfoConformance, runPrintCopyConformance, runPrintRenderConformance, runRedactionApplyConformance, runSearchConformance, runSignatureConformance, runTextDivergenceConformance, runWidgetFindingConformance, runWidgetRotationConformance };
1531
1626
  //# sourceMappingURL=conformance.d.ts.map