You can define a user-defined PDF storage path in the PDF printer settings. In this chapter we will show you how to do this in the classic way using a desktop installation via the print dialog or as a PDF network printer, and what you need to keep in mind!
Set output storage path in PDF network printer installations
For example, you can specify a fixed output path (Setting: Output) for the PDF printer in the global.ini configuration file. If you work without a print dialog, for example if you install our PDF printer as a PDF network printer, you specify a path here with the setting option Output. The whole topic how to set up a PDF network printer is described here. So far not really difficult. It is worth mentioning that each PDF printer instance has its own global.ini, or more generally described...each PDF printer instance has its own configuration files.
If you install the PDF printer as a network printer with
/SHARE /PRINTERNAME="MY_NETWORK_PRINTER" (installation parameters for the setup), then under
C:\ProgramData\PDF Writer\MY_NETWORK_PRINTER\Output automatically a directory structure is created, under which each user who addresses the PDF network printer and prints, automatically receives his own user directory. From here he can download or call his PDFs. As admin you can selectively share this user folder, e.g. connect a volume to it which every user can access within his session.
We recommend to use the default path at
C:\ProgramData\PDF Writer\MY_NETWORK_PRINTER\Output on the so called "Printer Server System" where 7-PDF Printer has been set up as a PDF network printer.
If they wish to deviate from this...
If you want to change this directory structure and use your own path (UNC is also supported), you have to consider that the user SYSTEM gets write access to this output directory. If you use our software in the context of a PDF network printer, the same service is executed as SYSTEM user of the PDF print server system.
So if PDF files are not written to a changed output path, the SYSTEM user running 7-PDF Printer often has no write permissions! Also, non-dynamic parts of the path must exit (no macro tags) if they are part of the overall path. Because otherwise the PDF that was printed goes into nirvana. This is an important hint for all who want to set up the printer accordingly.
We have here also documented all possible "macro tags", such as
<smarttitle>...that you can use in the output path. They are dynamic because they are "filled" by the PDF printer.
It should also be shown that in a PDF network printer installation the print job knows the user who submitted the print job, but the processes on the print server itself run in the rights context of the SYSTEM user.
Set output storage path in standard desktop installations using PDF Printer dialog
There is a special feature to consider if you want to specify a PDF output path (UNC paths are also possible), i.e. if you use the classic PDF print dialog. Then it is not sufficient to specify only in the global configuration file global.ini an Output path. Because, the print dialog remembers here in this use, the last time used path and file name (GUI check mark) stubbornly. The "checkmarks" responsible for this are framed in red in the following screenshot.
So you have to deactivate these options. To do this "globally" for the PDF printer, it is not enough to uncheck the checkboxes in the options dialog of the PDF printer, then this would only be done for the one user under which you started the options dialog.
If you want to set it GLOBAL, you have to hard disable the settings responsible for it in a configuration file like the global.ini. The settings for this are
RememberLastFileName. How to do this is shown in the following global.ini
To copy out the necessary global.ini settings content here again listed differently:
[PDF Printer] ; This is a sample global.ini file. ; It illustrates some common settings that can be found of this type of ini file. ; All lines prefixed with a semicolon are comment lines. Remove the semicolon on the lines below to activate the settings. ; More information on the individual settings can be found in the documentation. ;DisableOptionDialog=yes ;WipeMethod=3pass ;ShowSaveAS=always ;ShowSettings=never Output=\\Server\Share\<smarttitle>.pdf RememberLastOptionSet=no RememberLastFolderName=no RememberLastFileName=no
So when executed in the user context, our 7-PDF Printer will have the read/write permissions of the current user. So here in the following screenshot under thorsten:
Set output storage path with VBScript macros
So a VBScript macro to set a fixed output path would look like this from a coding point of view, because there is exactly the same "issue" to deal with here in GUI Mode:
Sub OnConfigLoaded() Rem -- also works if you set it like this in the Global INI context("Config")("rememberlastoptionset") = "no" context("Config")("rememberlastfoldername") = "no" context("Config")("rememberlastfilename") = "no" context("Config")("output") = "\\Server\Share\<smarttitle>.pdf" End Sub
So if you copy this code under the installation path of the PDF printer, and there into the macros directory, and name the VBScript file for example
path_change.vbs, the macro would be executed automatically by the printer and would preassign the output save path fixed with
If you then press "Save", the PDF will be written to this output directory path, if it exists and is "writable" (Windows write permissions). ... ;-)!
Note: Keep in mind that the user can still decide freely - whether he uses this fixed storage path. He can still change it via the GUI. Safe from user manipulation is a configuration without GUI such as a PDF network printer or if you disable the GUI use globally. There are also settings that can be set to achieve this. The most important ones can be found in the chapter about setting up the printer as network printer (below, see
An alternative that shows how flexible and individually configurable 7-PDF Printer is is the possibility to disable/hide certain controls and parts of the print dialog user interface via the global.ini configuration file if you want to. Our PDF printer offers some options here as well. This alternative may also prevent user manipulation that you don't want, yet you keep the comfort of a GUI for large parts of the PDF creation.