landscape printing, how

This Forum is for the use of Software Developers requiring help and assistance for Tracker Software's PDF-XChange Printer Drivers SDK (only) - Please use the PDF-Tools SDK Forum for Library DLL assistance.

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Sean - Tracker, Chris - Tracker Supp, Tracker Supp-Stefan, Ivan - Tracker Software, Andrew - Tracker Support, Tracker - Clarion Support, John - Tracker Supp, Support Staff, moderators

Post Reply
rystrom
User
Posts: 2
Joined: Fri Jun 22, 2007 8:59 pm

landscape printing, how

Post by rystrom » Sat Jun 23, 2007 12:00 am

Hi All,

Our company has been using PDF-XChange for the last year or so and it has been working well for us. I have now received a request to print in landscape mode and can't figure out how to do it programmatically.

Our setup is that we populate Internet Explorer with a custom html page, change the default printer to PDF-XChange, and then command Internet Explorer to print via automation. At no time do we have access to the print dc.

I looked through the "Driver API messages" for registry communication with the driver but can't find anything like "General.Orientation".

After switching the default printer to PDF-XChange I also tried the SetLandscapeMode example in MSDN help on CWinApp::GetPrinterDeviceDefaults. However, it still printed out as portrait.

Suggestions?

Thanks,

Larry

John - Tracker Supp
Site Admin
Posts: 8203
Joined: Tue Jun 29, 2004 10:34 am
Location: Vancouver Island - Canada
Contact:

Post by John - Tracker Supp » Mon Jun 25, 2007 9:32 am

Hi,

The MSDN example referred to changes only the LOCAL printer's properties (Local for the application) - not the GLOBAL (default) one.

Therefore - as you use an external application (IE) for printing and have no access to its internal code, you need to set the global printer properties.

To do this you can use a combination of the functions GetPrinter/SetPrinter with a Level parameter 8.

Pls see MSDN for more info

HTH
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com

rystrom
User
Posts: 2
Joined: Fri Jun 22, 2007 8:59 pm

Thanks

Post by rystrom » Fri Jun 29, 2007 7:38 pm

Thanks for the suggestion about GetPrinter/SetPrinter. I was able to get it to work.

Larry

John - Tracker Supp
Site Admin
Posts: 8203
Joined: Tue Jun 29, 2004 10:34 am
Location: Vancouver Island - Canada
Contact:

Post by John - Tracker Supp » Fri Jun 29, 2007 8:28 pm

excellent Larry - thanks for coming back :)
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com

Post Reply