Processing

Convert To PDF

Converts Word, Excel, PowerPoint, RTF, text, email and image files to PDF using the Microsoft Office installed on this PC, and AutoCAD drawings without AutoCAD, safely for evidence, and reports the page count of each PDF.

PRO Command line: convert-to-pdf Version 1.2
A Pro toolIn the free edition it works on up to 25 documents per run, so you can try it on real work. Compare Free and Pro.

Convert To PDF turns each document in the input folder into a PDF in the run folder, keeping the folder structure. The original extension stays in the name (memo.docx.pdf), so files with the same name but different types never collide. Word, Excel, PowerPoint, RTF, OpenDocument text, .txt and .csv files are converted by Microsoft Office, which must be installed. Emails (.eml, .msg) are laid out with a header block (From, Sent, To, Cc, Bcc, Subject, Attachments) and converted by Word. Images (JPEG, PNG, BMP, GIF and multi-page TIFF) are converted without Office.

Office is used the careful way. Each file is copied to a private working folder and the copy is opened read-only, with alerts off and macros disabled. Before Office opens a modern Office file, external links that could fetch something (attached templates, linked pictures, data connections) are neutralised. Remote images and style sheets are removed from emails. Saved values are kept: Excel does not recalculate and Word fields are locked. By default, tracked changes, comments, hidden sheets, rows, columns and slides are shown in the PDF. The tool never uses or closes an Office window you have open.

AutoCAD drawings (.dwg and .dxf) are converted without AutoCAD or Office. Each layout (sheet) set up with a title block or other content becomes a page, in tab order, on its own paper size; a drawing whose layouts are empty or only windows onto the model gets one A3 page of its model space, which shows everything in it. Lines, arcs, hatches, blocks, dimensions and text are drawn as vectors, and the text is real text, so the PDF can be searched. Layers that are off, frozen or set not to plot, and parametric constraints, are left out, as they would be when plotting. Drawings from AutoCAD R14 (1997) onwards can be read; older .dwg files are reported with what to do, and their .dxf exports usually convert.

Use it when

How to run it

  1. Choose the folder of documents as Input, and an Output folder outside it.
  2. Check unhide-content and If a file can't be converted; the defaults (show everything, copy the native) suit most productions.
  3. Open the Word settings, Excel settings, PowerPoint settings and Email settings sections and change only what you need, for example the email Time zone.
  4. Close PowerPoint if it is open and the set includes presentations.
  5. Click Run. Office runs in the background; leave it to finish.
  6. Read the notes, then click Open report and filter the Status and Details columns.

Settings

Every setting has the same help beside it in the app. On the command line, pass each as --name value; ltk help convert-to-pdf lists them.

Settings

SettingWhat it doesType and default
Unhide content
--unhide-content
Excel: hidden and very hidden sheets, hidden rows and columns and filtered-out rows are included, and print areas are ignored, so the PDF holds everything. PowerPoint: hidden slides are included. Off: the PDF shows only what would normally print; a note says when hidden content was left out.
On by default, so the PDF holds everything in Excel and PowerPoint files, and Details lists what hidden content was included. Turn it off only when you want the PDF to match what would normally print; the report and notes then say which files had hidden content left out.
yes/no
true
If a file can't be converted
--if-unrenderable
CopyNative: the original file is copied to the output where its PDF would be (same folder, original name), so every document is still produced. Placeholder: a one-page PDF names the file and says why it could not be converted. ReportOnly: nothing is written; the report shows the reason.
CopyNative (default) puts the original file in the output where its PDF would have gone, so every document is still produced in some form. Placeholder writes a one-page PDF naming the file and the reason. ReportOnly writes nothing. Not used for PowerPoint files skipped because PowerPoint was open: run again for those.
choice: CopyNative, Placeholder, ReportOnly
CopyNative
Time limit (seconds)
--timeout-seconds
If Office takes longer than this on one document, the Office copy this tool started is stopped, the document is reported as Timeout, and Office is restarted for the next document.
If Office takes longer than this on one document, the copy of Office the tool started is stopped, the document is reported as Timeout, and Office is restarted for the next one. Raise it for very large workbooks.
number
120

