Need support on installing second virtual PDF printer

Hello,

I’m working on futher integration of PDF Print Driver with our product and faced some issues. Need we have, is to install more than one printer and have a chance to identify in our application which printer was used for each single print job.  If I just install second printer in separate directory then first one is getting renamed and no new printers installed.

In the printer's directory I found the utility pdfconfiggui.exe which allow to create another printer but it doesn’t work. Newly created printer shows error when I’m trying to send print job to this printer. (btw – I tested it on Win 7 64 bits). And even if it will be created and work properly we need to resolve the following issues:

1. We need to make sure these printers physically located in different directories, because we need each printer to call it’s PrnExch.dll (it is going to be different for different printers). Another way is to extend our API and provide printer name when new print job is started. (not sure which one is simplest)

2. We need to make sure the installation of all the printers is silent (we don’t want end users to create printers by using separate utility). I found pdfconfigcmd.exe and newprinter.exe but didn’t find a way how to use it.

I’ll just remind API we are using for communication in PrnExch.dll:

PRNEXCH_API bool __cdecl                                    // true - continue / false - print job should be canceled
PrintJobStartedA(   const char * pszPrintJobName,           // [IN] Printer job name (path to initial file), can be NULL
char * pszResFilePath,                  // [OUT] Buffer for full result file path
const unsigned int uiResBufferSize);    // [IN] Size of the pszResFilePath buffer

PRNEXCH_API bool __cdecl                                    // true - continue / false - print job should be canceled
PrintJobUpdatedA(   const char * pszResFilePath,            // [IN] Result file name returned by PrintJobStarted
const unsigned int uiProgress);         // [IN] Current progress 1..100 or -1 in case it can not be provided

PRNEXCH_API void __cdecl                                    // void
PrintJobCompletedA( const char *pszResFilePath,             // [IN] Result file name returned by PrintJobStarted
const unsigned int uiErrorCode,         // [IN] 0 - success or error code
const char * pszMessage);               // [IN] User friendly error message in case uiErrorCode != 0 or NULL

Could you please assist with resolving these issues?
Let me know if I can provide any additional information.
====================================================
pdfconfiggui.exe can be used to install second printer, if you can’t get it work, please create a remote desktop account on your test machine, after we logged into your test machine, we will research this problem for you asap.

You can run following command lines (with administrator privilege) to add the new printers,

newprinter.exe printer2
newprinter.exe printer3
newprinter.exe printer4
......
......

VeryPDF
====================================================
Sorry for long delay .. after some investigation we found a way to install printers independently, so the issue is resolved for now.
====================================================
We found another issue: newprinter.exe util is getting crashed when use it on Windows XP 64 bits. On all other tested OSs it was working fine.

Could you please investigate this issue.
====================================================
Thanks for answer. Do you have any estimate about when new version is going to be available? It is a major issue for us right now, so it would be nice if we can get this fixed asap.

We found another issues when installing printer on some PCs. Below the screen shots which show this. We cannot provide remote desktop on these PCs because it is feedback from our customers. It was happening on different OSs: Win XP, Win 2008 Terminal Server.

In 90% of cases (but not in all the cases) this issue was fixed after installing .NET 2.0/3.5.

Can you please investigate this.
====================================================
Please refer to the meaning of error codes at below,

997   Overlapped I/O operation is in progress. ERROR_IO_PENDING
1797  The printer driver is unknown.           ERROR_UNKNOWN_PRINTER_DRIVER
3000  The specified print monitor is unknown.  ERROR_UNKNOWN_PRINT_MONITOR

it seems this problem is caused by "997" ERROR_IO_PENDING, we don’t know the reason of this problem, we will try to research this problem in Google.

In the meantime, you can also search it in Google by yourself, for example,

http://www.google.com/search?hl=en&source=hp&q=ERROR_IO_PENDING

VeryPDF
====================================================
We are continue getting issues with the setting printers up, so we will need your help on this. In general we need the solution which allow us to install two printer independently, it should be completely independent, located in different directories  and have different settings in registry, and it could be deleted independently as well. Can you please investigate this?
====================================================
I’d like to summarize issues we faced by today and wanted to resolve.

1. We need to have more than one printer to be installed at the same time. Currently if we are running Setup.exe for second printer first one is getting deleted. The same happens in case we are trying to delete printer by running unpdf.exe – all the printers deleted.
2. Printers cannot be installed by administrator on users PC remotely, so we need to make sure installation program (setup.exe) is MSI compatible.
3. Printer is not getting installed/removed in case of Power user.

