EnhancePDF

A step that is based on the EnhancePDF step template manipulates or evaluates a PDF file. The actions that manipulate or evaluate the file include rotating pages, removing pages, adding stamp annotations, and checking that the file meets PDF specifications. For each PDF job, the step receives both a PDF file and a JDF job ticket as input.

The subsequent steps in the workflow use the PDF and JDF files produced by this step.

Job property defaults

  • Action list:

Usage notes

  • Type each action, its parameters, and the parameter values on a separate line in the Action list text area.

    This example has 3 actions: RemovePages, AddStamps, and RotatePages.

    RemovePages -pages 3-4,9,12-n

    AddStamps -stampsCSV /aiw/aiw1/control_files/actions/stamp1.csv

    RotatePages -rotate 270 -pagetype landscape

    This example has one action: CheckPDF.

    CheckPDF -outputResultsFile /aiw/aiw1/checkPDF/checkPDFresults.txt

  • When this step runs, it modifies the jobID.print.pdf file and the jobID.overrides.jdf file.

Actions in base product

AddStamps
Function
This action adds a stamp annotation to selected pages of a PDF file based on page number or media name. You can see these stamp annotations in the RICOH ProcessDirector viewer or another PDF viewer. The stamp annotations are not printed.

You cannot use a program such as Adobe Acrobat to modify a stamp annotation or change its print setting.

Parameters
-stampsCSV
This required parameter specifies the full path or symbolic name of a CSV file.
Examples
To add a stamp annotation to selected pages in a PDF file using information in a CSV file at aiw/aiw1/control_files/actions/stamp1.csv , type:

AddStamps -stampsCSV /aiw/aiw1/control_files/actions/stamp1.csv

Usage notes
  • The CSV file contains a heading line and one or more body lines with values for stamp annotations.

    The heading line has this content:

    Page,Media,Image,Author,Content,Subject,XPosition,YPosition,Name

    Each body line in the CSV file contains 9 values, separated by commas:

    Page
    The page that gets the stamp annotation.
      Note:
    • A value for Page or Media is required. If you specify values for both Page and Media, RICOH ProcessDirector adds the stamp annotation to pages that meet either value.
    Media
    The name of the RICOH ProcessDirector media. RICOH ProcessDirector adds the stamp annotation to all pages for which this media name is specified.
    Image
    Required. The full directory path and name of the image file that contains the stamp annotation. RICOH ProcessDirector supports JPEG and PNG images.
    Author
    Optional. The author of the comment attached to the stamp annotation.
    Content
    Optional. The text of the comment attached to the stamp annotation.
    Subject
    Optional. The subject of the stamp annotation.
    XPosition
    Required. The horizontal distance in points from the upper left corner of the page to the upper left corner of the stamp annotation.
    YPosition
    Required. The vertical distance in points from the upper left corner of the page to the upper left corner of the stamp annotation.
    Name
    Optional. The internal name of the stamp annotation. The name does not appear on the stamp annotation or in Adobe Acrobat.

  • This CSV file adds 3 stamp annotations to PDF files:

    Page,Media,Image,Author,Content,Subject,XPosition,YPosition,Name
    3,,/aiw/aiw1/stamps/Parts_Pg_3.png,RICOH ProcessDirector,Content Page 3,Subject Page 3,72,72,Name Page 3
    ,A4 Color,/aiw/aiw1/stamps/Parts_Pg_2.png,RICOH ProcessDirector,Content A4 Color,Subject A4 Color,72,72,Name A4 Color
    4,A4 Plain,/aiw/aiw1/stamps/Parts_Pg_1.png,RICOH ProcessDirector,Content A4 Plain,Subject A4 Plain,144,144,Name A4 Plain

    The first body line adds the image Parts_Pg_3.png to page 3 of the PDF file. The author is RICOH ProcessDirector. The content is Content Page 3. The subject is Subject Page 3. The upper left corner of the image is 72 points to the right and 72 points below the upper left corner of the page. The name is Name Page 3.

    The second body line adds the image Parts_Pg_2.png to all pages in the PDF file that specify RICOH ProcessDirectorA4 Color media.

    The third body line adds the image Parts_Pg_1.png to page 4 and to all pages in the PDF file that specify RICOH ProcessDirectorA4 Plain media.

  • If 2 or more stamp annotations are specified in the same position on a page, RICOH ProcessDirector adds them all.
  • You can use symbol formulas in place of a directory path and file name.

    For example, you want to use the workflow with the EnhancePDF step for input files that require different CSV files for the AddStamps action. To set the value of the CSV file to the name of the input file plus the CSV extension, use ${Job.InputFile}.csv:

    AddStamps -stampsCSV ${Job.InputFile}.csv

