21 hours ago21 hr Accessible PDF documents are becoming increasingly important for government agencies, educational institutions, and companies that want to ensure their documents can be used by everyone, including people using assistive technologies like screen readers.With the MBS FileMaker Plugin and the integrated DynaPDF library, you can create PDF/UA compliant documents directly from FileMaker.What is PDF/UA?PDF/UA stands for “PDF Universal Accessibility”. It is an ISO standard (ISO 14289) that defines how to create accessible PDF documents.A normal PDF often contains only visual information. A human reader can see headings, paragraphs, tables, or image captions, but a screen reader cannot automatically understand the structure unless the PDF also contains semantic information.PDF/UA solves this problem by adding structure information and accessibility metadata to the PDF document.A PDF/UA document typically includes:A document languageA structure treeTagged contentAccessible reading orderAlternative text for imagesProper heading hierarchyUnicode text mappingMetadata and viewer preferencesIn practice this means a screen reader can identify whether text is:A headingA paragraphA listA tableA quotationA figureA labelOr other semantic contentInstead of just placing text visually on a page, you describe the meaning of the content.Creating PDF/UA in FileMakerThe MBS FileMaker Plugin provides access to the DynaPDF library, which supports Tagged PDF and PDF/UA generation.Compared to creating a normal PDF, only a few additional steps are required:Enable the document title displayDefine the document languageCreate the structure treeUse the PDF/UA versionAdd semantic tags around contentThe most important concept is tagging content with OpenTag and CloseTag.For example:Headings use H1, H2, H3…Paragraphs use PLists use LTable structures use Table, TR, TH, and TDWithout these tags, the PDF may still look correct visually, but it will not be accessible.Simple PDF/UA ExampleHere is a minimal example for generating a tagged PDF/UA document in FileMaker:Set Variable [ $pdf ; Value: MBS( "DynaPDF.New" ) ] Set Variable [ $path ; Value: MBS( "Path.AddPathComponent"; MBS( "Folders.UserDesktop" ); "Create PDF.pdf" ) ] Set Variable [ $r ; Value: MBS( "DynaPDF.CreateNewPDF"; $pdf; $path ) ] # We want to use top-down coordinates Set Variable [ $r ; Value: MBS( "DynaPDF.SetPageCoords"; $pdf; "TopDown" ) ] # Required: Display document title Set Variable [ $r ; Value: MBS( "DynaPDF.SetViewerPreferences"; $pdf; "DisplayDocTitle"; "None" ) ] # Required: Set document language Set Variable [ $r ; Value: MBS( "DynaPDF.SetLanguage"; $pdf; "en-EN" ) ] # Required for Tagged PDF Set Variable [ $r ; Value: MBS( "DynaPDF.CreateStructureTree"; $pdf ) ] # Enable PDF/UA mode Set Variable [ $r ; Value: MBS( "DynaPDF.SetPDFVersion"; $pdf; "PDF/UA-1" ) ] Set Variable [ $r ; Value:MBS( "DynaPDF.AppendPage"; $pdf ) ] Set Variable [ $pageWidth ; Value: MBS( "DynaPDF.GetPageWidth"; $pdf ) ] Set Variable [ $pageHeight ; Value: MBS( "DynaPDF.GetPageHeight"; $pdf ) ] Set Variable [ $r ; Value: MBS( "DynaPDF.SetTextRect"; $pdf; 50; 50; $pageWidth - 100; $pageHeight - 100 ) ] # Set font Set Variable [ $r ; Value: MBS( "DynaPDF.SetFont"; $pdf; "Arial"; 0; 12; True ) ] # Open paragraph tag Set Variable [ $r ; Value: MBS( "DynaPDF.OpenTag"; $pdf; "P"; ""; ""; "" ) ] # Write tagged text Set Variable [ $r ; Value: MBS( "DynaPDF.WriteFText"; $pdf; "Left"; "Hello World" & ¶ & "Second line" ) ] # Close paragraph tag Set Variable [ $r ; Value: MBS( "DynaPDF.CloseTag"; $pdf ) ] # Close page, then file and free memory Set Variable [ $r ; Value: MBS( "DynaPDF.EndPage"; $pdf ) ] Set Variable [ $r ; Value: MBS( "DynaPDF.CloseFile"; $pdf ) ] Set Variable [ $r ; Value: MBS( "DynaPDF.Release"; $pdf ) ] Understanding the Structure TreeA Tagged PDF internally contains a structure tree. This tree defines the logical structure of the document.For example:DocumentH1PPH2PTableEach visible element on the page is connected to a semantic tag.The call to:MBS( "DynaPDF.CreateStructureTree"; $pdf ) creates the root structure node for the document.After that, every OpenTag/CloseTag pair adds content into this structure hierarchy.Adding HeadingsFor accessibility, headings are very important because screen readers use them for navigation.Example:# Heading level 1 Set Variable [ $r ; Value: MBS( "DynaPDF.OpenTag"; $pdf; "H1"; ""; ""; "" ) ] Set Variable [ $r ; Value: MBS( "DynaPDF.WriteText"; $pdf; 50; 50; "Invoice" ) ] Set Variable [ $r ; Value: MBS( "DynaPDF.CloseTag"; $pdf ) ] You should use heading levels in the correct order:H1 for the main titleH2 for sectionsH3 for subsectionsAvoid skipping heading levels.Alternative Text for ImagesImages should include alternative descriptions so screen readers can explain their meaning.For decorative images, you may mark them as artifacts instead.Example image tag structure:MBS( "DynaPDF.OpenTag"; $pdf; "Figure"; ""; ""; "" ) Then attach alternative text to the structure element.This becomes especially important for charts, logos, diagrams, and icons.Debugging PDF/UA FilesWhile developing accessible PDFs, debugging can help a lot.For example, disabling compression makes it easier to inspect the PDF source code in a text editor:MBS( "DynaPDF.SetCompressionLevel"; $pdf; 0 ) You can then search for:Structure tagsMarked contentMetadataLanguage definitionsValidation ToolsCreating a Tagged PDF does not automatically guarantee PDF/UA compliance.You should validate your generated files with accessibility checking tools such as:PAC (PDF Accessibility Checker)Adobe Acrobat accessibility toolsveraPDFThese tools can identify:Missing tagsInvalid reading orderMissing alternative textIncorrect metadataFont encoding problemsThings to Watch Out For Some common PDF/UA issues include:Missing document languageUntagged contentMissing Unicode mappingsIncorrect reading orderTables without TH cellsImages without alt textDecorative elements not marked as artifactsAccessibility is often less about visual appearance and more about semantic structure.ConclusionWith only a few additional function calls, DynaPDF allows you to generate accessible PDF/UA documents directly from FileMaker.The key steps are:Create the structure treeSet PDF/UA modeDefine language and viewer preferencesAdd semantic tags around contentOnce you start thinking in terms of document structure instead of only page layout, generating accessible PDFs becomes quite straightforward.See an example script in Create Text as PDF/A example database.Please try it and let us know if you have questions.
Create an account or sign in to comment