Document processing in Recordbase

Recordbase uses a third-party library from Syncfusion to convert documents into PDFs in order to display them in the application.

Syncfusion's DocIO library offers robust support for converting Word documents to PDF, covering most standard document elements, formatting, and advanced customisation options without requiring Microsoft Office. However, there are some limitations, especially with complex or less common features.

Supported features

The library can convert a wide range of Word content and formatting, including:

· Document elements: Text, tables, images (including PNG, JPEG, BMP, and GIF), headers, and footers are all supported.

· Formatting: Text formatting (font, size, style), paragraph properties, table styles, and page settings like columns, orientation, and margins are preserved.

· Fields: Supports converting fields like page numbers, dates, and conditional (IF) fields.

· Form fields: Legacy form fields (text boxes, checkboxes, and dropdowns) can be preserved as fillable PDF form fields. Note that content controls are converted to plain text, not editable form fields.

· Hyperlinks and bookmarks: These are preserved, with Word headings automatically converting to PDF bookmarks.

· Shapes and textboxes: Basic shapes and textboxes are supported, along with text wrapping around these objects.

Unsupported elements and limitations

Some features have known limitations or are not fully supported during Word to PDF conversion:

· Drawings: Grouped shapes are not preserved. SmartArt, ink drawings, shapes with picture fill, 3D charts and WordArt may not be converted as expected.

· Content controls: Unlike legacy form fields, content controls are converted to plain text rather than editable PDF fields.

· Table formatting: Advanced table formatting, such as the "Fit Text" option for table cells and certain patterns or 3D borders, is not supported.

· Layout and pagination: While the library makes logical pagination decisions, exact replication of the Word document's page breaks is not always guaranteed.

· Linked text boxes: The conversion does not support linked text boxes.

Security considerations

When using Syncfusion to convert Word documents to PDF, the process itself does not execute macros, thereby eliminating the security risk of malicious code in the Word document being run during conversion. The risk of macros is contained within the Word document and is not transferred to the output PDF.

How Syncfusion handles macros

· No execution during conversion: The Syncfusion Word library (DocIO) works independently of Microsoft Office and does not rely on its components, such as the macro engine. As a result, any macros present in the source Word document are not executed during the conversion to PDF.

· Preservation of content: The DocIO library focuses on converting the document's content, formatting, and layout to a PDF format. Macros, being executable code, are not part of the document's static content and are therefore not relevant to the conversion process.