Skip to content

Codeunit WSB_PDFMergeSetup

A codeunit for setting up and applying PDF merges.

Properties

Name Value
Access Public

Methods

wgFncApplyPDFMerges(Integer, Enum::WSB_PDFMergeScenario, InStream@):Boolean

Applies configured PDF Merges to the passed PDF document.

Parameters

Type Name Description
Integer pReportID The ID of the report used to generate the PDF document.
Enum "WSB_PDFMergeScenario" pPDFMergeScenario The scenario in which the merge actions are applied.
InStream vInStreamOutputDoc The PDF Document as a Stream.

wgFncApplyPDFMerges(Integer, InStream@):Boolean

Applies configured PDF Merges to the passed PDF document.

Parameters

Type Name Description
Integer pReportID The ID of the report used to generate the PDF document.
InStream vInStreamOutputDoc The PDF Document as a Stream.

wgFncApplyPDFMerges(Integer, WSB_PDFMerge@, InStream@):Boolean

Applies the passed PDF Merges to the passed PDF document.

Parameters

Type Name Description
Integer pReportID The ID of the report used to generate the PDF document.
Record "WSB_PDFMerge" vRecWSB_PDFMerge The PDF Merges (as a record set/filtering)
InStream vInStreamOutputDoc The PDF Document as a Stream.

wgFncClearPDFMergeFile(WSB_PDFMerge@)

Clears the merge PDF for the passed export profile.

Parameters

Type Name Description
Record "WSB_PDFMerge" vRecWSB_PDFMerge The PDF Merge record

wgFncExportPDFMergeFile(WSB_PDFMerge@)

Exports a PDF file of a PDF Merge record, prompting the user for a destination to save the file.

Parameters

Type Name Description
Record "WSB_PDFMerge" vRecWSB_PDFMerge The PDF Merge record.

wgFncExportPDFMergeFile(WSB_PDFMerge@, Codeunit::System#Utilities#Temp Blob@)

Exports a PDF file of a PDF Merge record and saves it to a Temp Blob.

Parameters

Type Name Description
Record "WSB_PDFMerge" vRecWSB_PDFMerge The PDF Merge record.
Codeunit "Temp Blob" vCduTempBlob A Temp Blob to save the merge PDF to.

wgFncGetPDFMergeDefaultFileName(Enum::WSB_PDFMergeAction):Text

Gets the default file name for importing/exporting PDF merge PDF files.

Parameters

Type Name Description
Enum "WSB_PDFMergeAction" pPDFMergeAction The PDF Merge Action Type.

Returns

Type Description
Text The default file name for this merge action type.

wgFncGetPDFMergeFileExtension:Text[3]

Gets the PDF Merge PDF file extension.

Returns

Type Description
Text[3] The file extension of PDF files used by PDF Merge.

wgFncGetPDFMergeFileFilter:Text

Gets the PDF Merge PDF file filter used when importing files.

Returns

Type Description
Text The file filter for importing PDF files.

wgFncImportPDFMergeFile(WSB_PDFMerge@)

Imports a merge PDF file for a PDF Merge record, prompting the user to upload a PDF file.

Parameters

Type Name Description
Record "WSB_PDFMerge" vRecWSB_PDFMerge The PDF Merge record.

wgFncImportPDFMergeFile(WSB_PDFMerge@, Codeunit::System#Utilities#Temp Blob, Text)

Imports a merge PDF file for a PDF Merge record..

Parameters

Type Name Description
Record "WSB_PDFMerge" vRecWSB_PDFMerge The PDF Merge record.
Codeunit "Temp Blob" pCduTempBlob The Temp Blob containing the merge PDF.
Text pPdfFileName The file name of the merge PDF.

wlEvpOnAfterGetPDFMergeScenarioFromDocumentPayload(Text, JsonObject, Enum::WSB_PDFMergeScenario@, Boolean@)

Allows to hook into retrieving the PDF Merge Scenario from the document payload (provided by the OnDocumentReady event).

Parameters

Type Name Description
Text pIntentAsText The intent as text.
JsonObject pDocumentPayload The document payload.
Enum "WSB_PDFMergeScenario" vPDFMergeScenario The PDF Merge Scenario inferred from this.
Boolean vArchiveScenarioSupported Whether or not this merge scenario is supported.

wlEvpOnBeforeApplyPDFMerge(WSB_PDFMerge, Guid, Text@, Boolean@, Boolean@)

Allows to hook into the moment before a PDF merge is applied.

Parameters

Type Name Description
Record "WSB_PDFMerge" pRecWSB_PDFMerge The PDF Merge record to apply the merge action for.
Guid pJobId The ID of the merge job that is being processed.
Text vAffinityCookieValue The ARRAffinity cookie header value for the job.
Boolean vApplied Whether the PDF Merge action was successfully applied.
Boolean vIsHandled Set this to true if your extension handled the PDF merge.

wlEvpOnBeforeApplyPDFMerges(Integer, WSB_PDFMerge@, InStream@, Boolean@, Boolean@)

Allows to hook into the moment before PDF merges are applied.

Parameters

Type Name Description
Integer pReportID The ID of the report object for which the PDF merges are about to be applied (if there are any applicable PDF merge actions).
Record "WSB_PDFMerge" vRecWSB_PDFMerge PDF Merge record filters.
InStream vInStreamOutputDoc The original PDF document as InStream.
Boolean vIsHandled Set this to true if your extension handled the PDF merges.
Boolean vSuccess Whether the PDF merges were applied successfully.

wlEvpOnBeforeShouldApplyPDFMerge(Integer, WSB_PDFMerge, Boolean@, Boolean@)

Allows to hook into the moment before PDF Merge determines whether a merge should be applied.

Parameters

Type Name Description
Integer pReportID The ID of the report object for which the PDF merges are about to be applied
Record "WSB_PDFMerge" pRecWSB_PDFMerge The PDF Merge record to check for if it needs to be applied.
Boolean vApplyPDFMerge Set this to true if the PDF Merge record's merge action should be applied.
Boolean vIsHandled Set this to true if your extension handled the check for the PDF Merge record.