Let me know please if you need any additional information about this, as well as if you want me to provide you with remote access to PC where all these issues can be reproduced.
====================================================
We have created a new version of PDF Printer to you, please download the new version from following URL,

XXXXXXXXXXXXXXXXX

You can run "setup.exe" to install first printer first, then you can run newprinter.exe to install second, third and other printers, for example,

newprinter.exe printer2
newprinter.exe printer3
newprinter.exe printer4
newprinter.exe printer5


>>2. Printers cannot be installed by administrator on users PC remotely, so we
>>need to make sure installation program (setup.exe) is MSI compatible.

This .zip package contains all files of virtual printer, you can create a MSI package by yourself, this can be done easily.


>>3. Printer is not getting installed/removed in case of Power user.

You can run unpdf.exe to uninstall the printers, you can also go to printer&fax folder, and remove the printers by manual.

VeryPDF
====================================================
1. This solution will not resolve our problem because we will not know which printer was used for each specific print job. In this case we will need to extend API we are using for communication to provide this information. And second issue here – if user delete Application 1 which used Printer 1 – we need to make sure Printer directory will not be deleted because Application 2 may use the same print driver in case we have created additional printer for this App.  So ideally is to have completely different code base like App 1 when installing creates its own printer, App 2 when installing creates completely separate printer in the separate directory, and each App when uninstalling deletes its printer. In this case App 1 will know nothing about App 2 and they will work completely independent.

2. Can you please explain which steps should I perform to install/uninstall printer? My concern is – we cannot use setup.exe remotely and if we try to add this file as part of MSI package its failed. I think because it require Admin rights to run. But if you can provide me with the steps necessary to install/uninstall printer I can do that by myself.

3. Issues that we have for power users is similar to previous. Power user cannot run setup.exe because it requires Admin rights. So I think if we will be able to resolve previous problem this one will be closed.
====================================================

We have created a new version of PDF Printer to you, please download the new version from following URL,

XXXXXXXXXXXXXXXXXX


>>1. So ideally is to have completely different code base like App 1 when installing creates
>>its own printer, App 2 when installing creates completely separate printer in the separate
>>directory, and each App when uninstalling deletes its printer. In this case App 1 will know
>>nothing about App 2 and they will work completely independent.

Thanks for your message, we have added this function into the new version to you, please refer to following steps to try,

1. Please copy "pdfprinter" folder to "pdfprinter2", "pdfprinter3", "pdfprinter4", etc., "pdfprinter" folder is the main printer, the other printers are sub-printers, these sub-printers will be installed from different folders,

2. Please run "pdfprinter\setup.exe" or "pdfprinter\pdfconfigcmd.exe" to install the main printer first, you will see "PDFPrinter" in the Printer&Fax folder,

pdfprinter\pdfconfigcmd.exe -printer "PDF Printer" -outfolder "C:\test" -runexe "C:\windows\system32\notepad.exe" -paper 1

3. Please run "pdfprinter2\pdfconfigcmd.exe" with "-addprinter" parameter to install the first sub-printer, printer name is "printer2",

pdfprinter2\pdfconfigcmd.exe -addprinter -printer "Printer2" -outfolder "C:\test" -runexe "C:\windows\system32\notepad.exe" -paper 1

4. Please run "pdfprinter3\pdfconfigcmd.exe" with "-addprinter" parameter to install the second sub-printer, printer name is "printer3",

pdfprinter3\pdfconfigcmd.exe -addprinter -printer "Printer3" -outfolder "C:\test" -runexe "C:\windows\system32\notepad.exe" -paper 1

5. Please run "pdfprinter4\pdfconfigcmd.exe" with "-addprinter" parameter to install the third sub-printer, printer name is "printer4",

pdfprinter4\pdfconfigcmd.exe -addprinter -printer "Printer4" -outfolder "C:\test" -runexe "C:\windows\system32\notepad.exe" -paper 1

6. You can install any number of sub-printers according your requirements, from different folders, you will see these printers in Printer&Fax folder after installation,

7. You can also run following command line to delete the printer,

delprinter.bat "Printer2"
delprinter.bat "Printer3"
delprinter.bat "Printer4"

if you have any question for above steps, please feel free to let us know.


