Optional module · pdftoolkit/pdf-to-html 0.7.0
This ledger concerns the retained PDF Association usage specification, not a claim of complete ISO 32000-2, Acrobat or browser implementation. Page numbers are physical PDF pages, including the six-page front matter. Open the original.
Native means executable package behavior. Policy means an explicit security decision permitted by the reference. Port means the package prepares data and calls an application-owned capability. HTML adaptation means the literal PDF rule conflicts with current HTML/browser behavior and the decision is recorded with diagnostics. Tests exercise concrete cases; a table entry alone does not prove universal conformance.
This is the 0.7.0 decision matrix for all numbered clauses and annexes of the retained 74-page reference. Grouped rows cover the complete stated range; tables are expanded where their individual choices matter. Clauses 2–3 define terms and notation, and annexes A–D provide implementation guidance; they are not separate conversion engines. Bibliography is on physical page 74.
Document and logical structure
| Clause | Pages | Decision and evidence |
|---|---|---|
| 1–3; 4.1 | 9–11 | Tagged logical content is the input; no inferred tagging or OCR. ISO knowledge remains a prerequisite. Native inverse-association checking is tested by ParentTreeReadingTest, including strict/permissive modes, pages, annotations, Form streams, cycles and budgets. |
| 4.2; 4.2.1 | 11–12 | Native UTF-8 HTML/CSS, doctype, language, XMP title/filename fallback, charset and viewport. HtmlDeriverTest, testDocumentMetadataTextEscapingAndPageNavigation; ReadingSourceTest. |
| 4.2.2 | 12 | Native catalog Supplement HTML takes precedence over other associated files before their payloads are decoded. AssociatedFilesReadingTest, testCatalogHtmlSupplementIgnoresOtherStreamsBeforeDecoding. |
| 4.2.3 | 12–15 | Native ClassMap selectors, consistent class-name conversion, class HTML properties and owner precedence. CSS custom-property names remain case-sensitive; shared MathML/list-label guards have zero added specificity. CssAttributeSemanticsTest, browser cascade oracle, HtmlDeriverTest. |
| 4.2.4 | 15 | Native AcroForm HTML owner and explicit form association for widgets. AdvancedDerivationTest, testInteractiveFormHasLabelsAndPageNavigation. |
| 4.2.5 | 15 | Native hidden page-list navigation and page labels; anchors are preserved through replacements. HtmlDeriverTest, ReadingReplacementTest. |
| 4.3.1; 4.3.2.1 | 16 | Native depth-first logical order and per-element processing. Graph identities, parents and budgets are checked. HtmlDeriverTest, testDepthFirstOrderAndTransitiveRoleMapping; ReadingReplacementTest. |
| 4.3.2.2 | 16–17 | Native transitive default RoleMap, original-type history and standard-type metadata. HtmlDeriverTest: role chains/cycles. |
| 4.3.2.3 | 17–18 | Native recognized PDF/MathML namespaces and namespace-object identity; HTML namespace is policy-controlled. Unknown namespaces require role mapping. MathML retains native display behavior through the documented Layout adaptation. HtmlDeriverTest, testNamespaceObjectIdentityKeepsDistinctRoleMaps; HtmlBoundaryTest. |
| 4.3.3 | 18–22 | Native standard structure-type mappings. RB uses a diagnosed HTML adaptation because modern HTML makes rb obsolete. AdvancedDerivationTest: mapping inventory and ruby adaptation. |
| 4.3.4 | 22–23 | Native content-model repair preserves content, order and unique identifiers. HtmlBoundaryTest: nested anchors/labels, captions, tables, lists and repair budgets; HTML5 oracle. |
Structure special cases
| Clause | Pages | Decision and evidence |
|---|---|---|
| 4.3.5.1 | 23–24 | Native Document elements remain in one HTML document as div. Splitting into separate documents is optional. AdvancedDerivationTest: mapping inventory. |
| 4.3.5.2.1 | 24 | Native H becomes p; H1–H6 become headings; higher levels use p with heading role/aria-level. AdvancedDerivationTest. |
| 4.3.5.2.2 | 24–25 | Native headings under TH become p and Sect becomes div. HtmlBoundaryTest: table-header descendants. |
| 4.3.5.3.1–4.3.5.3.3 | 26–27 | Native figure/table/list captions; table captions move first, forbidden caption blocks move outside, list captions become preceding div. HtmlBoundaryTest, HtmlDeriverTest. |
| 4.3.5.4.1 | 27–28 | Native explicit list labels suppress generated markers; description terms use dt. Layout Placement is ignored for list labels while explicit CSS remains authoritative. StructureAttributePrecedenceTest, testListLabelIgnoresPlacementFromAttributesAndSharedClasses; LabelDerivationTest. |
| 4.3.5.4.2 | 28 | Native Form labels use label unless their specified direct children require div. Indirect labels bind to the nearest interactive field. LabelDerivationTest: indirect labels, nested forms and block exceptions. |
| 4.3.5.4.3–4.3.5.4.5 | 28–29 | Native context-specific block/inline labels; other parents use span. Optional generated ARIA label text is not inferred. Explicit author attributes remain subject to safety filtering. LabelDerivationTest. |
| 4.3.5.5 | 29–30 | Native inline/block FENote and NoteType metadata. Note is diagnosed as outside the Well-Tagged target. Optional note popups are not inferred. AdvancedDerivationTest, AttributeDeriverTest. |
| 4.3.5.6 | 30–31 | Native inline figures preserve identified content and propagated language/Alt/HTML attributes; visual figures use the explicit rendering port. NormativeDerivationTest, testInlineTextualFigureRetainsIdentityLanguageAltAndExplicitAttributes; GraphicPdfExporterTest. |
| 4.3.5.7 | 31–32 | Native Formula uses span/div; direct MathML, including resolved custom roles, takes precedence over associated alternatives. NormativeDerivationTest, testRoleMappedMathMlTakesPrecedenceOverFormulaAlternatives; HTML5 cases. |
| 4.3.5.8.1–4.3.5.8.3 | 32–35 | Native nested/description lists and paragraph splitting. An orphan list directly inside dl is lifted outside it under §4.3.4, preserving order and unique IDs without inventing a term; lists already inside dd keep their association. DescriptionListRepairTest, HtmlDeriverTest, independent HTML5/model oracle. |
| 4.3.5.9 | 35 | Native NonStruct flattening or attributed div; Private/Artifact content is omitted before decoding. AssociatedFilesReadingTest, testPrivateContentIsIgnoredBeforeUnsupportedStreamDecoding; AdvancedDerivationTest. |
| 4.3.5.10; 4.3.5.10.1–4.3.5.10.3 | 36–37 | Native Link/Reference, first URI/GoTo in action chains, SD precedence, separate Name/String destinations and binary IDs. Structured targets follow final Alternative HTML IDs in either reading order; element-less alternatives retain an anchor. Views are validated; HTML zoom/viewport changes are optional. GoToR/GoToE require application navigation. LinkActionsReadingTest, NormativeDerivationTest. |
| 4.3.5.11; 4.3.5.11.1 | 37–38 | Native fields and direct/indirect labels; nested forms preserve their own targets. LabelDerivationTest, WidgetDeriverTest. |
| 4.3.5.11.2 | 38 | Native HTML-namespace fields use explicit HTML attributes and skip widget mapping. AdvancedDerivationTest, testHtmlNamespaceFieldsUseExplicitAttributesWithoutMappingTheWidget. |
| 4.3.5.11.3 | 38 | Native PrintField creates a non-interactive figure; visual appearance uses AppearanceRenderer. Optional Role/Checked alternative generation remains an author/application choice. AdvancedDerivationTest, testPrintFieldNeverCreatesAnInteractiveWidgetOrWidgetScript. |
| 4.3.5.12 | 38–39 | Native code phrases or pre/code lines with explicit line breaks. HTML5 cases, AdvancedDerivationTest. |
Properties and attributes
| Clause | Pages | Decision and evidence |
|---|---|---|
| 4.3.6.1 | 39–40 | Native IDs, generated targets, classes and A-over-C precedence. Binary identity is preserved injectively. TableHeadersReadingTest, HtmlDeriverTest. |
| 4.3.6.2 | 40 | Native nonempty language attributes. HtmlDeriverTest, ReadingSourceTest. |
| 4.3.6.3 | 40–41 | Native empty/nonempty ActualText, applied before ignored glyph decoding even on shared pages and descendant streams. Structural validation remains active. ReadingReplacementTest. |
| 4.3.6.4 | 41 | Native Figure alternatives on identified content and Formula/math alttext. Browser-compatible naming of non-image groups is an HTML adaptation. HtmlDeriverTest, HtmlBoundaryTest. |
| 4.3.6.5 | 41–42 | Native abbr/title expansion with explicit HTML title taking precedence. StructureAttributePrecedenceTest. |
| 4.3.6.6 | 42 | Native Ref links where suitable targets remain present. Optional association popups/highlighting belong to the host. AdvancedDerivationTest: omitted reference targets. |
| 4.3.7; 4.3.7.1 | 43–44 | Native owner ordering and namespace-object matching. Explicit HTML/CSS overrides structural defaults. AttributeDeriverTest, StructureAttributePrecedenceTest. |
| 4.3.7.2–4.3.7.3 | 44 | Native valid HTML attributes/booleans and sanitized CSS declarations. Ordinary CSS names use ASCII lowercase, while --Accent and --accent remain distinct, including HTML/namespace style attributes. CssAttributeSemanticsTest, AttributeDeriverTest, HtmlBoundaryTest. |
| 4.3.7.4 | 44–45 | Native ordered/unordered/description lists and list styles. ContinuedList/ContinuedFrom are not projected without an application continuation mechanism, as permitted. AttributeDeriverTest. |
| 4.3.7.5 | 45–47 | Native table attributes, byte-string Headers/ID identity and final HTML targets after owner/Alternative overrides. Explicit HTML Headers remain authoritative. Border/padding conversion is native; Scope Both retains data-pdf-table-scope="Both" through a diagnosed §4.3.4 HTML adaptation, without inventing header associations. TableHeadersReadingTest, AttributeDeriverTest, NormativeDerivationTest, testTableHeadersFollowAlternativeIdsWithoutRewritingExplicitHtmlHeaders. |
| 4.3.7.6 | 47–50 | Native layout mappings, sub/sup, point-to-pixel conversion and ruby properties. Modern text-decoration-thickness replaces the reference's older approximation. For MathML, automatically derived display is adapted to preserve mathematical layout; explicit MathML display and author CSS remain authoritative, including shared classes. MathML adaptation, AttributeDeriverTest, browser validation. |
| 4.3.7.7 | 50 | Native PrintField switches to non-interactive processing. AdvancedDerivationTest. |
| 4.3.7.8–4.3.7.10 | 50 | Native HTML/CSS/ARIA owners under content/URL/style policies. Unsafe attributes are omitted with diagnostics. AttributeDeriverTest, HtmlBoundaryTest. |
| 4.3.7.11 | 51–52 | Native UserProperties data attributes preserve valid Unicode name characters and zero/false values; only forbidden name characters are replaced, with ASCII case normalized for HTML. UserPropertyNamesTest, AttributeDeriverTest, real-browser attribute oracle. |
| 4.3.7.12 | 52 | Other owners are diagnosed; their processing is implementation-dependent in the reference. AttributeDeriverTest, testUnsupportedOwnerAndContinuationAreNeverSilentlyProjected. |
Content, associated files and annexes
| Clause | Pages | Decision and evidence |
|---|---|---|
| 4.4 | 52 | Native logical content and page IDs on their actual parent, including replacements/widgets. Visual mode uses retained programs through a port. Page programs default to physical CropBox; standalone Forms use their transformed bounds. Structure BBox or page-coordinate viewport can override output bounds via PageTransform. PageContentIdentifiersTest, page HTML5 oracle, GraphicExporterContextTest. |
| 4.4.1 | 52–53 | Paths retain geometry, state, clipping and resources. Isolated exports preserve source PDF version, page transparency groups and optional-content visibility. Irrelevant paint omission is permitted with diagnostics. GraphicPdfExporterTest, GraphicExporterContextTest, context pixel oracle. |
| 4.4.2 | 53 | Native ToUnicode and simple-font fallback via pinned Adobe glyph lists, including Symbol/ZapfDingbats/MacExpert. Tf and inherited ExtGState Font participate in q/Q and Form context. Incomplete Unicode mapping retains one complete text-show program for visual fallback, without duplicating its decoded fragments; this is not successful Unicode recovery. Named external CMaps fail explicitly. GlyphNameDecoderTest, ReadingGraphicsFontTest, ContentTextFallbackTest. |
| 4.4.3 | 53–54 | Native image XObjects and verified inline boundaries, logical dimensions and placeholder fallback when pixel conversion is unavailable. Shared Reader CCITT framing and pixels are checked with independent fax payloads; native PNG preserves gray 1/2/4/8/16 and RGB 8/16 samples. Image evidence and explicit fallbacks. inline tests, inline oracle, fax oracle. Exact codec planes, JPX ICC/alpha and JPEG colour interpretation. |
| 4.4.4 | 54 | Native nested Form groups preserve resources, matrix, caller context and inherited text clipping. Standalone root Forms keep BBox clipping/Group/OC in an XObject; their Matrix is composed once with the page transform. Explicit viewports use page space. GraphicPdfExporterTest, GraphicExporterContextTest, testAStandaloneObjrFormRetainsItsExactBoundingBoxClip, testAnObjrViewportUsesPageSpaceRatherThanTheFormsLocalMatrix and testNullUserUnitDirectOrIndirectBehavesLikeItsAbsence; context pixel oracle. |
| 4.4.5 | 54 | Shading programs/resources reach the rendering port. Irrelevant shading omission is permitted and diagnosed. GraphicProgramReadingTest, GraphicPdfExporterTest. |
| 4.4.6 | 54 | Native artifact omission, including child Forms reached through an already selected parent source and artifact-only Form programs. ArtifactRenderingTest, GraphicExporterContextTest, appearance pixel oracle, context pixel oracle. |
| 4.4.7; 4.4.7.1–4.4.7.5 | 54–55 | Native marked-content Lang/ActualText/E and combined wrappers. Marked Alt uses role=img/aria-label as a diagnosed HTML adaptation. HtmlDeriverTest, ReadingReplacementTest. |
| 4.4.8.1 | 55 | Native OBJR XObject interpretation, source page/context and inverse StructParent validation. Root Form export preserves sheared BBox clipping and Form transparency/optional content. ParentTreeReadingTest, GraphicExporterContextTest, testStandaloneFormTransparencyAndOptionalContentRemainInsideTheForm; context pixel oracle. |
| 4.4.8.2 | 55–56 | Other annotation kinds are outside the reference; they produce explicit diagnostics rather than invented HTML behavior. SourceReadSession. |
| 4.4.8.3 | 56 | Native Annots/CropBox visibility and property/attribute precedence. WidgetDeriverTest, ReadingScenariosTest. |
| 4.4.8.3.1 | 56–61 | Native field mappings are detailed by Tables 5–8 below. Signature results are supplied by a source-bound capability and shown in an actionable native popover. Rich text and file defaults retain explicit browser adaptations. WidgetDeriverTest, signature guide. |
| 4.4.8.3.1, Table 5 | 57–58 | Push/submit/reset/signature buttons; ImportData remains an ordinary push button as specified. Normal appearance plus MK/CA caption is preserved. ContentAppearanceRenderer adapts an explicit content renderer; selected AP N/D/R streams or AS states use Matrix/BBox-to-Rect placement. ContentAppearanceRendererTest, appearance oracle, FormActionsTest. |
| 4.4.8.3.1, Table 5 signatures | 57–58 | SignatureValidationProvider receives the exact document, dictionary and field; a result is bound to that request. The supplied core adapter verifies covered revision bytes and selected certificate, reporting integrity-verified, not PKI trust or later-change permission. Native popover shows escaped results. SignatureOutputValidationTest, SignatureValidationReadingTest, independent signature oracle, browser popover oracle. |
| 4.4.8.3.1, Table 6 | 58–60 | Native checkbox/radio export values and AS state; text/password/file/editable-choice mapping, MaxLen, spellcheck and unique datalist. RadiosInUnison is outside the table's target. Rich text and file values use the documented HTML adaptations. WidgetDeriverTest, ReadingScenariosTest. |
| 4.4.8.3.1, Tables 7–8 | 60–61 | Native multiline value, maximum length/spellcheck, list size, multiple choices and selection by V/I. RV is retained as plain text because textarea cannot contain rich element markup. WidgetDeriverTest, HTML5 oracle. |
| 4.4.8.3.2 | 61 | Native colors/borders/alignment, field names, required and applicable readonly. HighlightingMode N/I/O/P/T uses low-specificity CSS, native input semantics, selected down/rollover appearances or a push fallback; explicit source CSS remains authoritative. Unsupported readonly behavior is diagnosed. WidgetHighlightTest, WidgetDeriverTest, Chromium/Firefox widget oracle. |
| 4.5 | 61–62 | Policy-gated PDF ECMAScript export with an explicit document-scoped field/event bridge. Bounded Next chains preserve source order; primary widget A actions bind to activation and AcroForm CO supplies the calculation order. Source scripts never execute in PHP. ScriptActionReaderTest, CalculationOrderTest, ScriptDeriverTest, Node harness. |
| 4.6.1 | 62 | Native embedded-file precedence over FS/URL and policy selection before replaced content is decoded. AssociatedFilesReadingTest. |
| 4.6.2–4.6.3 | 62–63 | Native MIME/extension selection, URL scheme validation and preserved embedded filenames. Local file URLs are prohibited. AssociatedFilesReadingTest, ReadingScenariosTest. |
| 4.6.4.1 | 63–65 | Native Alternative replaces descendants; Supplement replaces direct content and preserves substructure. Shared source/output selection precedes replaced content decoding. Final replacement IDs preserve structured links/Headers, with explicit HTML attributes authoritative. AssociatedFilesReadingTest, NormativeDerivationTest. |
| 4.6.4.2 | 65 | Embedded HTML is parsed/filtered; remote rel=import output requires active and remote permission. This historical import form has no guaranteed loading behavior in current browsers; host handling is explicit, with no PHP fetch. AssociatedFilesReadingTest, HtmlBoundaryTest. |
| 4.6.4.3 | 65–66 | CSS is sanitized and emitted as a returned stylesheet asset/link or a permitted remote stylesheet. It remains a policy decision; no implicit fetch. HtmlBoundaryTest, AssociatedFileSelection. |
| 4.6.4.4 | 66 | Policy-gated trusted scripts follow the referencing element, or replace explicit HTML script content, and are externalized without changing their bytes. For HTML script + JavaScript Supplement, all descendants are ignored before stream decoding. ScriptReplacementReadingTest, HtmlBoundaryTest, ScriptAssetEmitter. |
| 4.6.4.5–4.6.4.6 | 66 | Native raster references and policy-controlled SVG; SVG BBox supplies logical dimensions. AdvancedDerivationTest. |
| 4.6.4.7 | 66–67 | Native namespace-aware MathML vocabulary filtering. Browser rendering/polyfills are an application responsibility. HtmlBoundaryTest. |
| Annex A | 68 | Policy boundaries, URL/CSS/fragment filtering and cumulative resource budgets. HtmlBoundaryTest, AssociatedFilesReadingTest. |
| Annex B | 69–71 | Native scoped scripts, field events, shared values and per-widget bindings. Precise emulation of all PDF ECMAScript objects is explicitly outside this annex. ScriptDeriverTest, Node harness. |
| Annex C | 72 | An explicitly configured StandardPasswordAuthentication reader decrypts native input; ReadPdfSource exports authenticated effective user/owner permissions from ReadDocument. Owner=-4, user=source P. The explicit port returns ReadDocument for identical source bytes and receives the effective integrity policy, before adaptation; it is dispatched only by typed EncryptedPdfException; null/absent entries and native password/adapter failures never request it. Reader 0.4 verifies source PDF MACs; RequirePdfMac is enforced on both paths before adaptation, with no removal/elevation of effective permissions. Receiving viewer enforcement remains application-owned; no CMS-signature/PKI trust claim. SourceIntegrityTest, independent MAC/HTML5 oracle. NativeAuthenticationTest, independent crypto/HTML5 oracle, AuthenticationBoundaryTest. |
| Annex D | 73 | Native semantic structures/language/alternatives/labels/table relations; actual accessibility review belongs to the producer and consuming application. HTML5 oracle, LabelDerivationTest, TableHeadersReadingTest. |
See coverage for accepted input encodings, browser adaptations and independent oracles. The original specification and released tests remain the sources of truth when assessing a specific document.
Complete table inventory and permitted choices
| Table / pages | Inventory and decision |
|---|---|
| 1 / 18–22 | All standard role families are covered by standardRoles: block/inline, headings, figures/formulas, forms, lists, tables, ruby, labels and special containers. Annot is future scope, Note is outside the Well-Tagged target, and RB is an explicit HTML adaptation. |
| 2–3 / 45–46 | ColSpan, RowSpan, Headers, Scope, Short, TBorderStyle and TPadding are handled separately from generic CSS owners. Both has no legal HTML scope value: preserve data-pdf-table-scope="Both", omit invalid scope and keep explicit Headers. This §4.3.4 adaptation does not synthesize missing header associations. A later Row/Column replaces the metadata. |
| 4 / 47–50 | Placement, WritingMode, BackgroundColor, BorderColor/Style/Thickness, Padding, Color, SpaceBefore/After, StartIndent/EndIndent, TextIndent/Align, TPadding, LineHeight, BaselineShift, TextDecorationColor/Thickness/Type and RubyAlign/Position are mapped; TextPosition creates sub/sup. AttributeDeriverTest, NormativeDerivationTest, MathMlLayoutTest. MathML display and modern text-decoration-thickness remain explicit adaptations; CSS effect depends on the receiving browser. |
| 5–8 / 57–61 | Widget cases and their appearance, signature and browser boundaries are expanded above. WidgetDeriverTest, WidgetHighlightTest. |
| 9 / 63 | HTML/XHTML, CSS, JavaScript, JPEG/PNG/GIF, SVG and embedded MathML selection is implemented under the associated-file policy. Other media types are optional; an unsupported association does not silently replace the original content. AssociatedFilesReadingTest, AssociatedFileSelection. |
Document splitting, inferred ARIA/URL text, note/reference popups, view zoom, GoToR/GoToE integration and list continuation engines are optional or implementation-dependent. They are not claimed as native universal behavior. Safe associated-file restrictions are permitted by §4.6.1. A raster engine, full PDF ECMAScript API, certificate trust/revocation policy and receiving-viewer permission enforcement remain explicit application responsibilities. HTML-valid adaptations are listed in coverage; they are not literal reproductions of incompatible PDF-to-HTML examples.