11-10-2024, 02:06 AM
(This post was last modified: 11-10-2024, 02:31 AM by IanMSpencer.)
(11-09-2024, 07:35 PM)Zubersoft Wrote: I don't really have any control over the conversion from Word to PDF through the PDF library. So there's not too much I can do if it doesn't match perfectly.
Mike
Funnily enough, the difference is the other way round to I expected - the document is set to Letter (I've now spotted by tabbing template is wrongly configured after several years!) and the MS print is Letter. The Library print is getting A4 from somewhere else. (If I print to paper, Brother just fits the Letter print onto A4 and doesn't repaginate hence I've not noticed my wrong set up).
So, the Library is apparently not respecting the document size set in the Layout which suggests that the Library is using something other than the document to set the PDF size, which seems like a bug in the library or there is an option getting accidentally overridden somewhere.
It is not a problem to me now I understand what is going on. I've tweaked the thread title to clarify the issue in case others see the issue.
[Edit] It seems to be a design issue in the Library. See DocxPdfRenderOptions() which contains an ominous last line:
Code:
PaperSize
Set an output paper size for PDF pages. System.Drawing.Printing.PaperKind.
Use SetCustomPaperSize(int width, int height) for custom sizes.
Default value is A4.
(https://ironpdf.com/object-reference/api..._PaperSize)