This content has been marked as final. Show 10 replies
> Pls tell me the programmatic way that set/get the current printer.
What kind of OS? For MS Windows you must use the Windows API.
Thanks for reply.
OS is Windows XP SP2.
Which the Windows API must I use?
Look for GetDefaultPrinter and SetDefaultPrinter in the Windows API.
I think the current printer is not the default printer.
I have 2 printers, PRA and PRB.
PRA is the default printer.
1st AxAcroPDFLib.AxAcroPDF.printAllFit() prints to PRA.
Then change the default printer to PRB.
2nd AxAcroPDFLib.AxAcroPDF.printAllFit() prints to PRA.
Maybe it's the same instance? Each application sets printer = default
printer when it starts.
Then, I try to using 2 instances.
Now, PRB is the default printer.
Launch the 1st instance then prints to PRA.
Then change the default printer to PRA.
Launch the 2nd instance then prints to PRA.
Launch the Adobe Reader and open the pdf document and select printer to PRB then prints to PRB.
After that, the 1st instance and the 2nd instance print to PRB!
I feel that behind your two instances you have a single copy of Adobe
Reader, which bound to a printer when it started. This is just a
guess, but worth checking: try making sure Adobe Reader is absolutely
stopped (in task manager) between invocations.
I found a single copy of Adobe Reader(AcroRd32.exe) in [task manager].
Must be sure that this AcroRd32.exe sets the current printer to the
default printer when this AcroRd32.exe launched.
Anyway, why setting/getting the current printer methods/properties
do not exist in AxAcroPDFLib.AxAcroPDF?
>Anyway, why setting/getting the current printer methods/properties
> do not exist in AxAcroPDFLib.AxAcroPDF?
That's very hard for your fellow users to answer, but you must be
aware that the Adobe Reader APIs are very limited specifically to
support sales of Acrobat.
I gave up to use the method AxAcroPDFLib.AxAcroPDF.printAllFit().
Thanks for all.