Effortlessly convert files to PDF with ToPDF

This converts any file type to PDF, the searchability status of the output PDF depends on the source document, for example, MS Office Input file.

This step uses a virtual printer to print files to a PDF file instead of a physical printer. Due to the printer and Microsoft office automation, there are a lot of technical and security limitations. Thus, we have introduced different methods of converting files to PDF so that our users can have a robust solution to their requirements.

We have provided a configuration file to allow users to switch between these various methods.

Overview of the different conversions methods

Low-Code Solutions use three different methods to convert office files to PDF files, these methods are explained in the section below.

Ways to Convert Office Files to PDF

MS Office native conversion

This step uses the “Save as PDF” option in MS Office to save the PDF file directly. This requires Microsoft Office 2007 or newer. Microsoft Office 2007 requires the free "Save as PDF or XPS" add-in for Office 2007 to be installed. We recommend you use the 2010 and new versions.

If you are not interested in changing properties like Image Compression, Image Downsizing, Font embedding and you are ok with the default PDF/A output from your version of office, we recommend using this approach.

MS Office direct print

This method uses the BCL ‘easyPDF SDK x’ printer to print out PDF files directly from Microsoft Office. This is the recommended option for producing PDF/A files and PDF files with font embedding.

MS Office extended print

In this method, Office automation is used to create an intermediate XPS file, which is then printed with automatic hyperlink extraction. This approach has some technical differences to the first method that allows the users to use the software in a different way. This requires Microsoft Office 2007 or newer. Microsoft Office 2007 requires the free "Save as PDF or XPS" add-in for Office 2007 to be installed.

If you are performing conversions in server environments, for example, via IIS, Windows Services, Session 0 and ASP, this method does not require an interactive user to be logged on for server conversions to succeed, thus we recommend this setting for server environments.

Comparison of the features provided by the different methods

The table below shows you the features available in the different methods.

PropertyDirect PrintExtended PrintNative Conversion
Bookmark depth
Convert Hyperlinks
Convert Bookmarks (Word)
IncludeDocumentMarkups
(Track Changes Word)
Paper Orientation
Paper Size
Margin
PDFA1bDepends on the version of Microsoft Office
PDFX1aDepends on the version of Microsoft Office
PDFX3Depends on the version of Microsoft Office
Image Compression
Image Downsizing
Font Embedding
Print All Sheets(Excel)
Include Document Properties
Fit to Page (Excel)
MSG Files
Frame Slides (PowerPoint)
Print Color Type (PowerPoint)
Output Type (PowerPoint)
Handout Order (PowerPoint)
Print Graphics (Pub)

In-depth look at the configuration file

The configuration file can be found in:

“<Autobahn DX Installation directory>\distribution\pj\bin\topdf.exe.config”

Below are the contents of the configuration file, to use a method for a file type, just write the extension in the value property of the conversion Method as shown below.

Do not write an extension in more than one method.

<!-- Extension Mapping -->
<add key="AutoExtension" value="" />
<add key="AutoExtensionEx" value=".jpeg.jpg" />
<add key="AutoExtensionOpenNative" value="" />
<add key="AutoExtensionNative" value="" />
<add key="WordExtension" value="" />
<add key="WordExtensionEx" value=".docx.doc.rtf" />
<add key="ExcelExtension" value="" />
<add key="ExcelExtensionEx" value=".xls.xlsx" />
<add key="GenericExtension" value=".txt.dwg" />
<add key="PowerPointExtension" value="" />
<add key="PowerPointExtensionEx" value=".ppt.pptx" />
<add key="VisioExtension" value="" />
<add key="VisioExtensionEx" value=".vsd" />
<add key="IEExtension" value=".xml" /\>
<add key="PublisherExtension" value="" />
<add key="PublisherExtensionEx" value=".pub.puz" />
<add key="IEExtendedExtension" value=".mht" />
<add key="HTMLExtension" value=".htm.html.eml" />
<add key="OutlookExtension" value=".msg" />
<add key="OpenOfficeExtension" value=".odt.swx.wpd.ods.sxc.odp.sxi.odg.sxd" />
<add key="ExcludedExtensions" value=".zip.exe.pps.ps.chm" />
<add key="PDFExtension" value=".pdf" />

Mappings between configuration file and the conversion methods

The table below maps the configuration file with the Conversion Methods discussed earlier.

The Configuration options ending with “Ex” work with the “NativeOfficePDF” config option to select a suitable conversion method.

ConfigurationConversion MethodFile TypesComment
AutoExtensionDirect PrintAll file typesWorks with any file extension that has an application compatible with the BCL printer.
AutoExtensionExExtended PrintAll file typesWorks with any file extension that has an application compatible with the BCL printer.
AutoExtensionNativeNative ConversionMS Office files
OpenOfficeExtensionDirect PrintOpen Office filesWorks with all files that can be opened in Open Office.
AutoExtensionOpenNativeNative ConversionOpen Office filesWorks with all files that can be opened in Open Office.
WordExtensionDirect Print.doc, .docx, .rtfAll files that can be opened in MS Word.
WordExtensionEx <br> NativeOfficePDF=trueNative Conversion.doc, .docx, .rtfAll files that can be opened in MS Word.
WordExtensionEx <br> NativeOfficePDF=falseExtended Print.doc, .docx, .rtfAll files that can be opened in MS Word.
ExcelExtensionDirect Print.xls, .csv, .xlsxAll files that can be opened in Excel.
ExcelExtensionEx <br> NativeOfficePDF=trueNative Conversion.xls, .csv, .xlsxAll files that can be opened in Excel.
ExcelExtensionEx <br> NativeOfficePDF=falseExtended Print.xls, .csv, .xlsxAll files that can be opened in Excel.
PowerPointExtensionDirect Print.ppt, .pptxAll PowerPoint files.
PowerPointExtensionEx <br> NativeOfficePDF=trueNative Conversion.ppt, .pptxAll PowerPoint files.
PowerPointExtensionEx <br> NativeOfficePDF=falseExtended Print.ppt, .pptxAll PowerPoint files.
VisioExtensionDirect Print.vsd
VisioExtensionEx <br> NativeOfficePDF=trueNative Conversion.vsd
VisioExtensionEx <br> NativeOfficePDF=falseExtended Print.vsd
IEExtensionDirect Print.html, .xml, .mhtAll Internet Explorer files.
IEExtendedExtensionExtended Print.html, .xml, .mhtAll Internet Explorer files.
HTMLExtensionDirect Print.htm, .html, .eml
PublisherExtensionDirect Print.pub, .puz
PublisherExtensionEx <br> NativeOfficePDF=trueNative Conversion.pub, .puz
PublisherExtensionEx <br> NativeOfficePDF=falseExtended Print.pub, .puz
OutlookExtensionDirect Print.msg
PDFExtensionPDF filesConverts PDF attachments if the option is selected.
GenericExtensionDirect Print.txt, .dwgUsed as a last resort when a file type is unrecognized. Defaults to using Windows Notepad for output.
ExcludedExtensionsothersSkips all the extensions listed here.