Merging of PDF files

In this article, I will try to explain why some users experience problems when merging multiple documents.

The printer is designed to process print jobs in parallel. This means that it will start processing a job even before the previous job has finished processing. Consequently, you can run into trouble if you expect to merge the current print job with a previous one that has not finished yet. The result is that you get a document with missing pages.

One solution is to wait for the previous job to finish before you start the next one. This requires that you control the creation of the documents in the print queue.

Another solution is to tell the PDF printer to stop processing jobs in parallel mode and do it one by one. You control the processing with a registry setting called GUITimeout. The use of the GUITimeout setting is described in the BioPDF documentation.

Switching to sequential mode will lower the performance when processing multiple jobs. Another side effect is also that on Citrix or Terminal Servers, one user can block the job processing for another user. Other than that, the setting is safe to use.

Save to same path

Users often ask if they can make the printer save the PDF document in the same folder as the original printed document.

This is not possible because the printer does not know anything about the original document. It only processes a print job which does not contain any information about the path of the original.

DEP crashes programs on Windows Server 2008 R2

If you experience random crashes on Windows Server 2008 R2, you may have a problem with the DEP (Data execution protection).

On Windows 2008 R2 there seems to be a problem with DEP. We have seen the crashes stops if users disable it for the gui.exe process or entirely. Often the crashes are logged by the Windows Event Log. According to the log they stem from random DLL files with no association with the PDF printer.

Here is how to disable it:

Open Control Panel, click on System and Security→ System → Advanced system settings. In the Advanced tab, click on the Settings button in the Performance section (the first one). In Performance Options, Data Execution Prevention has its own tab.

The odd thing about this finding is that has only been seen on Windows Server 2008 R2. Earlier or later versions of Windows Server has not shown this problem.

Rotation of Pages

By default, the pages will be rotated automatically based on the text content in the document. However, you may want to change this default behavior from time to time. Sometimes the program cannot find any text to base the decision on. It can also be the case that you have multiple lines of text written at different angles.

You can change the default rotation options on the “Other” tab in the Options dialog.

advanced-tab

You can experiment with these settings to get the result you want.

If the text in your document is printed as graphics it cannot be used by the program to determine the orientation.

Hyperlinks in your PDF

Using hyperlinks in your PDF documents are only partially supported. The problem is that a hyperlink often consists of a text and an underlying information about the link. When the PDF printer is asked to print a document, it only sees what would normally be printed on a paper. This means that it does not receive the underlying link information.

Without the link information it can only print the text or image from the hyperlink. It is then up to the PDF reader to decide if it wants to present the text as a hyperlink or not.

Adobe Reader will look at the text and try to determine if it is a valid hyperlink or not. It will normally look for text starting with http:// or www. Therefore, it is recommended that you write the full hyperlinks in your text, so that it is recognized and useful in the PDF document.

Links inside documents, such as Microsoft Word documents, are not usable in the printed PDF document for the same reason.

If you need the hyperlink information outside these limitations, you normally need the printing program to be able to export to PDF. It will alone know what the underlying or hidden link information is.

Custom paper size

This will show you how to use the custom paper size when creating a PDF document.

Please note that you should lower your DPI setting if you create very large custom pages. Otherwise, the resulting file size will increase dramatically. You can experiment with this feature to find the right mix between file size and output resolution.

Custom Page Size Example

Let us create a small text in Notepad.

custom-paper-size-notepad

Then we print the document.

printer-dialog

Click Preferences

preferences

Go to the advanced settings

custom-pdf-page-size

Select the PostScript Custom Page Size

custom-pdf-page-size-editor

Edit the custom page size to the dimensions

custom-pdf-page-size-result

The resulting PDF should match the custom page size you selected

PDF Command

In the program folder of the PDF Printer, you will find a program named pdfcmd.exe. This is a command line utility for printing documents to PDF.

The program can handle document merge and print operations.

Usage

PDFCMD command="merge|printpdf"

