PDF Bundle OPTIONS value calculation

Solved a problem in an elegant manner and want to show off your code? Know a hard-to-find feature? Post it here for the benefit of others. Questions don't belong here.
Post Reply
steve
Posts: 402
Joined: Wed Nov 30, 2011 10:20 pm
Been thanked: 88 times

PDF Bundle OPTIONS value calculation

Post by steve » Thu Jun 21, 2018 8:58 pm

The below table helps you calculate the required "OPTIONS (x)" value if you want to control e.g. page numbering position, bookmarks etc of a PDF bundle from within Proclaim Maths, rather than define them fixed in Workflow Maintenance.
Image
Say we have a PDF bundle template that when produced from a Linked Action we want each document to start on an odd page (512) , and print on production (256), with bookmarks (64), a 'total number of pages' (32), including the word 'PAGE'(16), and place the page number bottom centre (5)

then we add up each decimal value for that selected configuration bit:
512 + 256 + 64 + 32 + 16 + 5 = 885

Our resulting Maths would be

Code: Select all

SEND LETTER (BUNDLE01) TO (COURT) COST UNITS (0.00) DETAIL (Court Bundle) ATTACH (Claim Form, Particulars of Claim, Client Statement) OPTIONS (885) CASE (CURRENT-CASE) 
Example 2:
Include "PAGE" (16) + Include page number top left (1)
our maths is:

Code: Select all

SEND LETTER (BUNDLE01) TO (COURT) COST UNITS (0.00) DETAIL (Court Bundle) ATTACH (Claim Form, Particulars of Claim, Client Statement) OPTIONS (17) CASE (CURRENT-CASE) 
You can then substitute a field or a variable for the OPTIONS (x) and have your bundle change according to your needs at runtime.

In a simple scenario, you could pre-program a handful of useful OPTIONS values into an option field table, so the user can select from a dropdown where they want page numbering at runtime for example, and it will pull through the correct OPTIONS number.

Or you could go the whole hog with some crude binary to decimal conversion based on OPTION(y/n) tickboxes on a screen of your own making to give complete control over bundle parameters to users on a screen.

Code: Select all

voption = 0
if {each doc to start on new page.Code} = "yes" then
voption = voption + 512
end
if {print on production.Code} = "yes" then
voption = voption + 256
end
#..etc
SEND LETTER (BUNDLE01) TO (COURT) COST UNITS (0.00) DETAIL (Court Bundle) ATTACH (Claim Form, Particulars of Claim, Client Statement) OPTIONS (voption) CASE (CURRENT-CASE) 
I would be interested to know if anyone has time to work out what bits 3 and 7 do. I imagine one of them is "include blank section page" but this is always greyed out in the scenarios I have used.

Post Reply