Defaulting choose paper source by PDF page size ?


I have a situation where we are programatically sending a generated PDF file to a print queue, the issue is; the end result is not selecting the right output format (landscape or portrait).

Basically we have a Service running on that machine that generates the PDF report, then sends it to the print queue on that PC.

If I open the PDF file on that machine, I can File > Print and the output will come out "portrait" which is how it should, however if the PDF is automatically sent to the printer after it is generated, it ignores the PDF layout (landscape) and comes out portrait.

If I manually print the file using Acrobat from the machine it was generated at, it detects the page size automatically and prints landscape, however when passed to the printer through the application service it dees not.

Is this something I can control from the OS or would this need to be adjusted programatically when the process is sending the PDF to be printed?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Mike ThomasConsultantCommented:
Default print settings on the server AND client print settings can impact this so I would check and tinker with both.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mirdeAuthor Commented:
The client generates the report, the back-end creates the PDF on the server which has a print queue setup of a network printer close to this user.

When its generated, the service sends the print job to the printer, but the landscape/portrait settings are ignored.

If I hop on the report server, and manually print the pdf by invoking

AcroRd32.exe /p <pdffile> and set their printer as the default queue on the reprot server, it sends the print job and the output is fine.

But when the service handles this, for some reason its ignored...

The only difference here is, im doing it while interacting with the desktop, and the service is running as a Local System Account.
Mike ThomasConsultantCommented:
Is it possible to create another printer on the print server (using the same printer) but set the defaul to landscape and see if it works?
mirdeAuthor Commented:
Yes, I have tested it like that and it does work if I manually set the Defaults on the printer.

But ideally I want to make this work with just using one printer queue and not having to have a "landscape" or "portrait", and having the end user chose based on their report when the generated PDF is already aware of its "page size".

Bogs my mind why it would work when I manually open the PDF and print it to the queue that has default settings and when the service sends it there, it ignores the PDF settings.
mirdeAuthor Commented:
Default printer settings were able to control this.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Acrobat

From novice to tech pro — start learning today.