• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Import from Word not respecting Paper Size
#3
(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)
Reply


Messages In This Thread
RE: Import from Word - by Zubersoft - 11-09-2024, 07:35 PM
RE: Import from Word - by IanMSpencer - 11-10-2024, 02:06 AM



Users browsing this thread:
3 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2024 MyBB Group.