Overview
The purpose of this article is to resolve issues where PDF files are not showing as expected when converted from Excel in M-Files.
This affects M-Files versions 2015 and later.
Converting an Excel file to PDF using M-Files will produce misplaced or orphaned pages in the PDF.
Example
If you have an Excel file with 3 pages, then try to convert the same into PDF either through a workflow or manually inside M-Files. Sometimes you may have missing items from a page (e.g.: images) and you may also have a part of one page being present in another because of the conversion.
Converting to a PDF file is essentially printing the document. If an Excel file has a print area defined, that may or may not fit the paper size in the PDF printer causing odd page placement.
Solution
Removing the print area setup from the Excel file by:
- Go to the Page Layout ribbon.
- Select Print Area.
- Clear the Print Area. Save changes.
You may need to set margins and paper size, as well as the orientation to match PDF conversion settings.
In some cases, a rectangle box drawn on top of a picture in Excel may have some letters that are not being shown upon conversion. Resize that text box to make the whole sentence. See screenshots below:
