There are four different naming profiles that control how the output file is named. Which naming profile is used depends on if you are creating serialized or multipaged output, and if you have the Save;UseJobID setting set to true.  It is the combination of these settings that determines which profile is used to build the output filename.

The only exception to this is when file splitting by page count (Save;SplitFileEveryNPagesEnabled) or file size (Save;SplitFileWhenFileSizeExceedsThresholdEnabled) is enabled. When file splitting is enabled, the serialized naming profile is always used to name each file in the sequence. The file splitting options are only used when creating multipaged file types.

Serialized or Multi-page

Include JobID

Naming Profile

Serialized

No

Serialized

Yes

Serialized w/ JobID

Multi-paged

No

Multi-page

Yes

Multi-page w/ JobID

 

In most scenarios you will never need to change these values. Care must be taken when you do. The table below lists the settings to use to customize the output file naming. Table values in bold text are the default value for that setting.

 

Sample Profile

 

<?xml version="1.0" encoding="utf-8"?>

<Profile Type="0"

         DisplayName="Color TIFF 300dpi Named by Page Number"

         Description ="Create color TIFF named by page number">

  <Settings>

 

    <!-- Output file options -->

    <add Name="Devmode settings;Resolution" Value="300"/>

    <add Name="Devmode settings;Color" Value="1"/>

    <add Name="Save;Output File Format" Value="TIFF Serialized"/>

    <add Name="Advanced File Naming;Format string S" Value="%s"/>

    <add Name="Advanced File Naming;Variables S"

         Value="$(PrintedPageNumber)"/>

  ...

    

  </Settings>

</Profile>

 

 

Code Sample - C#

 
PNDocConvQueueServiceLib.PNDocConvQueueItem item = null;
 
// Create the conversion item
item = new PNDocConvQueueServiceLib.PNDocConvQueueItem();
 
// Set conversion settings
item.Set("Devmode settings;Resolution", "300");

item.Set("Devmode settings;Color", "1");
item.Set("Save;Output File Format", "TIFF Serialized");

 

item.Set("Advanced File Naming;Format string S""%s");

item.Set("Advanced File Naming;Variables S",

         "$(PrintedPageNumber)");
...
// convert the file
item.Convert("Microsoft Word",
             @"C:\Test\Report.docx",
             @"C:\Test\Out\ConvertedReport");

 

Code Sample - VB.NET

 

Dim item As PNDocConvQueueServiceLib.IPNDocConvQueueItem

 

 ' Create the conversion item

item = New PNDocConvQueueServiceLib.PNDocConvQueueItem()

 

' Set conversion settings

item.Set("Devmode settings;Resolution""300")

item.Set("Devmode settings;Color""1")

item.Set("Save;Output File Format""TIFF Serialized")

 

item.Set("Advanced File Naming;Format string S""%s")

item.Set("Advanced File Naming;Variables S",

         "$(PrintedPageNumber)")

...

' convert the file

item.Convert("Microsoft Word", _

             "C:\Test\Report.docx", _

             "C:\Test\Out\ConvertedReport")

 

 

Conversion Settings - Advanced File Naming

Name:

Advanced File Naming;Format string S

 

Format string for the serialized naming profile. Also used to name the sequence of files when file splitting is enabled.

 

Values:

A string containing the format string used to create the output file name. The format string can contain placeholders %s and %d that correspond to the variables passed in Advanced File Naming;Variables S below.

 

Name:

Advanced File Naming;Use default extension S

 

Use the default file extension for the output type when naming the output file.

 

Values:

0 - Do not use default file extension

1 - Use default file extension

 

Name:

Advanced File Naming;Variables S

 

Comma-delimited list of variables that correspond to the placeholders in the format string supplied in Advanced File Naming;Format string S above.

 

Values:

See list of variables below.

 

Name:

Advanced File Naming;Format string SJ

 

Format string for serialized with JobID naming profile. In this profile a JobID, a number that is automatically incremented, is used as part of the filename.

 

Values:

A string containing the format string used to create the output file name. The format string can contain placeholders %s and %d that correspond to the variables passed in Advanced File Naming;Variables SJ below.

 

Name:

Advanced File Naming;Use default extension SJ

 

Use the default file extension for the output type when naming the output file.

 

