One more bug found in docPrint PDF Driver

One more bug found: When I attempt to print a file with a Long name it gets terminated. Total No of characters = 228
=======================
Thanks for your message, can you please let me know how can I reproduce your problem in our system? Can you please email to us the sample document in question for test purpose?

VeryPDF
=======================
You can just get any PDF document, place it in the root of C: drive, rename it to be as many characters as possible, for example DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD.pdf ?, open in acrobat reader and attempt to print.

Let me know if you still cannot reproduce this problem.
=======================
We have find out the reason of this problem, we are using fopen() function to create the file, fopen() will fail if the length of filename longer than 256 characters, so, your filename + filepath can’t longer than 256 characters, please understand this matter.

We suggest you may rename this long filename to a short filename before printing, is this okay to you?

VeryPDF
=======================
In my case it fails even if [drive name] + [path] + [file name] less than 256 characters. For example if I place the document with name [240 characters name].pdf to root of C: drive , so it will be 3+240+4=247 characters it still doesn’t work. Are you creating temp file somewhere in temp directory? So temp path is added to this file name?
=======================
Yes, you are right, we are create the temp file in the temp directory, maybe the length of temp path + temp file more than 256 characters, so it will cause fopen() function failed. You can check the log message in the setup.log file, we hoping this log message will helpful to you.

VeryPDF
=======================
Ok, got it. So why do we need to create completely the same file name in the temp directory? Is it possible to create file with any name (use GUID for example)? Because we don’t know which files users attempt to print, and if user prints file which is located in the root of drive it may be up to 250 characters. In this case print job just deleted without any errors, it looks strange and may cause additional questions from users. Sa my proposal would be to create temp file name and provide correct name of the document in to printJobStarted function.
=======================
We have solved long filename problem to you, please download new version of pdfcp.exe from following URL,

XXXXXXXXXXXXXX

please use new version of pdfcp.exe to overwrite old version, this problem will be solved properly.

VeryPDF
=======================
Now here is another problem: in case of long file name it is replaced to be something like pdfXXXX, that is fine, but this name is also translated as a print job name in to printJobStarted function – that is wrong. In the printJobStarted we should receive original print job, name, not pdfXXXX, because it will be shown to user.
=======================
We have solved this problem to you, please download new version of pdfcp.exe from following URL to try again,

XXXXXXXXXXXXXXXXXX

because we have printJobStarted DLL Library, so we can’t test printJobStarted function easily, if you encounter any problem, please email to us the setup.log file, after we checked this log file, we will come back to you asap.

VeryPDF
=======================
Unfortunately it still doesn't work. Now I'm getting print job name "Output". Please see attached log.
=======================
We have solved this problem to you, please download new version of pdfcp.exe from following URL to try again,

XXXXXXXXXXXXXXXXXX

if you still have same problem, please email to us the log file, then we will come back to you asap.

VeryPDF
=======================
Sorry for long delay, had a couple of days off .. Here is my update:
1. Regarding this issue - now it looks fixed. The only difference I found - now it provides more information into printJobStarted. For example if previously when I print from notepad it was just file_name, now it looks like notepad - file_name. In general it's OK, but if it is not a big deal would be better to fix this as well. Just to avoid additional questions from customers. Like why my print job names changed? 🙂

2. Issue related to installation (I sent it in past) - unfortunately we could not get customer verifying solution you proposed (stop/start net spooler). So I was needed to implement some work around for this like: 1) try to install printer by using pdfconfigcmd.exe. 2) Verify if printer is installed, and if not run setup.exe/setupx64.exe. It seems to be working but in future we may get issues with this solution once we are attempting to install second printer. Because setup deletes all other installed printers. So if you have any ideas why it may happens please let me know. Probably it would be better to modify setup.exe/unpdf.exe to install/remove only specific printer and not affect other printers installed in system?

3. When working with the issue related to having 2 empty extra pages in the end of printer document (remember we had this problem when Cute PDF is installed in the system because pdfcp.eex used installed ghostscript instead of from local folder) - I figured out that when we installing XXX PDF, it doesn't require administrative privileges to install/remove printer - so my question is do we definitely need admin rights to install our printer? It seems printer can be installed without having administrative privileges, at least other software can do this. So, can we please double check - do we definitely need this?
=======================
1). OK, fixed this problem, now the filename is become "file_name" to instead of "notepad - file_name".

Please download the new version of pdfcp.exe from following URL to try again,

XXXXXXXXXXXXXXXX

2). Thanks for your message, in fact, after pdfconfigcmd.exe install the printer, it will use OpenPrinter() function to try open the target printer, if it can’t open the target printer, it will print the error message, this will ensure target printer is installed properly.

Do you have a way to reproduce this problem in your system? If yes, you may run Teamviewer application on your test machine, we will assist you to analyse where is wrong in your system, is this okay to you?

Also, setup.exe/setupx64.exe/unpdf.exe/unpdfx64.exe will delete all installed printers, they will delete print port and printer drivers too, we feel difficult to change them to delete just one printer only, please understand. However, we will assist you to analyse where is wrong in the pdfconfigcmd.exe, we sure this problem can be solved in a short time.

3). As far as I know, you have to use administrator privilege to install the printer, because installer will copy some necessary files into your system, if installer hasn’t administrator privilege, it can’t copy these files into system properly.

You can also refer to AddPrinter Function at following web page,

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

~~~~~~~~~~~~~~~~~
Note:  This is a blocking or synchronous function and might not return immediately. How quickly this function returns depends on run-time factors such as network status, print server configuration, and printer driver implementation—factors that are difficult to predict when writing an application. Calling this function from a thread that manages interaction with the user interface could make the application appear to be unresponsive.

The caller must have the SeLoadDriverPrivilege.
~~~~~~~~~~~~~~~~~

Microsoft is said AddPrinter Function must have the SeLoadDriverPrivilege.

However, I will research XXX PDF's product shortly, maybe they are using a different method to bypass the administrator privilege.

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!