Word settings

SettingWhat it doesType and default
Remove headers
--word-remove-headers
Headers (first page, odd and even) are left out of the PDF. Only the working copy is changed. yes/no
false
Remove footers
--word-remove-footers
Footers (first page, odd and even) are left out of the PDF, page numbers in them included. yes/no
false
Remove comments
--word-remove-comments
Comments are not shown in the PDF. Off (default): every comment is shown in the margin. The report says when a document had comments that were left out. yes/no
false
Remove field codes
--word-remove-field-codes
Fields (dates, file names, cross-references, merge fields...) are replaced by their saved results as plain text, and field codes are never printed, even in a document saved showing them. Page numbering stays live. (Fields always print their saved results; this also removes the fields themselves.)
Fields always print their saved results. Turn this on to replace fields with those results as plain text, which also stops field codes printing in a document saved showing them. Page numbering stays live.
yes/no
false
Remove tracked changes
--word-remove-track-changes
The PDF shows the document with every tracked change accepted. Off (default): insertions, deletions and formatting changes are shown as markup. The report says when a document had tracked changes that were not shown.
Off by default: tracked insertions and deletions are shown as markup. On: the PDF shows the document with every change accepted, and Details says when a document had tracked changes that were not shown. The same applies to Remove comments.
yes/no
false

Excel settings

SettingWhat it doesType and default
Paper size
--excel-paper-size
Paper size for every worksheet and chart sheet. AsIs: each sheet's own setting. choice: AsIs, A3, A4, A5, Letter, Legal, Tabloid
AsIs
Orientation
--excel-orientation
Page orientation for every sheet. AsIs: each sheet's own setting. choice: AsIs, Portrait, Landscape
AsIs
Comments
--excel-comments
Comments and notes. AtEnd: all of them are printed on pages after each sheet, with their cell references, so none is hidden. InPlace: printed where they are displayed on the sheet (hidden notes are not printed). None: not printed. AsIs (default): each sheet's own setting; the report says which files have comments, so you can convert those again with AtEnd. (Changing page setup needs a printer installed.)
AsIs (default) follows each sheet's own setting, and the report says which files have comments. Use AtEnd to print every comment and note, with its cell reference, on pages after each sheet. Changing page setup needs a printer installed on the PC.
choice: AsIs, None, InPlace, AtEnd
AsIs
Cell errors
--excel-errors
How cell errors such as #DIV/0! print: Displayed (as shown), Blank, Dash (--) or NA (#N/A). AsIs: each sheet's own setting. choice: AsIs, Displayed, Blank, Dash, NA
AsIs
Page order
--excel-page-order
For sheets wider and longer than one page: DownThenOver prints down the columns first, OverThenDown across the rows first. AsIs: each sheet's own setting. choice: AsIs, DownThenOver, OverThenDown
AsIs
Print gridlines
--excel-gridlines
Prints cell gridlines on every worksheet. Off: each sheet's own setting. yes/no
false
Print headings
--excel-headings
Prints row numbers and column letters on every worksheet, so each value can be traced to its cell. Off: each sheet's own setting.
Prints row numbers and column letters, so a value in the PDF can be traced back to its cell. Useful for spreadsheets that will be referred to in evidence.
yes/no
false

PowerPoint settings

