Avatar of ColdBlueStehl
ColdBlueStehl
 asked on

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.
Visual Basic.NETPrinters and Scanners

Avatar of undefined
Last Comment
hdhondt

8/22/2022 - Mon
Jacques Bourgeois (James Burger)

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.
ColdBlueStehl

ASKER
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?
ASKER CERTIFIED SOLUTION
Jacques Bourgeois (James Burger)

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
hdhondt

This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes