Please enable JavaScript to view this site.

Navigation: Using Win2PDF and Win2Image > Document Settings > Auto-name Files and Configure File Save Naming

Content Based File Naming

Scroll Prev Top Next More

Win2PDF allows the file to be named based on the contents of the PDF file. This can be helpful if the application generating the PDF can't be changed to use the Win2PDF developer interface to name the PDF files.


There are two ways that Win2PDF can name documents based on the document contents.


The first content based naming method can search the text of a document, and then extract a word following the target search word. It requires that document contains text with a common search word that exists in all PDF files.

The second content based naming method uses the absolute position of the text in the document. This is defined by drawing a rectangle around the desired text using the Win2PDF Desktop Application and we will refer to it as the content field.


To determine which method will work best, you'll need to know how the auto-named files will be formatted when they are printed. If it's a form or report that has text output in exactly the same position on the page in each file, then the content field method will work best. If the information to be used in the file name is always preceded by the same word or sequence of characters, then the search word method will work best. In other words, the content field is good for fixed field position and length, and search word is better for variable positioning and (possibly) variable length.


For example, suppose you have a form from an accounting system that had a fixed location for the "Invoice Number"" value in the document, but a variable length value that followed the text "Purchase Order Number:". If you wanted to name the file based on the "Purchase Order Number:", you could use search word since the purchase order number immediately follows (though it may contain a variable number of characters). It would grab everything after the search term to the next space or the end of the line. If you wanted to name the file based on the "Invoice Number:", you could use content field since it is always in the same location and with the same number of characters.


The content based file naming features depend on the text in the document being searchable. The features will not work for scanned documents, or from applications that send text to the Win2PDF printer as graphics. To see the text searched by Win2PDF for both methods, you can create a sample PDF from your application and use the "extract text" feature of the Win2PDF Desktop Application to see the search text of the PDF.


If the document or parts of the document are not searchable, you should install the "Win2PDF OCR Add-on" setup program from:
You should also set the file name to end with a .PDFO




Note: For testing, you may try printing an existing PDF to the Win2PDF printer. Most PDF viewers such as Adobe Acrobat will convert searchable text to graphics before sending to the Win2PDF printer, and the content naming features may not work correctly. It is best to test the content features by printing directly from the reporting application.


Content based file naming cannot be used when PDF encryption is enabled.


See also:

Auto-name Files: Content Based File Naming: Search Word

Auto-name Files: Content Based File Naming: Content Field