We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

AsposePDF 8.5 not printing the correct size

Dear Aspose,

I am having difficulties printing a PDF in its true size. I am working on 2008 server, with aspose 8.5. See the attachments for PDF and my code.

No matter what i try (margins to 0, printasimage, autoscale on/off, other printer...), PDF's are always printed about 50-75% smaller than when printed with a pdfreader.

Could you please advise me?

Regards,


Nathan Moerman

Hi Nathan,


Thanks for your inquiry. Please set AutoResize and AutoRotate properties of PdfViewer to false. Kindly check this documentation link for details/code snippet. Hopefully it will fix the issue.

Moreover, while printing through Adobe Acrobat please select Actual size option form Page Sizing & Handling section.

Please feel free to contact us for any further assistance.

Best Regards,

Thanks for the quick reply.

Unfortunately the proposed changes are not working as expected. Without the auto resize, the documents are printed with a good scale but the margins are wrong. Top margin and left margin are about 5cm so the document, which fills a whole page, does not fit.

Setting the margins on the printersettings class also does not help here.
Please, find attached the pdf we want to print. Can you emulate the error with the simple code provided?
Thank you

pgs.Margins =new System.Drawing.Printing.Margins(0, 0, 0, 0);

pdfv.PrintDocumentWithSettings(pgs, prin);

Hi Nathan,


Thanks
for contacting support.

I have tested the scenario and I am able to notice the same problem that margin information is not being honored during PDF printing. For the sake of correction, I have logged this problem as PDFNEWNET-36312 in our issue tracking system. We will further look into the details of this problem and will keep you updated on the status of correction. Please be patient and spare us little time. We are sorry for this inconvenience.

Dear Aspose,

could you please give us an update about the issue PDFNEWNET-36312?

We are waiting to go live with a project using the aspose.pdf for automated printing.

Regards,

Nathan

Hi Nathan,


We are sorry for the inconvenience. I’m afraid the above reported issue is still not resolved, its pending for investigation in the queue with other priority tasks. However, we have recorded your concern and requested our development team to investigate it and share the ETA at their earliest. As soon as we get a feedback we will update you.

Best Regards,

Dear Tilal,

still no feedback?

Regards,

Nathan

Hi Nathan,


Thanks for your patience.<o:p></o:p>

The development team has been busy resolving other priority issues and I am afraid the issue reported earlier is not yet resolved. Nevertheless, I have requested the team to share the ETA regarding its resolution. As soon as we have some definite updates regarding its resolution, we would be more than happy to update you with the status of correction. Please be patient and spare us little more time.

We are really sorry for this inconvenience.

Dear,

Nathan is working in my team; I've heard this bug is currently not yet resolved.

Since this bug is a blocking issue to roll-out an important application, I need to know timing details on the resolution of this bug. Otherwise I am afraid we urgently need to search for alternatives. As we strive to standardazation within the organization then we will also need to reassess for further Aspose usage within our application landscape.

Can you please treat this bugfix with priority, and give details on resolution planning ?

Thanks in advance,

Ken Wauters
IT Project Manager and Architect @ ArcelorMittal Gent

Hi Ken,


Thanks for your feedback.

I am afraid your reported issue is not investigated yet as our development team is working over other priority tasks. We schedule issue investigation and resolution on first come first serve basis. We feel this is the fairest and most appropriate way to satisfy the needs of the majority of our customers.

However, we have recorded your concern, raised the issue priority in our internal system and requested the development team to investigate and share an ETA at their earliest. We will update you as soon as we get a feedback.

Thanks for your patience and cooperation.

Best Regards,

The issues you have found earlier (filed as PDFNEWNET-36312) have been fixed in Aspose.Pdf for .NET 9.5.0.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

Hi Ken,


Thanks for your patience. the user should set CoordinateType property to PageCoordinateType.MediaBox value. Please check complete code snippet as following. It will help you to accomplish the task.

System.Drawing.Printing.PageSettings
pgs = new System.Drawing.Printing.PageSettings();<o:p></o:p>

Aspose.Pdf.Facades.PdfViewer pdfv = new Aspose.Pdf.Facades.PdfViewer();

System.Drawing.Printing.PrinterSettings prin = new System.Drawing.Printing.PrinterSettings();

prin.PrinterName = "Microsoft XPS Document Writer";

pdfv.BindPdf(inFile);

Aspose.Pdf.Facades.PdfPageEditor pageEditor = new Aspose.Pdf.Facades.PdfPageEditor();

pageEditor.BindPdf(inFile);

if (pageEditor.GetPageSize(1).IsLandscape)

{

pgs.Landscape = true;

}

else

{

pgs.Landscape = false;

}

pgs.Margins = new System.Drawing.Printing.Margins(0, 0, 0, 0);

pdfv.CoordinateType = PageCoordinateType.MediaBox;

prin.PrintToFile = true;

prin.PrintFileName = outFile;

pdfv.PrintDocumentWithSettings(pgs, prin);

pdfv.Close();

Please feel free to contact us for any further assistance.


Best Regards,