Visual Studio 2010 AxAcroPDF override print function

I am using the Adobe Reader COM component to display a PDF on a windows form. I want my users to be able to print the pdf by using the floating toolbar within this tool. The problem I am having is the paper size. In this instance, I need to print to legal size paper, not letter, which is the printer default. Is there a way to override the print setting to automatically print to legal paper? I don't need to send to another printer - the default printer has the ability to print to legal. I just don't want the user to have to remember to change the paper size every time they hit the print button.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

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.

Jacques Bourgeois (James Burger)PresidentCommented:
It's been years since I worked with the Adobe PDF tools through programming, and I do not have that old code anymore. So I cannot give you a complete answer, and it might not be good for more recent versions of the tools. But here is what we did in these days.

We found an entry somewhere in the Windows Registry that defined the default printer. We thus simply recorded that entry, changed it temporarily for the printer that we needed, and then reset the setting to its original value once the printing was done.

There was one drawback with that method. If you have long print jobs, it's possible that the user switch to another window from which he will also try to print, and he may not notice that the default printer has been changed. You thus might want to display a warning message while your printing job is going on.
ColdBlueStehlAuthor Commented:
Thanks for taking the time to comment, though your solution isn't quite what I'm looking for.

I don't need to change the default printer. The printer can print legal size sheets, but it's default paper size is set to letter.
What I do need is the ability to print to legal automatically, without user interaction.  

When you define your own print dialog in vb, you can make changes to the PrintDialog to define almost any setting you need. Is the print dialog used by this add-in exposed in the same way? If so, how do you gain access to it? If not, is there another way to accomplish what I need?
Jacques Bourgeois (James Burger)PresidentCommented:
In my experience, the Adobe tools were very limited. That is why we had to resort to many little tricks here and there in order to to what we wanted.

For the paper size, we went for the same trick. We found and entry for Letter in the registry that was associated with a key for our printer, and switched it to Legal while we were printing some reports. However, I understand that not all printers record their settings in the registry.

But after lot of frustrations we ended up using a freeware that we found at ComponentSource. It was very easy to use and gave us more options than the Adobe PDF Writer that made us lose so much time. Unfortunately, I do not remember the name of the component, and anyway, it did not make it past Vista, so I cannot suggest it to you. You might give them a look however, they might have another one that comes free or cost very little.

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
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
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
Visual Basic.NET

From novice to tech pro — start learning today.