Printer selection in PDFPrint Command Line application

I have a query regarding printer selection using your PDFPrint command line printing utility.
We have a customer that intends to use PDFPrint to print a mixture of A3 and A4 documents to different printers. The documents are directed to a specific printer according to business rules.
While testing this, I have been given an example of the wrong printer being selected.
In this scenario there are two printers, \\eros\wh_ricoh8200_1 and \\eros\wh_ricoh8200. Our application issued the following command to send a document to the wh_ricoh8200_1 printer:

pdfprint -debug -chgbin 260 -paper 8 -printer \\eros\WH_RICOH8200_1 "d:\pdf\Document.pdf"

The "debug" output from PDFPrint was captured in a text file, which appears to show that the WH_RICOH8200_1 printer is selected, as expected, but in the last line the “_1” suffix has disappeared. I am told that the document was sent to the \\eros\wh_ricoh8200 printer.

Load 'WINSPOOL.DRV' file OK.
Current default printer is '\\eros\WH_RICOH8200_1'.
AddPrinterConnection to '\\eros\WH_RICOH8200_1' printer, return code = 1.
SetDefaultPrinter to '\\eros\WH_RICOH8200_1' printer, return code = 1.
Analyze paper size (8).
Retrieve paper size from 'd:\cachesys\csp\OPS\pdf\OR1332399-CombinedStationery.pdf' file.
Paper size of 'd:\cachesys\csp\OPS\pdf\OR1332399-CombinedStationery.pdf' is: 4201x2970 mm
Retrieve paper orientation from PDF file.
Change settings to '\\eros\WH_RICOH8200_1' printer.
Change settings to '\\eros\WH_RICOH8200_1' printer OK.
Your input file = 'd:\cachesys\csp\OPS\pdf\OR1332399-CombinedStationery.pdf'.
Printing 'd:\cachesys\csp\OPS\pdf\OR1332399-CombinedStationery.pdf' file...
Print "d:\cachesys\csp\OPS\pdf\OR1332399-CombinedStationery.pdf" file.
Try to open 'd:\cachesys\csp\OPS\pdf\OR1332399-CombinedStationery.pdf' file...
Open "d:\cachesys\csp\OPS\pdf\OR1332399-CombinedStationery.pdf" file OK.
MyPrint(0x3E6B80,0,0,0,0)...
MyPrint, DevString = '\\eros\wh_ricoh8200,winspool,Ne33:'

Have I misinterpreted the last line of the “debug” output ?
Is there an issue with the length of a printer name, or particular characters in it ?

Thanks.

Regards,
=====================================
Yes, it is maybe caused by length of a printer name, we suggest you may rename printer name to try again.

Also, just for checking, can you print your PDF file correctly by following command line?

Pdfprint.exe -raster2 -printer "\\eros\8200" C:\test.pdf

Can you work fine with above command line?

VeryPDF
=====================================
Many thanks.
I will try your suggestions.

For future reference, what is the maximum length of a printer name that PDFPrint supports ?
Or does PDFPrint not care about the length, just that the first (leftmost) n characters are unique ?  For example, if I have two printers named "\\Server\PrinterWithALongName" and "\\Server\AnotherPrinterWithALongName", would PDFPrint accept these names because their first 10 characters are unique ?

Regards,
=====================================
The length of printer name is not controlled by our pdfprint.exe application, it is controlled by Windows system.

We suggest you may add -raster2 parameter to try again, the -raster2 parameter may work better for you, for example,

Pdfprint.exe -raster2 -printer "\\eros\wh_ricoh8200_1" C:\test.pdf

Will you work better with -raster2 parameter in your system?

VeryPDF
=====================================
Sorry, perhaps I didn't make my question clear.
In my original e-mail to you I suggested that the “debug” output from PDFPrint appears to show that the \\eros\wh_ricoh8200_1 printer is selected, but then the “_1” suffix is lost :

Change settings to '\\eros\WH_RICOH8200_1' printer.
Change settings to '\\eros\WH_RICOH8200_1' printer OK.

MyPrint, DevString = '\\eros\wh_ricoh8200,winspool,Ne33:'

In reply, you said " it is maybe caused by length of a printer name".
I understand that the printer name is set in Windows, not in PDFPrint, but it is the PDFPrint application which appears to have malfunctioned, given that it starts with the printer name "\\eros\wh_ricoh8200_1" and ends with "\\eros\wh_ricoh8200", resulting in the document being sent to the wrong printer.
How long must a printer name be to be too long for PDFPrint ?
Is there a problem running multiple concurrent instances of PDFPrint ?
Our customer has PDFPrint installed on their server, to which terminals connect to run our application, which executes PDFPrint. If multiple users print PDF documents at the same time, might this cause problems ?  Does PDFPrint create temporary data that could be corrupted by anoher process, for example ?

Thanks.
=====================================
This problem is caused by Windows system, we are using following code to read the default printer name,

GetProfileString(_T("windows"), _T("device"), _T(",,,"), szDevString, 120);

Please refer to more example code at following web page,

http://msdn.microsoft.com/en-us/library/dd183521%28v=vs.85%29.aspx

also, if you have already purchased PDFPrint Command Line product, please email to us your Order ID, we will send a new version of pdfprint.exe to you, we will try to solve this problem in the new version of pdfprint.exe.

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

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!