dcpdf_MakePDFDoc

Creates a PDF document that contains one or more pages of the current document.

Member of namespace

dcpdf

Syntax

bool dcpdf_MakePDFDoc(strParam)

Parameters

Comma-separated parameters: IncludeFieldText, PageTypes.

The IncludeFieldText parameter can be True or False.

True: stores recognized field data that is associated with the TIFF image of each page in the PDF file to make a searchable PDF. The text data is not visible, but it is searchable.

False: inserts the image of a page into the PDF file, the recognized text is not inserted.

The PageTypes parameter is a list of one or more page types to include in the PDF output. The page types in the list are separated by commas.

If no parameters are provided, IncludeFieldText defaults to False and all document pages are included in the PDF.

If only the IncludeFieldText parameter is provided, all document pages are included in the PDF.

Smart parameters are supported.

Returns

False if the action is not run at the Document level; if there are no pages in the document; or if an error occurs while the PDF file is being created. Otherwise, True. If there are pages in the document but none of them match the specified page type, the action does not create a PDF file and still returns True.

Level

Document Level.

Details

Creates a PDF document that contains one or more pages of a document. The PDF format can contain only the original image or it can contain the image along with the recognized text to make the PDF searchable.
Note: The dcpdf_MakePDFDoc action supports only the English language.

Only zoned field text is included if the input parameter is True and is searchable within the PDF. The searchable text might not accurately reflect the text position within the original input image. If you need the entire page text to be included as searchable text, or more accurate alignment, use one of the recognition actions to create the PDF, such as RecognizeDocToPDF from the OCR_S library.

To exclude specific page types, set the variable typesToExclude to a comma delimited list of page types to exclude from the PDF.

To include specific page types, set the variable typesToInclude to a comma delimited list of page types to include in the PDF.

To exclude specific page status, set the variable statusToExclude to a comma delimited list of page status to exclude from the PDF.

When more than one filter is specified, the following order of precedence takes place:
  • statusToExclude overrides typesToInclude
  • typesToInclude overrides typesToExclude

If you are calling the action at the Document level, the types and status filters apply to both the documents and their child pages.

If you are calling the action at the Page level, the types and status filters apply to the page only.

These variables must be set before you call the RecognizeToPDFOCR_A action.

Example:
rrSet("75","@D.statusToExclude)
rrSet("Blank","@D.typesToExclude)
dcpdf_SetTitle("MedicalClaims")
dcpdf_SetSubject("Validated")
dcpdf_SetAuthor("Steven Moffat")
dcpdf_SetProducer("Russell Davies")
dcpdf_SetApplication("MClaims")   
dcpdf_MakePDFDoc("True")

This example sets several properties of the PDF file and creates a PDF that contains the recognized text along with all of the page images for the current document. Pages whose type is "Blank" and status is "75" are skipped.

dcfpdf_MakePDFDoc("False,Main_Page")

This example does not include the field text and exports only the page types of type Main_Page.

dcfpdf_MakePDFDoc("True,Main_Page,Trailing_Page")

This example includes the field text and exports only the page types of type Main_Page or Trailing_Page.