Values:

0 - Do not use default file extension

1 - Use default file extension

 

Name:

Advanced File Naming;Variables SJ

 

Comma-delimited list of variables that correspond to the placeholders in the format string supplied in Advanced File Naming;Format string SJ above.

 

Values:

See list of variables below.

 

Name:

Advanced File Naming;Format string M

 

Format string for the multipaged naming profile.

 

Values:

A string containing the format string used to create the output file name. The format string can contain placeholders %s and %d that correspond to the variables passed in Advanced File Naming;Variables M below.

 

Name:

Advanced File Naming;Use default extension M

 

Use the default file extension for the output type when naming the output file.

 

Values:

0 - Do not use default file extension

1 - Use default file extension

 

Name:

Advanced File Naming;Variables M

 

Comma-delimited list of variables that correspond to the placeholders in the format string supplied in Advanced File Naming;Format string M above.

 

Values:

See list of variables below.

 

Name:

Advanced File Naming;Format string MJ

 

Format string for the multipaged with JobID naming profile. In this profile a JobID, a number that is automatically incremented, is used as part of the filename.

 

Values:

A string containing the format string used to create the output file name. The format string can contain placeholders %s and %d that correspond to the variables passed in Advanced File Naming;Variables MJ below.

 

Name:

Advanced File Naming;Use default extension MJ

 

Use the default file extension for the output type when naming the output file.

 

Values:

0 - Do not use default file extension

1 - Use default file extension

 

Name:

Advanced File Naming;Variables MJ

 

Comma-delimited list of variables that correspond to the placeholders in the format string supplied in Advanced File Naming;Format string MJ above.

 

Values:

See list of variables below.

 

 

Variables for Custom Naming

Variable

Type and  Format String Place Holder

Description

$(Day)

Numeric, %d

The day in numeric format that the print job was submitted to the printer, from 1-31.

$(DocumentPageNumber)

Numeric, %d

The page number of the document being printed.

$(FileExtension)

String, %s

The file extension for the type of file being created.

$(FileNumber)

Numeric, %d

The file number of the sequence of files. For multipaged output, this is always 1. For serialized output this is the number of the file in the sequence.

$(Hour)

Numeric, %d

The hour in numeric format that the print job was submitted to the printer, 1-12 or 0-23 depending on your system preferences.

$(JobID)

Numeric, %d

The unique JobID used by the printer. This is set to zero when the driver is first installed and is automatically incremented by the driver at the start of every print job. The JobID is often used to ensure that all files created have unique names.

$(JobStatus)

Numeric, %d

The status of the print job, 1 for success, 0 for failure.

$(MachineName)

String, %s

The name of the computer the print job is running on.

$(Minute)

Numeric, %d

The minute in numeric format that the print job was submitted to the printer, from 0-59.

$(Month)

Numeric, %d

The month in numeric format that the print job was submitted to the printer, from 1-12.

$(OutputFileName)

String, %s

The contents of the $(OutputFileName) field. If this field is empty the name the printing application used when submitting the print job is used.

$(PrintedPageNumber)

String, %s

The page number of the page being printed; this is not always the same as $(DocumentPageNumber).

$(Second)

Numeric, %d

The second in numeric format that the print job was submitted to the printer, from 0-59.

$(UserName)

String, %s

The name of the user who submitted the print job.

$(Year)

Numeric, %d

The year in numeric format that the print job was submitted to the printer.

 

Default Naming Profile Strings

Profile

Format String

Variables and Resulting File Names for TIFF Creation

Serialized

%s_%3d

$(OutputFileName)

$(FileNumber)

 

C:\Test\Invoice_001.tif

C:\Test\Invoice_002.tif

C:\Test\Invoice_003.tif

...

Serialized w/ JobID

%3d_%s_%3d

$(JobID)

$(OutputFileName)

$(FileNumber)

 

C:\Test\010_Invoice_001.tif

C:\Test\010_Invoice_002.tif

C:\Test\010_Invoice_003.tif

...

Multi-page

%s

$(OutputFileName)

 

C:\Test\Invoice.tif

Multi-page w/ JobID

%3d_%s

$(JobID)

$(OutputFileName)

 

C:\Test\011_Invoice.tif