Product: PDFTron.NetCore.Windows.x64
Product Version: 11.6.0
Plateform: Windows 11, .Net 8
Using a physical printer device, printed PDF files are sightly cut on top and right sides, like additional margins are applyed on left and bottom sides.
Using “Microsoft Print to PDF” device, printed file is sightly stretched and content overflowed out of physical page.
If I open and print same files directly from another PDF reader, everything is good.
Here my extracted code :
PDFNet.Initialize(".....");
using PDFDoc doc = new PDFDoc(tempFilename);
doc.InitSecurityHandler();
Print.StartPrintJob(doc, printerName, string.Empty, string.Empty, new PageSet(1, 1), null, null);
Could you clarify what could impact rendering of printed PDF file please ?
Hello, I’m AiRon, an automated tech support bot While you wait for one of our customer support representatives, I can help you with your question.
It seems like you are experiencing issues with the scaling and margins of your printed PDF documents. This can often be attributed to how the printing settings are configured, particularly the scaling options and printer settings.
Some things you can try:
Check the printer settings: Ensure that the printer settings do not have any scaling options enabled that might be causing the content to be stretched or cut off.
Verify the page size: Make sure that the page size specified in the PDF matches the paper size of your printer.
Use the Print API settings: Examine the parameters you pass to Print.StartPrintJob(). You might need to adjust or specify additional options such as scaling, margins, or alignment.
Print using a different method: Try using a different print setup or method within the Apryse SDK to see if the issue persists.
Here are some resources that might help you:
Printing PDF documents: This guide provides detailed information on printing PDFs using the Apryse SDK and might have insights into resolving your issue.
Open a PDF on Server/Desktop: Learn more about handling PDF documents, which could help ensure your documents are prepared correctly before printing.
ASP.NET application pool and identity: While not directly related, understanding application contexts might help if your issue is environment-specific.
Memory Management in .NET: Ensure your application is handling resources efficiently, which can indirectly affect printing performance.
Hopefully, this helps you solve your problem while you wait for a human to get back to you.
I ran a quick test using your sample code and the Microsoft Print to PDF printer and I do not see any stretched or overflowing content so I will need some additional information to investigate.
Input file(s) - Does this occur for several documents you are processing or is it specific to a single document? Can you attach a sample file here?
Generated output file(s) - Please attach the printed file for the file in step 1.
Screenshots showing the output, and clearly indicating what you expected to get instead, and also clearly indicating the application/browser being used to view.