>>2. Can you please explain which steps should I perform to install/uninstall printer?
>>My concern is – we cannot use setup.exe remotely and if we try to add this file as
>>part of MSI package its failed. I think because it require Admin rights to run. But if
>>you can provide me with the steps necessary to install/uninstall printer I can do that
>>by myself.

Yes, you need use administrator right to run setup.exe application, because setup.exe will install a printer into system, this operation is need the administrator right, so you need give enough permission to your MSI package when it run the setup.exe application.



>>3. Issues that we have for power users is similar to previous. Power user cannot run
>>setup.exe because it requires Admin rights. So I think if we will be able to resolve
>>previous problem this one will be closed.

"Install a Printer into Windows System" is need the administrator privilege, so you have to use administrator privilege to run setup.exe application, please understand.

VeryPDF
================================================== 

I just wanted to clarify a couple of things to make sure I understood you correctly, please correct if I’m wrong:
1. When I’m installing App1 I can do the following:
a) copy content of pdfprinter  folder into C:/Program Files/App1/pdfprinter directory
b) copy PrnExch.dll which is communicating with App 1 into C:/Program Files/App1/pdfprinter directory
b) run “C:/Program Files/App1/pdfprinter/pdfconfigcmd.exe” -printer "App1 Printer" to install printer for App1
2. When I’m installing App2 I need to do completely the same steps i.e.
a) copy content of pdfprinter  folder into C:/Program Files/App2/pdfprinter directory
b) copy PrnExch.dll which is communicating with App 2 into C:/Program Files/App2/pdfprinter directory
b) run “C:/Program Files/App2/pdfprinter/pdfconfigcmd.exe” -printer "App2 Printer" to install printer for App2

Please confirm the following:
1. It doesn’t matter which App installed first.
2. All settings I provided in the C:/Program Files/App{1|2}/pdfprinter/config.ini will be used for appropriate printer separately
3. I can be sure that if user is printing document by using “App1 Printer” the appropriate PrnExch.dll will be called (located in C:/Program Files/App1/pdfprinter directory) and vice versa if user is printing doc by using “App2 Printer” will be called C:/Program Files/App2/pdfprinter/PrnExch.dll.
4. If I’m uninstalling App 1 I can just call “C:/Program Files/App1/pdfprinter/delprinter.bat” "App1 Printer", then remove “C:/Program Files/App1/pdfprinter” directory and be sure “App2 Printer” continuing to work and vice versa – if I delete App 2 and call “C:/Program Files/App2/pdfprinter/delprinter.bat” "App2 Printer", then remove “C:/Program Files/App2/pdfprinter” directory, App 1 Printer will still be working.
5. I can use pdfconfigcmd.exe to install printer and delprinter.bat to delete printer on 32 and 64 bit OSs, so do I still need setup.exe, setupx64.exe, unpdf.exe and unpdfx64.exe, or I can delete It from my package? pdfconfigcmd.exe doesn’t require Admin right to run, so does it mean I can run it with user’s privilege?
6. I can run RUNDLL32 PRINTUI.DLL,PrintUIEntry /dl /n “App1 Printer” to delete the printer silently (without showing command line window) but how to install printer silently? pdfconfigcmd.exe is command line app, so the command window is shown. I see pdfconfiggui.exe in the package which is windows gui application. Can I use it with command line to make sure it will not be noisy for user?
7. If I’m using this way to install/uninstall printers I still can be sure it will work correctly on terminal servers. It was part of our previous request to you, so I just want to make sure it is not broken.
================================================
>>I just wanted to clarify a couple of things to make sure I understood you correctly, please correct if I’m wrong:
>>1. When I’m installing App1 I can do the following:
>>                a) copy content of pdfprinter  folder into C:/Program Files/App1/pdfprinter directory
>>                b) copy PrnExch.dll which is communicating with App 1 into C:/Program Files/App1/pdfprinter directory
>>                b) run “C:/Program Files/App1/pdfprinter/pdfconfigcmd.exe” -printer "App1 Printer" to install printer for App1
>>2. When I’m installing App2 I need to do completely the same steps i.e.
>>                a) copy content of pdfprinter  folder into C:/Program Files/App2/pdfprinter directory
>>                b) copy PrnExch.dll which is communicating with App 2 into C:/Program Files/App2/pdfprinter directory
>>                b) run “C:/Program Files/App2/pdfprinter/pdfconfigcmd.exe” -printer "App2 Printer" to install printer for App2

Yes, you are right, but you need run following command line to add the new printers,