CheckOrientation
Function
This action is used on the EnhancePDF step to read the first page of the PDF file to find the values that determine if the document should be printed in the portrait or landscape orientation. This action is also used on the Ricoh TotalFlow printer to set the correct orientation value in the JDF sent to the printer.
Parameters
-RPDproperty
This parameter is used in an Action list on the EnhancePDF step to specify the job property to update with the orientation value found on the first page of the PDF file. Specify Job.PDF. Orientation to see the value in the PDF orientation property on the job property notebook. This parameter should not be specified in the Action list on the printer property notebook.
-ControlUnitJDF
This parameter is used in an Action list for a Ricoh TotalFlow printer to create the correct JDF based on the value of the PDF orientation job property. Specify TotalFlow.
Examples
To set the PDF orientation job property to the value specified on the first page of the PDF file, type the following in the Action list of the EnhancePDF step in a workflow:

CheckOrientation -RPDproperty Job.PDF.Orientation

To create the correct JDF for a Ricoh TotalFlow printer to rotate the pages of a job to the orientation specified in the PDF orientation job property, type the following in the Action list of the Ricoh TotalFlow printer:

CheckOrientation -ControlUnitJDF TotalFlow

Usage notes
  • The value of the PDF orientation job property is used by a Ricoh TotalFlow printer that has the CheckOrientation action specified in its Action list property to create the correct JDF to print the job in the correct orientation.
CheckPDF
Function
This action checks whether the content of a PDF file meets PDF specifications. You can use RICOH ProcessDirector to view and print many PDF files with content that does not meet PDF specifications. However, such content can cause performance problems during printing.
Parameters
-outputResultsFile
Required. Specifies the full path or symbolic name of the output results file, which is a log file in TXT format. The output results file has messages about the results of the check. For all PDF files, including files that meet PDF specifications, the action writes messages with general information to the output results file. If the action finds content that does not meet PDF specifications, it writes error messages to the output results file. If possible, the messages give the numbers of the pages with errors.

To report progress, the action writes a message to the job log after checking 100 pages. For example:

Checked 100 pages.
Checked 200 pages.
Checked 300 pages.

-RPDproperty
Optional. Specifies the database name of a RICOH ProcessDirector job property. We recommend that you use the Job.PDFCheckResult property. If you specify another property, make sure that its data type is String.

After the CheckPDF action checks the PDF file, it sets the value of the job property:

  • If the content meets PDF specifications, the action sets the value to Pass.
  • If the content does not meet PDF specifications, the action sets the value to Fail.
  • If the content is encrypted, the action sets the value to Security.

You can process jobs in different ways based on the value of the job property. For example:

  • If the value is Pass, you can send the job directly to the branch of the workflow that prints PDF files.
  • If the value is Fail, you can send the job to a branch with steps that remove non-standard content and optimize the file.

    If you want to send the job for special processing immediately after the action finds the first error, specify the -fastFail parameter.

  • If the value is Security, you can send the job to a branch that processes encrypted files. For example, a step in the branch can email a request for an unencrypted version of the file.

You can view the value of the Job.PDFCheckResult property on the Enhance PDF tab in the job properties notebook.

-pages
Optional. Specifies individual pages to check in the PDF file:
  • Use a hyphen to separate the first and last pages in a page range.
  • Use a comma to separate page selections.
  • Use a colon followed by a number (n) to make modifications to every nth page in a page range. For example, use :3 to modify every third page in a range.
  • Use n to specify the last page.

If you do not specify this parameter, the action checks all the pages in the PDF file. Checking all the pages in a large file can take the EnhancePDF step a long time to process. To process large files faster, specify individual pages, for example, 1-10.

