Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

Wed Apr 22, 2015 6:55 am

Hello,
I have created a word .doc document, I want to save it (=convert) as a .pdf.
This is the code:

Dim MyDocumentA As New Document()
Dim SezHeader As Section = MyDocumentA.AddSection()

With (SezHeader.PageSetup)
.PageSize = PageSize.A4
.Orientation = PageOrientation.Landscape
end with

MyDocumentA.SaveToFile(MyNewPdf, Spire.Doc.FileFormat.pdf)

If I save it as a word document (MyDocumentA.SaveToFile(MyNewDoc, Spire.Doc.FileFormat.doc) it works fine and creates an A4 word document with landscape orientation,
but if I save it as a pdf document as above, it creates an A4 pdf document with portrait orientation....

Cane anyone help me?
Thank you,
Paola

paolagumi
 
Posts: 81
Joined: Tue Apr 21, 2015 11:32 am

Wed Apr 22, 2015 7:41 am

Hello,

Thanks for your inquiry.
I have failed to reproduced your issue with the version(5.3.83) of Spire.Doc, please download it from the following link and try again:
http://www.e-iceblue.com/Download/downl ... t-now.html
In addition, I attach the result document, please check it.
If there are any questions, welcome to get it back to us.

Best Regards,
Betsy
E-iceblue support team
User avatar

Betsy
 
Posts: 802
Joined: Mon Jan 19, 2015 6:14 am

Fri Apr 24, 2015 3:32 am

Dear Paola,

Has your issue been resolved? Could you please give us some feedback at your convenience?

Best Regards,
Betsy
E-iceblue support team
User avatar

Betsy
 
Posts: 802
Joined: Mon Jan 19, 2015 6:14 am

Fri Apr 24, 2015 8:32 am

Yes, my issue has been resolved,
the .pdf is A4 vertical, but it's printed horizontal.
So anyway it works fine.

thank you

paolagumi
 
Posts: 81
Joined: Tue Apr 21, 2015 11:32 am

Fri Apr 24, 2015 9:23 am

Hello,

Thanks for your response.
I have reproduced the issue the document is printed horizontal, and posted it to our dev team. Once there are any process, we will let you know.

Best Regards,
Betsy
E-iceblue support team
User avatar

Betsy
 
Posts: 802
Joined: Mon Jan 19, 2015 6:14 am

Mon Apr 27, 2015 9:24 am

Hello,

After investigation, it is right that the document is printed horizontal because the direction of out of paper is fixed.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy
 
Posts: 802
Joined: Mon Jan 19, 2015 6:14 am

Tue Oct 13, 2020 3:00 pm

Hello,

I have the same problem today with version 8.10.0.
When I set the orientation of the only section to landscape and save the document as .docx, the orientation is correct.
But if I save it to .pdf the paper size seams to be ok, but the content i cut as if it´s still in portrait mode.

Best regards Daniel

Rbok_Develop
 
Posts: 1
Joined: Sat Sep 05, 2020 9:21 am

Wed Oct 14, 2020 5:54 am

Hi Daniel,

Thanks for your inquiry.
After an initial test, I didn't find the issue you mentioned. To hlep us investigate further, please provide your input document(if any) and the code you were using.
You could upload the file here or send to us(support@e-iceblue.com) via email.

Sincerely,
Betsy
E-iceblue support team
User avatar

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

Fri Oct 16, 2020 8:34 am

Hi Daniel,

Hope you are doing well.
Has your issue been resolved? If not, please provide your input document(if any) and the code you were using

Sincerely,
Betsy
E-iceblue support team
User avatar

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

Return to Spire.Doc