Skip to content

Codeunit WSB_PDFMergeClient

Provides features for appending PDFs or applying underlays to PDFs.

Properties

Name Value
Access Public

Methods

wgFncActiveSubscriptionExists

Retrieves whether an active subscription exists for the PDF Merge app. Returns false if the PDF Merge app is used in a Sandbox environment.

Returns

Type Description
Boolean true iff an active subscription exists for PDF Merge

wgFncAddAppend

Add an 'append' step to the given job; meaning the POSTed PDF will be appended to the final PDF in the order they were supplied.

Parameters

Type Name Description
Guid pJobId Job id, a new job is created if this is not known.
Text pReference Your reference: friendly name for this item.
InStream pInStreamPdf The PDF to append as a stream.
Record "WSB_PDFMergeActionSettings" pRecPDFMergeActionSettings The settings for the append.

wgFncAddAppend

Add an 'append' step to the given job; meaning the POSTed PDF will be appended to the final PDF in the order they were supplied.

Parameters

Type Name Description
Guid pJobId Job id, a new job is created if this is not known.
Text vAffinityCookieHeaderValue The value of the Affinity Cookie header.
Text pReference Your reference: friendly name for this item.
InStream pInStreamPdf The PDF to append as a stream.
Record "WSB_PDFMergeActionSettings" pRecPDFMergeActionSettings The settings for the append.

wgFncAddAppend

Add an 'append' step to the given job; meaning the POSTed PDF will be appended to the final PDF in the order they were supplied.

Parameters

Type Name Description
Guid pJobId Job id, a new job is created if this is not known.
Text vAffinityCookieHeaderValue The value of the Affinity Cookie header.
Text pReference Your reference: friendly name for this item.
InStream pInStreamPdf The PDF to append as a stream.
Record "WSB_PDFMergeActionSettings" pRecPDFMergeActionSettings The settings for the append.
List vUnderlaysToApply The entry nos. of the underlays to apply.

wgFncAddUnderlay

Add an 'underlay' step to the given job; meaning the POSTed PDF will be used as a background for all pages of the final PDF.

Parameters

Type Name Description
Guid pJobId Job id, a new job is created if this is not known.
Text pReference Your reference: friendly name for this item.
InStream pInStreamPdf The PDF to use as overlay as a stream.
Record "WSB_PDFMergeActionSettings" pRecPDFMergeActionSettings The settings for the underlay action.

wgFncAddUnderlay

Add an 'underlay' step to the given job; meaning the POSTed PDF will be used as a background for all pages of the final PDF.

Parameters

Type Name Description
Guid pJobId Job id, a new job is created if this is not known.
Text vAffinityCookieHeaderValue The value of the Affinity Cookie header.
Text pReference Your reference: friendly name for this item.
InStream pInStreamPdf The PDF to use as overlay as a stream.
Record "WSB_PDFMergeActionSettings" pRecPDFMergeActionSettings The settings for the underlay action.

wgFncAppend

Append a PDF to a PDF-document.

Parameters

Type Name Description
InStream vInStreamMainPdf The main PDF file as a Stream
InStream pInStreamAppendPdf The PDF file to append as a Stream

wgFncAppend

Append a PDF to a PDF-document.

Parameters

Type Name Description
InStream vInStreamMainPdf The main PDF file as a Stream
InStream pInStreamAppendPdf The PDF file to append as a Stream
Record "WSB_PDFMergeActionSettings" pRecMainPdfSettings The settings for the main PDF.
Record "WSB_PDFMergeActionSettings" pRecAppendPdfSettings The settings for the PDF to append.

wgFncApplyMergeAction

Applies a PDF Merge to a PDF-document.

Parameters

Type Name Description
Enum "WSB_PDFMergeAction" pPDFMergeAction The merge action to perform.
InStream vInStreamMainPdf The main PDF file as a Stream.
InStream pInStreamSubsidiaryPdf The subsidiary PDF file as a Stream.

wgFncApplyMergeAction

Applies a PDF Merge to a PDF-document.

Parameters

Type Name Description
Enum "WSB_PDFMergeAction" pPDFMergeAction The merge action to perform.
InStream vInStreamMainPdf The main PDF file as a Stream.
InStream pInStreamSubsidiaryPdf The subsidiary PDF file as a Stream.
Record "WSB_PDFMergeActionSettings" pRecMainPdfSettings The settings for the main PDF.
Record "WSB_PDFMergeActionSettings" pRecSubPdfSettings The settings for the subsidiary PDF.

wgFncApplyUnderlay

Apply an underlay PDF to a PDF-document.

Parameters

Type Name Description
InStream vInStreamMainPdf The main PDF file as a Stream
InStream pInStreamUnderlayPdf The underlay PDF file as a Stream

wgFncApplyUnderlay

Apply an underlay PDF to a PDF-document.

Parameters

Type Name Description
InStream vInStreamMainPdf The main PDF file as a Stream
InStream pInStreamUnderlayPdf The underlay PDF file as a Stream
Record "WSB_PDFMergeActionSettings" pRecMainPdfSettings The settings for the main PDF.
Record "WSB_PDFMergeActionSettings" pRecUnderlayPdfSettings The settings for the underlay PDF.

wgFncCheckActiveSubscription

Checks if an active subscription exists for the PDF Merge app and throws an error if not. Also throws an error if one tries to use PDF Merge in a Sandbox environment.

wgFncFinish

Execute the given job and get the result. The job is deleted after its result is returned.

Parameters

Type Name Description
Guid pJobId Job id
InStream vInStreamPdf The result of the job as a stream.

wgFncFinish

Execute the given job and get the result. The job is deleted after its result is returned.

Parameters

Type Name Description
Guid pJobId Job id
Text pAffinityCookieHeaderValue The value of the Affinity Cookie header
InStream vInStreamPdf The result of the job as a stream.

wgFncGetJob

Get info on a job by ID.

Parameters

Type Name Description
Guid pJobId The job ID.

Returns

Type Description
JsonObject The details on the job.