-fastFail
Optional. Specifies whether the action stops checking the PDF file when it finds the first error.
Values:
true
The action stops checking the PDF file when it finds the first error.
false
The action processes all the pages in the PDF file. It does not stop checking the file when it finds the first error.
Examples
This CheckPDF action checks pages 1, 5 though 10, and all the pages from page 15 to the end of the PDF file:

CheckPDF -outputResultsFile /aiw/aiw1/checkPDF/checkPDFresults.txt -RPDproperty Job.PDFCheckResult -pages 1,5-10,15-n

This CheckPDF action checks all of the even-numbered pages in the job:

CheckPDF -outputResultsFile /aiw/aiw1/checkPDF/checkPDFresults.txt -RPDproperty Job.PDFCheckResult -pages 2-n:2

This CheckPDF action stops checking the PDF file when it finds the first error:

CheckPDF -outputResultsFile /aiw/aiw1/checkPDF/checkPDFresults.txt -RPDproperty Job.PDFCheckResult -fastFail true

All three actions post messages about the content of the PDF file to the /aiw/aiw1/checkPDF/checkPDFresults.txt file. The action sets the value of the Job.PDFCheckResult job property to Pass, Fail, or Security.

RemovePages
Function
This action removes selected pages of a PDF file.
Parameters
-pages
Required. Specifies individual pages in the PDF file:
  • Use a hyphen to separate the first and last pages in a page range.
  • Use a comma to separate page selections.
  • Use a colon followed by a number (n) to make modifications to every nth page in a page range. For example, use :3 to modify every third page in a range.
  • Use n to specify the last page.
Examples
To remove pages 3, 4, 9, and all the pages from page 12 to the end of the PDF file, type:

RemovePages -pages 3-4,9,12-n

To remove all the odd-numbered pages, type:

RemovePages -pages 1-n:2

Usage notes
  • The action adjusts the media information in the JDF file to match the modified PDF file.

    For example, the JDF file specifies blue media for pages 7-8. The action removes page 3-4 from the PDF file and adjusts the JDF file to specify blue media for pages 5-6.

  • If you have the PDF Document Support feature, place the EnhancePDF step that runs this action before the IdentifyPDFDocuments step in a workflow.
RotatePages
Function
This action rotates pages in a job by 90 degrees, 180 degrees, or 270 degrees. You can specify whether to rotate portrait pages, landscape pages, or all the pages in the job.

RICOH ProcessDirector prints the PDF file with the pages rotated.

Parameters
-rotate
Required. Specifies the amount of rotation applied to pages.
Values:
first
RICOH ProcessDirector makes all pages of the specified page type match the first page in the PDF file.
  • If the first page is portrait and the page type is all or landscape, RICOH ProcessDirector rotates all landscape pages to match the first page.
  • If the first page is landscape and the page type is all or portrait, RICOH ProcessDirector rotates all portrait pages to match the first page.
When you set the -rotate parameter to first, we recommend that you set the -pagetype parameter to all.
90
RICOH ProcessDirector rotates all pages of the specified page type clockwise by 90 degrees.
180
RICOH ProcessDirector rotates all pages of the specified page type by 180 degrees.
270
RICOH ProcessDirector rotates all pages of the specified page type clockwise by 270 degrees.
-pagetype
Required. Specifies whether to rotate all landscape pages, portrait pages, or both.
Values:
all
RICOH ProcessDirector rotates all pages in the PDF file.
landscape
RICOH ProcessDirector rotates all landscape pages in the PDF file.
portrait
RICOH ProcessDirector rotates all portrait pages in the PDF file.
Examples
The first page of a PDF file is portrait. To rotate all landscape pages in the PDF file to match the first page, type:

RotatePages -rotate first -pagetype all

To rotate all portrait pages in a PDF file clockwise by 90 degrees, type:

RotatePages -rotate 90 -pagetype portrait

Usage notes
  • This action rotates pages in the PDF file, not the job ticket.
  • This action rotates the page and its content together. It does not rotate the content separately from the page.
  • To see the output of the RotatePages action, print the PDF file. If the PDF viewer rotates pages for optimum viewing, the rotation of the printed pages can differ from the viewed pages.
  • If you are correcting jobs with mixed portrait and landscape pages, consider which edge is used for binding, especially if the pages are duplexed.