PDA

View Full Version : excel to pdf print



Borut
10-27-2020, 03:42 AM
Hello,

I like to have landscape orientation pdf (when select "file", and "print "). In Excel is ok. When I run macro, pdf is ok (landscape)
But when I select print, orientatiov is Portland, not landscape

IncludeDocPropertis:=True doesnt work.

It possible to force landcape orientation to print setup?

Logit
10-27-2020, 10:42 AM
.
ActiveSheet.PageSetup.Orientation = xlLandscape

Borut
10-27-2020, 11:07 PM
not working. When selected in pf file, print, pagesetup, orienatation in Portland. Beacuse my page is landscap, must be printed landscape (pdf print).

Paul_Hossler
10-27-2020, 11:18 PM
I usually do it like this



Sub Example1()
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:="C:\Users\Me\Documents\test3.pdf", _
Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, _
OpenAfterPublish:=False
End Sub

Borut
10-28-2020, 01:26 AM
Yes, code is the same. PDF (when I open with maro) is ok, orientation landscape. If I liked too print it, must manual select landscape orientation.
I try some codes from internet, but nothing Works

Logit
10-28-2020, 07:01 AM
.
https://stackoverflow.com/questions/23118877/save-as-pdf-in-landscape

Borut
11-02-2020, 06:40 AM
not working.

PDf is landscape orientatio. but when I select icon "printer", is Portland orientation. I can not force lanscape orientation

Paul_Hossler
11-02-2020, 05:30 PM
1. Can your printer print landscape?

2. What program are you using to print?

3. Adobe Reader does it just fine

27398

Borut
11-25-2020, 03:32 AM
1.yes, I can print landscape
2. I open pdf with pdf adobe acrobat
3. in excel, is landscape orientation, when I convert to pdf, pdf is landscape orientation.
But when click print, is marked Portland (print window is the sama as yours).
I dont know why

Logit
11-25-2020, 10:28 AM
.
Here's a stab in the dark ... update your printer drivers.

Borut
06-01-2021, 11:44 AM
I remove page breaks and add rows, that the page is full (excel separate pages). only this help