SettingWhat it doesType and default
Include speaker notes
--ppt-notes
Exports notes pages (each slide with its speaker notes below it) instead of slides only. yes/no
false
Date and time
--ppt-date-time
Shows or hides the date and time on every slide (and notes page). AsIs: as each slide has it. choice: AsIs, Show, Hide
AsIs
Footer
--ppt-footer
Shows or hides the footer on every slide (and notes page). AsIs: as each slide has it. choice: AsIs, Show, Hide
AsIs
Header (notes pages)
--ppt-header
Shows or hides the header on notes pages (slides have no header). Used with Include speaker notes.
Shown when ppt-notes = true
choice: AsIs, Show, Hide
AsIs
Slide title
--ppt-slide-title
Shows or hides the title on every slide. AsIs: as each slide has it. choice: AsIs, Show, Hide
AsIs
Slide number
--ppt-slide-number
Shows or hides the slide number on every slide (and notes page). AsIs: as each slide has it. choice: AsIs, Show, Hide
AsIs

Email settings

SettingWhat it doesType and default
Time zone
--email-time-zone
Time zone for the Sent date printed in each email's header: UTC, Local (this PC's) or a Windows time zone ID such as "AUS Eastern Standard Time". The offset and zone are printed with the date.
UTC by default. Use a Windows time zone ID such as AUS Eastern Standard Time to show Sent dates in local time; the offset and zone are printed with the date. An unknown time zone stops the run before anything is converted.
text
UTC
Paper size
--email-paper-size
Paper size for emails (.eml, .msg). choice: AsIs, A3, A4, A5, Letter, Legal, Tabloid
A4
Orientation
--email-orientation
Page orientation for emails. choice: AsIs, Portrait, Landscape
Portrait
Table content
--email-tables
Landscape (default): tables in the email body are fitted to the page width, and an email with a table still too wide for a portrait page is printed landscape, so nothing is cut off at the page edge. FitToPage: tables are fitted to the page width only (very wide tables may still run off the page). AsIs: tables keep the widths the email gives them. choice: Landscape, FitToPage, AsIs
Landscape

Common settings

SettingWhat it doesType and default
Input required
--input
Folder (or single file) to read. It is opened read-only and never modified. folder
empty
Output required
--output
Folder for reports. Must not be inside the input folder. Each run gets its own sub-folder. folder
empty
Recurse
--recurse
Include sub-folders. yes/no
true
Extensions
--extensions
Only process these extensions (e.g. .pdf, .docx). Empty means the tool's default set. list
empty
Parallelism
--parallelism
Files processed at once. Use 1-2 for spinning disks or network shares. number
4

What you get

Each run creates its own folder inside the output folder, with the report convert-to-pdf.csv, errors.csv and manifest.json (see Run folders and manifests).

Report columns

Check the result

Tips
  • .csv files are imported as text: every value is shown as typed and nothing is calculated, so formulas appear as text.
  • Email attachments are listed by name in the header but not converted. Extract them with Extract Attachments and convert those files separately.
  • Emails with tables too wide for a portrait page are printed landscape by default, so nothing runs off the page; Details says when this happened.
  • Older Office files (.doc, .xls, .ppt, .rtf) cannot be checked for external links before Office opens them. If that matters, convert them on a PC that is not connected to a network.
Watch out for
  • Office must be installed for Office documents and emails. If it is not, those files are reported as Not supported and handled by If a file can't be converted.
  • A PDF is a rendering, not the native. With the Word remove settings on, unhide-content off or excel-comments set to None, content in the native is not in the PDF; record the settings used (they are in manifest.json) with the production.
  • The free edition converts up to 25 documents per run.
  • A drawing's PDF is scaled to fit the page and drawn by LitTechKit rather than AutoCAD, so it is for reading, not measuring. Fonts are shown in Arial, so heavily formatted text can sit slightly off from where AutoCAD puts it. Plot-style tables (screening, fill patterns) are not applied. External references (xrefs) and attached raster images are not included (Details says when a drawing has them), and a drawing made only of 3D solids is reported rather than converted. An unusual entity may be missing: for a drawing that matters, compare the PDF with a plot made in AutoCAD or a DWG viewer.

From the command line

The command line is part of LitTechKit Pro. See Command line.

ltk run convert-to-pdf --input "D:\Matter\Natives" --output "D:\Matter\PDFs" --email-time-zone "AUS Eastern Standard Time" --if-unrenderable Placeholder

Related tools