Page 1 of 1

PDFPrinter.RestoreDefaultPrinter doesn't work

Posted: Mon Nov 15, 2010 9:08 am
by Sage Software
Dear Support,

in your code example "VbExCOM" (build 187) we commented out the line:

Code: Select all

PDFPrinter.SetAsDefaultPrinter
Nevertheless, after executing the line

Code: Select all

Set PDFPrinter = PDFPFactory.Printer("", "PDF-XChange 4.0 Sample", "<YOUR REG CODE>", "<YOUR DEV CODE>")
PDF-XChange is the default printer on that system.
After that the line

Code: Select all

PDFPrinter.RestoreDefaultPrinter
doesn't work, PDF-XChange is still the default printer. So this last line doesn't work.

Re: PDFPrinter.RestoreDefaultPrinter doesn't work

Posted: Tue Nov 16, 2010 5:07 pm
by Tracker Supp-Stefan
Hello,

I have asked our dev guys to comment on that and we would be back with an answer soon.

Best,
Stefan

Re: PDFPrinter.RestoreDefaultPrinter doesn't work

Posted: Tue Nov 16, 2010 6:49 pm
by Ivan - Tracker Software
PDF-XChange is the default printer on that system.
You mean PDF-XChange or PDF-XChange 4.0 Sample? Creation of the printer doesn't make it as default in system.

Re: PDFPrinter.RestoreDefaultPrinter doesn't work

Posted: Fri Nov 19, 2010 12:27 pm
by Sage Software
We tested a little bit further. When we use "RestoreDefaultPrinter" with the older build 160, it is working. When we use it with the newest build 187 it is not working.

Re: PDFPrinter.RestoreDefaultPrinter doesn't work

Posted: Fri Nov 26, 2010 12:02 am
by John - Tracker Supp
Hi,

I think the point your missing is that assuming you have not manually set PDF-XChange as the default printer and have not done so in your code - then simply initiating the printer will not set it as the default printer - it would appear that it is already the default printer before runnig the application - assuming that you have 100% for sure not set it as being so anywhere in your code.

If you are certain that it is being set as the default and is not already set as such - or anywhere in your code - please supply a small sample app showing this (both compiled and source/project code) and we will take a loo - please also advise the Windows O/S.

Pls not all files must be zipped if uploading here and all license info removed.

Thanks

Re: PDFPrinter.RestoreDefaultPrinter doesn't work

Posted: Fri Dec 03, 2010 7:50 am
by Sage Software
Hi Tracker-Support,

here is a little sample application showing and describing our problem. It is a Microsoft Access project (.adp) using the old Access format (Access 2003), but it is developed in Access 2010.
As far as we know the problem occurs regardless of the operating system. But we explicitly tested it on Windows 7 64bit and Windows XP 32bit. And we already tested your newest build 188.

1. Unzip the file "PDFTest-Forum.adp" and start it with Access 2010
2. Open the module "basSageUtils" and add your reg code and dev code in the procedure "gInitPDFPrinter"
3. Open/Start the form "SageForm"
4. Press "Init PDF-Printer"
5. Read the messages carefully and you'll see, that "RestoreDefaultPrinter" doesn't work

We do need to call "SetAsDefaultPrinter" because otherwise the temporarily generated PDF-printer is not available in the Access printers collection (at least not in Windows Vista or Windows 7)

I hope, now you can reproduce our problem.

Best regards

Re: PDFPrinter.RestoreDefaultPrinter doesn't work

Posted: Fri Dec 03, 2010 5:23 pm
by Ivan - Tracker Software
Sorry, but no, I cannot: by default I have my "HP Universal Printing PS" as default printer.
With you application I have sequence of the following messages:

"New PDF-Printer found = PDF-XChange 4.0 (1)"
"StandardPrinter after SetAsDefaultPrinter = PDF-XChange 4.0 (1)" (as it is default in system now)
"StandardPrinter after RestoreDefaultPrinter = HP Universal Printing PS"

Can you try on another computer if the problem exists? Looks like it is something specific for your system, it would be useful in assisting to see if this can be reproduced on another system as I cannot reproduce here ...

Re: PDFPrinter.RestoreDefaultPrinter doesn't work

Posted: Wed Dec 15, 2010 7:59 pm
by Ivan - Tracker Software
Is the printer, which is thed default before PDF-XChange becomes the default printer, a network or local one?

If it's a network one, I'm glad to say the problem is fixed and the fix will be available in build 190 of the driver.

Please could you let us know - so we know if we need to continue to look for an issue when the original printer is a local one - currently we cannot reproduce any issue if the original printer
is a local printer.

Thanks

Re: PDFPrinter.RestoreDefaultPrinter doesn't work

Posted: Tue Sep 06, 2011 1:59 pm
by Sage Software
Sorry for the delay. After the last answer we didn't check for newer ones.

Yes, the printer in question was a network printer. So we download the newest version and check for this problem again.

Re: PDFPrinter.RestoreDefaultPrinter doesn't work

Posted: Tue Sep 06, 2011 3:54 pm
by Tracker Supp-Stefan
:)