Howto set PDF filenames automatically?

You can ask general questions, share opinions or advices about doPDF.
Post Reply
Ratio
Posts: 4
Joined: Mon Mar 26, 2012 7:35 pm

Post by Ratio »

Howto set PDF filenames automatically?
Hello,
our application produces, depending on user choices, several thousand different documents at one call, circular letters etc...
Converting them to PDF works very fine with doPDF/novaPDF, without any special settings.
But there is a real problem:

We found no way, to set the path/PDF-filenames AUTOMATICALLY by our program sending its output to doPDF or novaPDF.
This would force the users to spend the whole blessed day just to input thousand different PDF-Filenames!!
We searched and tried hours in the many, many (by us not needed) options of doPDF, novaPDF/OEM/SDK.
Could not find a solution for this technically really very BASIC problem.
It could, in my opinion, simply be solved if there would be such thing like a USER.INI file

which could be written by our appl programmatically -
SETTING PATH UND PDF FILENAME FOR EACH PRINTOUT AUTOMATICALLY.
Perhaps we simply could not find this basic option within all the other options.
If anybody has a tip, it would be very much appreciated.
Otherwise Softland should include this really BASIC option in a new version of doPDF.
Ratio


Claudiu (Softland)
Posts: 1565
Joined: Thu May 23, 2013 7:19 am

Post by Claudiu (Softland) »

Hello,
With doPDF it is not possible indeed to automatically set the folder and find name and it is not possible to hide the save dialog. But these features are possible with novaPDF. You may configure novaPDF to automatically save the PDF files in a specific folder and do not show the save as dialog. More then that, novaPDF uses "option profiles" and each user may have its own profile with different save settings.

If you wish to change the save options programatically from your application, this is possible with novaPDF SDK. The SDK includes a COM interface that may be used in applications to programatically set novaPDF printer options. Using the SDK you may change the save options before each print job.
Thank you.

Follow us to stay updated:

Ratio
Posts: 4
Joined: Mon Mar 26, 2012 7:35 pm

Post by Ratio »

Thanks for your answer.
But please tell me, how to set the PDF-filenames with novaPDF SDK.

Which command is appropriate for that? Could not find it.
Thank you.


Claudiu (Softland)
Posts: 1565
Joined: Thu May 23, 2013 7:19 am

Post by Claudiu (Softland) »

Hello,
Please install novaPDF SDK on your computer, open one of the samples available with the installation ( or access the following link http://www.novapdf.com/en/samples-sdk.html to download the sample that is most suited to your application ) and check for all the necessary settings within.
Thank you.

Follow us to stay updated:

Ratio
Posts: 4
Joined: Mon Mar 26, 2012 7:35 pm

Post by Ratio »

I did this before I asked my question, dear Key Master.
If you do not have an answer... then there IS no answer and no possibility. :-(
Ratio


Claudiu (Softland)
Posts: 1565
Joined: Thu May 23, 2013 7:19 am

Post by Claudiu (Softland) »

As an example, this is the C++ sample part where you change the folder and file name programatically:
// set resulting folder

pNova->SetOptionString(NOVAPDF_SAVE_FOLDER, L"", PROFILE_NAME, PROFILE_IS_PUBLIC);

// set resulting file name

pNova->SetOptionString(NOVAPDF_SAVE_FILE, PDF_FILE_NAME, PROFILE_NAME, PROFILE_IS_PUBLIC);

//do not show prompt dialog

pNova->SetOptionLong(NOVAPDF_SAVE_PROMPT, 0, PROFILE_NAME, PROFILE_IS_PUBLIC);

//if file exists, override

pNova->SetOptionLong(NOVAPDF_SAVE_CONFLICT_STRATEGY, FILE_CONFLICT_STRATEGY_OVERWRITE, PROFILE_NAME, PROFILE_IS_PUBLIC);
You can find this part in the C++ sample available at the link provided in the previous reply.
However this is only an example script so you have to change and adapt the code for these settings to your own application following the programming language type (c++, php, asp.net, c#, delphi etc.).

Follow us to stay updated:

Ratio
Posts: 4
Joined: Mon Mar 26, 2012 7:35 pm

Post by Ratio »

Thank you.

But couldn't it be a little more complicated?
Oh yes, there indeed appears in all the other stuff a "PDF_FILE_NAME" and (at another location) a so called "NOVAPDF_SAVE_FOLDER"

And you need all that in each language different?

What if we do not use all these languages?
Question:

Why not keep it easy?

Why not use the normal way to call external exes with a few params (in our case just one: path+filename)?

Why not using language idenpendent ini-files, i.e. text files read at start by doPDF/novaPDF?
But thanks for your hint.

If we really try to use that, we have quite a lot todo - to solve absolutely needless problems.
Ratio


crisoftpc
Posts: 1
Joined: Wed Jan 11, 2017 10:14 pm

Re: Howto set PDF filenames automatically?

Post by crisoftpc »

Hola creo que di con el santo Grial.
este es el archivo REG que me he preparado.
------------------------------------------------------------------------------------------------------------------------------
Windows Registry Editor Version 5.00

[HKEY_USERS\S-1-5-21-3860372442-240979260-1234986916-1136\Software\Softland\doPDF\Printers\doPDF v7]
"AlwaysUseFolder"=dword:00000001
"AlwaysUseFolderName"="C:\\Users\\cristian.gomez\\DOWNLOAD"
"PDFFileNameAdd"="C:\\Users\\cristian.gomez\\Desktop\\rep_fac_agentes_espanol.pdf"
"PDFFileNamePrint"="C:\\Users\\cristian.gomez\\Desktop\\rep_fac_agentes_espanol.pdf"
------------------------------------------------------------------------------------------------------------------------------

aquí ya cada quien hace magia con lo que quieran escribir el editor de registros.
obviamente hay que hacer dinámico esto.

Post Reply