Tagged PDF

Tagged PDF and Accessible PDF Generation for Oracle PL/SQL

Generate structured, tagged PDF documents directly inside Oracle with PL/PDF 5.31. Add logical document structure, marked-content identifiers and language metadata for accessibility-oriented and PDF/UA workflows.

Structure Tree · MCIDs · Document Language · PDF/UA Workflows

More than visual PDF output

A conventional PDF describes how content appears on a page. A tagged PDF also carries a logical structure that helps software understand how document content is organised and related.

Logical structure tree

PL/PDF writes a PDF structure tree with a document root and structure elements that represent the logical organisation of tagged content.

Marked content and MCIDs

Marked-content identifiers connect content in the PDF page streams with the corresponding logical elements in the document structure.

Generated inside Oracle

The tagging structures are produced as part of the PL/PDF document-generation process, without requiring a separate PDF accessibility post-processing service.

A real PDF structure, not a visual workaround

Tagged mode changes the structure of the generated PDF itself. PL/PDF creates the standard PDF objects used to connect logical document elements to marked page content.

StructTreeRoot

The PDF catalog references a StructTreeRoot containing the logical document structure and its root document element.

ParentTree

A ParentTree maps marked page content and supported linked objects back to the corresponding structure elements.

Marked document catalog

Tagged output sets the PDF catalog’s MarkInfo state and connects the document to the generated structure tree.

How tagged PDF generation works in PL/PDF

  1. Initialize the document. Start the normal PL/PDF generation workflow.
  2. Enable tagged mode. PLPDF.setTagged initializes the tagged-document model and creates the root structure objects.
  3. Set the document language. PLPDF.setDocLanguage supplies language metadata that is written into the generated PDF.
  4. Generate document content. Supported PL/PDF content operations participate in the tagged output and are connected to logical structure elements.
  5. Link page content with MCIDs. PL/PDF writes marked-content identifiers into page streams and maintains the corresponding structure relationships.
  6. Finalize the PDF. PL/PDF writes the structure tree, parent tree, marked-document catalog entries and the normal PDF document objects into the final BLOB.

Enable tagged PDF in PL/SQL

Tagged output is enabled inside the normal PL/PDF generation workflow. Set the document language, generate content as usual and return the final PDF as an Oracle BLOB.

declare
  l_pdf blob;
begin
  plpdf.init;

  plpdf.setTagged;
  plpdf.setDocLanguage('en-US');

  plpdf.NewPage;
  plpdf.SetPrintFont('Arial', null, 14);

  plpdf.PrintText(
    p_x   => 20,
    p_y   => 30,
    p_txt => 'Accessible customer statement'
  );

  plpdf.SendDoc(l_pdf);
end;
/

This example enables the tagged-document structure and document-language metadata. The quality of the final accessible document still depends on the structure and content produced by the application.

Tagged structure is integrated with PDF content

PL/PDF does not build a detached accessibility description after the document is finished. Tagged structure is created while the PDF content is generated.

Page content

Marked content is written into page content streams with MCIDs that connect visual PDF operations to the logical tag structure.

Images and links

Tagged image and link handling creates structure relationships for graphical content and supported linked objects as part of normal document generation.

Drawing operations

Lines, paths and geometric shapes are represented in tagged mode using PDF Figure structure elements and marked content.

What PL/PDF writes into tagged output

  • StructTreeRoot referenced from the PDF catalog
  • Document structure element as the logical root
  • StructElem objects for supported structured content
  • ParentTree relationships between marked content and structure elements
  • MCIDs in marked page content
  • StructParents information on tagged pages
  • Tabs /S page navigation order setting
  • MarkInfo /Marked true in the document catalog
  • Lang metadata when a document language is configured

Tagged PDF is the foundation for accessible PDF

Accessibility tools need more than coordinates, fonts and drawing commands. A logical PDF structure provides machine-readable relationships that can support reading order, document interpretation and accessibility workflows.

Tagged PDF is also a core technical foundation for PDF/UA workflows. However, a PDF is not automatically accessible or standards-compliant simply because tags exist. The final result also depends on correct document semantics, reading order, language information, meaningful descriptions where required, text encoding and the content generated by the application.

For regulated or accessibility-critical deployments, validate representative generated documents against the accessibility standard and validation process required by your organisation.

Why generate accessible PDF inside Oracle?

One document pipeline

Create the content and its tagged PDF structure in the same PL/SQL process that already owns the application data and document-generation logic.

No separate conversion service

A separate reporting server or post-generation accessibility conversion application is not required to create the tagged structure itself.

Fits existing Oracle applications

Use tagged output from stored PL/SQL, Oracle APEX applications, database jobs and other existing Oracle document-generation workflows.

Typical tagged PDF workflows

Customer documents

Statements, invoices, confirmations, letters and other customer-facing documents where accessible electronic distribution is important.

Public and regulated output

Official reports, notices and regulated documents produced by systems that need an accessibility-aware PDF generation path.

Oracle APEX reporting

Add structured PDF output to Oracle APEX applications without moving report data to an external document-generation platform.

Accessibility is a document workflow, not a checkbox

Enabling tagged mode gives the PDF a machine-readable structural foundation, but accessible output should still be treated as part of document design and quality assurance.

  • Set the correct document language.
  • Use meaningful logical structure for the generated content.
  • Review reading order and navigation behaviour.
  • Provide meaningful descriptions for non-text content where required.
  • Use fonts and text encoding appropriate for reliable text extraction.
  • Validate representative final PDFs with the accessibility tools and standards required by your deployment.

Part of the PL/PDF document platform

Combine tagged PDF generation with digital signatures, modern document encryption, PDF/A, Office output and template-driven reporting inside Oracle.

Digital Signatures

Create standards-based PAdES-B-B and PAdES-B-T PDF signatures directly in Oracle PL/SQL.

Explore Digital Signatures →

AES-256 Encryption

Protect sensitive PDF documents with AES-256 encryption, passwords and configurable permissions.

Explore AES-256 Encryption →

PL/PDF OffX

Combine the complete PL/PDF SDK with Microsoft Word template-based document generation.

Explore OffX →

Evaluate tagged PDF generation with PL/PDF

Download PL/PDF and test structured, tagged PDF generation directly in your Oracle database environment.