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.

Tue Jul 18, 2017 7:42 am

Hi Support Team,

I have to use the Property PdfPrintPageScaling.ActualSize when printing PDFs. But when using this Option with the actual Version of spire.pdf (3.9) the print result ist shifted and not centered at the page.

With an older Version of the spire.pdf (3.2) what i was using before the print result was centered at the page.

Which Parameter I have to set to get the printed page centered when using the ActualSize Property?

best regards,
Jens
User avatar

InfraTec
 
Posts: 5
Joined: Fri Jun 16, 2017 12:51 pm

Tue Jul 18, 2017 10:13 am

Hello,

Thanks for your inquiry.
Our dev team has made some modifications on the PageScaling property, at present, when you set it as ActualSize, the the print result will lay on the top left rather than center. If you want to get approach to it, you have to do a calculation and see the margin. Never mind, I have added it as a new feature into our schedule. Once there's any progress, I will let you know. Below is the code for margin setting.
Code: Select all
PdfDocument doc = new PdfDocument();
            doc.LoadFromFile(filepath);
            doc.CustomHandleLandscape = true;
            doc.PrintDocument.DefaultPageSettings.Margins = new Margins(150, 150, 150, 150);
            doc.PrintDocument.OriginAtMargins = true;
            doc.PrintDocument.DefaultPageSettings.Landscape = false;
            doc.PageScaling = PdfPrintPageScaling.ActualSize;
            doc.PrintDocument.Print();


Sincerely,
Jane
E-iceblue support team
User avatar

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

Tue Jul 18, 2017 12:19 pm

Hello Jane,

thanks a lot for the quick reply.

With your code I got the x-direction shift working, but for y-direction it's not working. It doesn't matter what values I set for margins.top or margins.bottom, the print result is not shifted for y-direction.

Do you have any other ideas to resolve my printing Problem?

best regards,
Jens
User avatar

InfraTec
 
Posts: 5
Joined: Fri Jun 16, 2017 12:51 pm

Wed Jul 19, 2017 2:58 am

Dear Jens,

Thanks for your feedback.
Sorry that we didn't encounter the issue you mentioned with the latest Spire.PDF Pack(Hot Fix) Version:3.9.189. Please try to use this version firstly. If the issue still happens, please share us the input file and the code you were using for testing.

Many thanks,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Thu Jul 20, 2017 7:14 am

Hello Jens,

To put the print result in the center, you could take the following code as a temporary workaround. Make sure you are using the latest version Spire.Pdf3.9.226.
Code: Select all
PdfDocument doc = new PdfDocument();
            doc.LoadFromFile(filepath);
            doc.PageScaling = PdfPrintPageScaling.CustomSacle;
            doc.PrintDocument.Print();

As for the new feature, when it is finished, I will let you know.

Sincerely,
Jane
E-iceblue support team
User avatar

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

Thu Jul 27, 2017 8:39 am

Hello,

Did the temporary workaround I provided make sense? Could you please give us some feedback at you convenience?

Sincerely,
Jane
E-iceblue support team
User avatar

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

Thu Sep 14, 2017 9:42 pm

Has there been any progress on this new feature? I would also like to have my pages print in the centre of each sheet, but when I use PdfPrintPageScaling.ShrinkOversized it places the page at the top of the sheet.

milltownham
 
Posts: 29
Joined: Wed Aug 02, 2017 2:52 pm

Fri Sep 15, 2017 8:44 am

Hi milltownham,

Please make sure you are using the right version Spire.PDF Pack(Hot Fix) Version:3.9.285 bacause we made some change and adjustment in the recent versions.
Our Spire.Pdf is based on the "Portrait" orientation in the adobe print settings.
With the below details, you can have a better understanding of the four choices.

ActualSize: printing at the top left with the actual size of the page.
CustomSize: printing in the center with the custom scaling you want.
FitSize(by Default): automatically adjust the size of the content to adapt the page size
ShrinkOverSize: printing in the center with the actual size of the page.

By the way, at present we will not take the new feature into consideration bacause the "ShrinkOverSize" is for center and actual size printing.
If the issue still troubles you, please send your sample pdf file to us via email(support@e-iceblue.com).

Sincerely,
Jane
E-iceblue support team
User avatar

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

Wed Sep 20, 2017 8:10 am

Hello milltownham,

How is your issue now?
Could you please give us some feedback at your convenience?

Sincerely,
Jane
E-iceblue support team
User avatar

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

Thu Mar 19, 2020 7:28 am

Dear Jane,

long time ago we had this printing issue and now I followed up again. I donwloaded the latest version but it is not covered by my license any more. So it is useless for me.

Could you find out what is the lates version for my license I can use? My license is valid for products until 2018/6/19.

I cant find any old version at your homepage. Maybe you can send me?

Thanks and best regards,
Falk
User avatar

InfraTec
 
Posts: 5
Joined: Fri Jun 16, 2017 12:51 pm

Thu Mar 19, 2020 8:54 am

Hi Falk,

Thanks for your contacting.
Sorry to tell that there is no such old dlls on our website now. You could renew your license subscription to use the most recent version of Spire.PDF. If there is any other question, just feel free to contact us.

Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Thu Mar 19, 2020 12:24 pm

Hi Rachel,

thanks for your reply. Sorry to hear that there are no older version available at your homepage. But for sure you can send me with email?

I have a license for a product with a major bug and all I want is a bugfix for that. I think I dont need a license renewal for getting a bugfix, do I?

Thanks in advance for helping,
Falk
User avatar

InfraTec
 
Posts: 5
Joined: Fri Jun 16, 2017 12:51 pm

Thu Mar 19, 2020 12:37 pm

Hi all,

google helps. I found the package at nuget. So i will try the version 4.6.4 if it works for me.

regards,
Falk
User avatar

InfraTec
 
Posts: 5
Joined: Fri Jun 16, 2017 12:51 pm

Fri Mar 20, 2020 1:49 am

Hello,

Thanks for your response.
Glad to hear that! If you encounter any question when testing, I recommend you try the latest Spire.PDF Pack(Hot Fix) Version:6.3.0.
If your issue is still not resolved, please get back to us.

Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Return to Spire.PDF