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.

Fri Jun 01, 2018 6:09 pm

Hi.

I have a pdf file format A6.

I print it
Code: Select all
using (var doc = new PdfDocument())
            {
                doc.LoadFromFile(@"D:\result.pdf");
                doc.PrintSettings.SelectSinglePageLayout(PdfSinglePageScalingMode.ActualSize);
                doc.Print();
            }


The document is printed on the center of the sheet.

How do I print in the top left corner on the sheet?

nmihey
 
Posts: 11
Joined: Fri Jun 01, 2018 6:02 pm

Mon Jun 04, 2018 2:55 am

Dear nmihey,

Thanks for your inquiry and sorry for the late reply as weekend.
Please try to use the mode "FitSize" when printing.
Code: Select all
doc.PrintSettings.SelectSinglePageLayout(PdfSinglePageScalingMode.FitSize);

If this doesn't meet your requirement, please share us your input document and the expected file you want for further investigation.

Sincerely,
Betsy
E-iceblue support team
User avatar

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

Mon Jun 04, 2018 5:36 am

Forgot to write. I print A6 document on paper A4. FitSize stretches the document on the entire sheet.

Previously on the forum wrote:

ActualSize: printing at the top left with the actual size of the page.


Now ActualSize does not work like this.

nmihey
 
Posts: 11
Joined: Fri Jun 01, 2018 6:02 pm

Mon Jun 04, 2018 5:53 am

I need
print.jpg

nmihey
 
Posts: 11
Joined: Fri Jun 01, 2018 6:02 pm

Mon Jun 04, 2018 6:10 am

Dear nmihey,

Thanks for your prompt feedback.
Please use below code:
Code: Select all
doc.PrintSettings.SelectSinglePageLayout(PdfSinglePageScalingMode.ActualSize, false);

If there is any question, welcome to write back to us.

Sincerely,
Betsy
E-iceblue support team
User avatar

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

Mon Jun 04, 2018 6:58 am

Thank you! It works.

nmihey
 
Posts: 11
Joined: Fri Jun 01, 2018 6:02 pm

Mon Jun 04, 2018 7:05 am

Dear nmihey,

Thanks for your feedback.
Any question, please do not hesitate to contact us.
Have a nice day :)

Sincerely,
Betsy
E-iceblue support team
User avatar

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

Return to Spire.PDF