5.0.1.9 Prompt for filename

The Amyuni PDF Converter is our Printer Driver that enables you to convert any documents to PDF format. If you have any questions about installing and using the Amyuni PDF Converter please post them here.
Post Reply
aroncox
Posts: 36
Joined: Fri May 15 2009

5.0.1.9 Prompt for filename

Post by aroncox »

Amyuni PDF Converter 5.0.1.9

I am printing a document from Word in code and if the PDF filename contains a full-stop (.) the 'Output File Name' dialog is displayed by Amyuni, which I don't want it to do. If the filename doesn't have a full-stop then it works without a prompt. Other users using the same code do not have this problem, it just uses the filename as expected. It's code that has been around for ages. I am calling SetDocFileProps followed by DefaultFileName. I have run it on my machine and just can't get the dialog to display, it always works as expected.

I checked the registry and it seems the correct filename has been written to it just before I call the print.

Here is what was in the registry (HKEY_CURRENT_CONFIG\Software\Trace PDF Converter\File Name) just before the print. Registry File Name: \\win16svr\Correspondence_25.05_T10012_(3).pdf which looks like a reasonable file name to me.

I am using Lock, but it it the same code for everyone.

Any ideas on what makes this happen?

Thank you!
Jose
Amyuni Team
Posts: 553
Joined: Tue Oct 01 2002
Contact:

Re: 5.0.1.9 Prompt for filename

Post by Jose »

Hello,

I suspect that the 'Output File Name' dialog is displayed because the document title you are passing to the Lock() \ SetDocFileProps() may not be correct.

The Lock() function requires the developer to pass the function the document title that is going to be printed. This is same document title that will appear in the print spooler. When implementing the Locking mechanism one way to quickly check how your printing application is generating document titles is to first pause the PDF Converter and then print to it. In the print spooler you will see the document name to use.

In the registry key below you will find subfolders called “locks” and “jobs”. Please delete these folders and try printing a couple of times for your application. If either the “locks” and “jobs” folders contain subfolders after these tests, then there is an issue with your document name you are passing to the “Lock()” function.

HKEY_CURRENT_CONFIG\Software\Amyuni PDF Converter

Finally one of the parameters passed to the SetDocFileProps() is the default filename. You do not need to call the DefaultFileName() again.

Thanks
Get PDF Suite, the expert .NET developer toolkit for PDF conversion, creation and editing - www.amyuni.com/pdfsuite
aroncox
Posts: 36
Joined: Fri May 15 2009

Re: 5.0.1.9 Prompt for filename

Post by aroncox »

Thank you. It seems you are right. I took out the locking code and the SetDocFileProps, and now it is working okay, although of course not in a multi-user system. Also, There were a bunch of locks and jobs folders hanging around so it definitely seems like that is the issue. I suspect I'd be better off getting the licence key that writes to HKEY_CURRENT_USER rather than a shared part of the registry, so I may request that in the future :)

I still don't understand why it's failing for this user and not others and only when . is used in the file name, but if I can I'll try to track that down next week so I can fully understand what's going on. Hopefully I can pause the Amyuni printer and see what document name is being used in the printer queue. It's slightly harder in that the user is not in my office and is also very busy. There were a bunch of locks and jobs folders hanging around so it definitely seems like that is the issue.

However the new licence key is likely to be the easiest and most future proof solution I think.

Thanks.
Jose
Amyuni Team
Posts: 553
Joined: Tue Oct 01 2002
Contact:

Re: 5.0.1.9 Prompt for filename

Post by Jose »

Hi,

The “Per User Activation Code” causes the PDF Converter to write printer settings to the HKEY_CURRENT_USER. Since HKEY_CURRENT_USER registry is different for every user, this is essentially the same functionally as the Lock\UnLock functions.

Thanks
Get PDF Suite, the expert .NET developer toolkit for PDF conversion, creation and editing - www.amyuni.com/pdfsuite
Post Reply