Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Wed Oct 08, 2014 7:47 pm

When scaling a page to fit the paper, the aspect ratio is not maintained, causing distortion in the printed page. Is there any way to fix this?

Thanks

andrew.johnson@doerfer.com
 
Posts: 3
Joined: Wed Oct 08, 2014 7:24 pm

Thu Oct 09, 2014 6:30 am

Hello,

Thanks for your inquiry. It would be appreciate if you share following detail for investigation purposes.
•Please attach your sample pdf document.
•Please attach the codes you used to print the pdf document.
Thanks,
Gary
E-iceblue support team
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Thu Oct 09, 2014 1:26 pm

Attached is a zip file containing the original PDF, and a scan of the printed PDF. As you can see, the printed PDF is stretched horizontally. The paper size I am printing to is wider aspect ratio than the original file.

I have tried printing with doc.PageScaling set to FitSize, as shown below. I have also printed without defining the PageScaling property, but I get the same results.

Code: Select all
            var doc = new PdfDocument();
            var ps = new PrinterSettings();

            doc.LoadFromFile(pdfPath);

            ps.PrinterName = PrintSettings.PrinterName;
            ps.DefaultPageSettings.PaperSize = PrintSettings.PaperSize;
            ps.DefaultPageSettings.Color = PrintSettings.IsColor;

            doc.PrintDocument.PrinterSettings = ps;
            doc.PageScaling = PdfPrintPageScaling.FitSize;
            doc.PrintDocument.Print();

andrew.johnson@doerfer.com
 
Posts: 3
Joined: Wed Oct 08, 2014 7:24 pm

Fri Oct 10, 2014 9:59 am

Hello,

Thanks for sharing your information.
How much the paper size you are using to print the pdf?

Sincerely,
Gary
E-iceblue suppot team
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Fri Oct 10, 2014 1:44 pm

11 x 17 inches (ANSI B Size)

andrew.johnson@doerfer.com
 
Posts: 3
Joined: Wed Oct 08, 2014 7:24 pm

Sat Oct 11, 2014 6:58 am

Hello,

Thanks for your information. I have noticed the issue you mentioned, which has been posted to our Dev team, once there are any progress, we will let you know.
If there are any questions, welcome to get it back to us.
Thanks,
Gary
E-iceblue support team
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Wed Nov 12, 2014 8:28 am

Hello,

Sorry for long silence.
The issue has been resolved, and the newest version has been released, please download Spire.PDF Pack Version:3.2.0 and try it.
If there are any questions, welcome to get it back to us.
Sincerely,
Gary
E-iceblue support team
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Return to Spire.PDF