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.

Thu Jan 25, 2018 2:49 pm

When i print a PDF (attached) in real size from Acrobat, it fits correctly in the page (left picture attached).
When i print the same PDF with Spire.PDF library, the whole page is pulled up 0.5 cm to the top of the page (right picture attached).
All the content of the page has the good scale, it is only the whole position that is too high.

Here is the code i used :
var spire = new Spire.Pdf.PdfDocument();
spire.LoadFromFile(entete.Pdf, Spire.Pdf.FileFormat.PDF);
spire.PrintSettings.SelectSinglePageLayout(Spire.Pdf.Print.PdfSinglePageScalingMode.CustomScale, customScaling: 100);
document = string.Format(@"{0}\TempPRN\{1}.prn", Properties.Settings.Default.ExportPath, entete.Key);
spire.PrintSettings.PrinterName = printer.driver;
spire.PrintSettings.PrintToFile(document);
spire.Print();


I've tried to adjust the spire.PrintSettings.SetPaperMargins or several parameters of spire.PrintSettings.SelectSinglePageLayout but the result is always the same : the prints from adobe and from spire are not exactly the same.

Do you reproduce this problem or do I have to search a parameter in my printer or in my code to adjust the margins ?
Thanks
Last edited by mlecontert on Fri Jan 26, 2018 8:40 am, edited 1 time in total.

mlecontert
 
Posts: 9
Joined: Thu Aug 31, 2017 10:49 am

Fri Jan 26, 2018 6:58 am

Hi,

Thanks for your inquiry.
After an initial investigation with the latest hotfix(Spire.PDF Pack Version:3.10), sorry that I didn't reproduce the issue you mentioned. Attached is the result.
Please upgrade your dlls and try again. If the issue still exists, just come back to us.

Sincerely,
Jane
E-iceblue support team
User avatar

Jane.Bai
 
Posts: 1156
Joined: Tue Nov 29, 2016 1:47 am

Fri Jan 26, 2018 8:40 am

Hello, my problem seems to be solved in 3.10. The Hot Fix Version:3.9.538 talks about Fixes the issue that the margin is incorrect after printing, i think it is the same problem i experienced.
I should have a look to the release notes and tryed the last version before querying support ...
Thanks for your great support !

mlecontert
 
Posts: 9
Joined: Thu Aug 31, 2017 10:49 am

Fri Jan 26, 2018 9:10 am

Hello mlecontert,

Thanks for your feedback.
The cause of your problem is not the same as the one in v3.9.538, and we are always looking for bugs and get them fixed in order to make our products much better. Anyway, glad to hear your issue has got resolved in the hotfix.
Just feel free to contact us if you need any help.

Sincerely,
Jane
E-iceblue support team
User avatar

Jane.Bai
 
Posts: 1156
Joined: Tue Nov 29, 2016 1:47 am

Return to Spire.PDF

cron