pdfconfigcmd.exe -addprinter -printer "Printer2" -outfolder "C:\test" -runexe "C:\windows\system32\notepad.exe" -paper 1

You need use “-addprinter” parameter to add the new printers, if you don’t use “-addprinter” parameter, pdfconfigcmd.exe will remove all existing printers.


>>Please confirm the following:
>>1. It doesn’t matter which App installed first.

No, you need install a main printer first, the main printer can be installed without “-addprinter” parameter, e.g.,

pdfprinter\pdfconfigcmd.exe -printer "PDF Printer" -outfolder "C:\test" -runexe "C:\windows\system32\notepad.exe" -paper 1

after the main printer is installed, you can use  “-addprinter” parameter to install the sub-printers.


>>2. All settings I provided in the C:/Program Files/App{1|2}/pdfprinter/config.ini will be used for appropriate printer separately
Yes.

>>3. I can be sure that if user is printing document by using “App1 Printer” the appropriate PrnExch.dll
>>will be called (located in C:/Program Files/App1/pdfprinter directory) and vice versa if user is printing
>>doc by using “App2 Printer” will be called C:/Program Files/App2/pdfprinter/PrnExch.dll.
Yes, you are right.

>>4. If I’m uninstalling App 1 I can just call “C:/Program Files/App1/pdfprinter/delprinter.bat” "App1 Printer",
>>then remove “C:/Program Files/App1/pdfprinter” directory and be sure “App2 Printer” continuing to work
>>and vice versa – if I delete App 2 and call “C:/Program Files/App2/pdfprinter/delprinter.bat” "App2 Printer",
>>then remove “C:/Program Files/App2/pdfprinter” directory, App 1 Printer will still be working.

Yes, you are right.


>>5. I can use pdfconfigcmd.exe to install printer and delprinter.bat to delete printer on 32 and 64 bit OSs,
>>so do I still need setup.exe, setupx64.exe, unpdf.exe and unpdfx64.exe, or I can delete It from my
>>package? pdfconfigcmd.exe doesn’t require Admin right to run, so does it mean I can run it with user’s
>>privilege?

Yes, you needn’t use setup.exe, setupx64.exe, unpdf.exe and unpdfx64.exe applications, but you can’t delete them from your package, because pdfconfigcmd.exe will call them internally.


>>6. I can run RUNDLL32 PRINTUI.DLL,PrintUIEntry /dl /n “App1 Printer” to delete the printer silently
>>(without showing command line window) but how to install printer silently? pdfconfigcmd.exe is
>>command line app, so the command window is shown. I see pdfconfiggui.exe in the package which
>>is windows gui application. Can I use it with command line to make sure it will not be noisy for user?

Please open “config.ini” file in notepad application, set following options to “No”, then you can install and uninstall printers without any message box,
[installation]
PromptForDefaultPrinter=No
PromptInstall=No
PromptUninstall=No
PromptTrialVersion=No
PrinterName=PDFPrinter


>>7. If I’m using this way to install/uninstall printers I still can be sure it will work correctly on terminal servers.
>>It was part of our previous request to you, so I just want to make sure it is not broken.

The new version doesn’t affect your existing functions, you needn’t change anything to your source code, however, if you encounter any problem in the new version, please feel free to let us know, we are glad to assist you asap.

VeryPDF

==================================
I figured out that I may not provide –outfolder, -runexe and –paper parameters. It looks right because in our case it doesn’t make any sense because we are using API (see my very first email in this list) for communication. Let me know please if there are anything will be install incorrectly if I will call it as: pdfconfigcmd.exe -addprinter -printer "Printer2"

As I see I MUST (not CAN) install main printer without –addprinter parameter, otherwise it returns error “Can't get printer driver, please install PDF Printer Driver first. You can also run setup.exe to install a fresh copy of PDF Printer first.” And I MUST install second printer with –addprinter parameter. So the question here is how can I know that main printer already installed or not to create correct command line? Is there are any utils command I can call to figure it out?
==================================

>>pdfconfigcmd.exe -addprinter -printer "Printer2"

You can run above command line to add the printer into your system without any problem.

In the new version of pdfconfigcmd.exe application, you needn’t install main printer first, “-addprinter” in pdfconfigcmd.exe will check main printer automatically, if your system hasn’t main printer, it will install first printer as main printer, we hoping this change will happy to you.

VeryPDF

 

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)

Related Posts

This entry was posted in docPrint Pro and tagged . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *


Verify Code   If you cannot see the CheckCode image,please refresh the page again!