Additional parameters for merge operation
-----------------------------------------
output                  File name of output PDF.
input                   Input files to merge. Multiple input files must be
                        separated by a |.
timeout (optional)      Maximum timeout in seconds for the merge
                        to finish. The default is 60 seconds.
pdfprinter (optional)   Name of PDF printer used for the operation.

Example:
PDFCMD command=merge output="C:\temp\merged.pdf" input="C:\Temp\A.pdf|C:\Temp\B.pdf|C:\Temp\C.pdf"

Additional parameters for printing PDF documents
------------------------------------------------
input                   File name of PDF document to print.
pdfprinter (optional)   Name of PDF printer used for the operation.
printer (optional)      Name of the printer that should receive the print job.
firstpage (optional)    First page to print. Default is the first page.
lastpage (optional)     Last page to print. Default is the last page.
scaletofit (optional)   Scale output to fit (yes|no). Default is yes.
bpp (optional)          Bits per pixel. Valid values are 1, 4, 8, 24 (default).
docname (optional)      Document name in printer queue.
maxdpi (optional)       Maximum DPI resolution to print.
timeout (optional)      Maximum timeout in seconds for the print
                        to finish. The default is 60 seconds.

Example:
PDFCMD command=printpdf input="C:\Temp\A.pdf"

Limitations

Since the program rely on other applications to create the print jobs, it only supports file formats where the printing programs behave well. This may cause stability issues if you run this program in a server process. Some printing programs do not handle sessions without user interaction. This means that running the job from a server process can be a bit tricky. My recommendation is that you test the usage with types of documents that you wish to print.

Global settings

The printer uses a settings file named global.ini. This file contains settings that will be forced on to all users on the machine. Normal settings are specific to the user, whereas the settings in global.ini applies to all users.

By default the global.ini is located in the folder:

C:\ProgramData\PDF Writer\Bullzip PDF Printer

The last part of the path is the actual printer name it applies to.

On different language specific versions of Windows the name ProgramData may be something different.

Migrate PDF settings to a new computer

You may find yourself in a situation where you are migrating your applications and data to a new workstation or server. The PDF printer may be part of this migration and you would like to know how to get the settings from the old machine to the new machine. In that case, this article is for you.

Install the PDF Printer

Unless you really have a good reason to install the same old version of the PDF printer as you had on the old system, I strongly recommend that you use the latest installer to install your new PDF printer. Download and install the latest available version before you try to move the configuration.

Moving the settings

The printer has a set of global settings and possibly some user specific settings to.

Global settings

In C:\ProgramData\PDF Writer\Bullzip PDF Printer you will find the global settings in a file named global.ini. You can copy this file to the same location on the new machine. These settings apply to all users on the system.

User settings

The users have their settings stored in settings.ini found in %APPDATA%\PDF Writer\Bullzip PDF Printer.

Shared option sets

Option sets shared between users are located in the folder C:\ProgramData\PDF Writer\Bullzip PDF Printer\Option Sets. The files can be copied to the new machine.

By copying the files mentioned above, you should get a PDF printer behavior, which is more or less the same as on the old system.

Transfer the License

If you have a license on your old computer, you can move it to the new computer. The license file is named license.xml. It is located it the printer’s program folder. This is typically under C:\Program Files\Bullzip\PDF Printer. Simply move the file and you are done.

Embedded fonts in merged PDF documents

When you merge PDF documents, you may see font information looking like this:

It tells you that the same font is included many times in the resulting PDF document. This will take up more space in you should try to avoid this.

The reason behind this behavior is that you are including a subset of a font every time you append a new PDF. If you use characters from the font that you didn’t already have in an included subset, it will include a new subset.

You can fix this by selecting to include the full font when you create the first PDF or the first time it is used. To do this, you should open the options dialog and select “All” in the Embed Fonts setting.

Global settings

Keep in mind that changes through the options dialog only affects the logged in user. If you want to force a setting for all uses you should add the following lines to your global settings file.

embedallfonts=yes
subsetfonts=no