In order to demonstrate how to insert PDF bookmarks we will go through the process necessary to insert these bookmarks when creating a PDF file based on the InterForm400 demo spooled file:
The idea is, that the first level contains information of the customer number. Each customer could have subsidaries in different cities, so level 2 refers to each zipcode and city. Level 3 finally points out each contact person for each subsidary.
From the InterForm400 main menu select 5. Work with Auto Forms Control and 6. PDF bookmark definitions followed by F6=Create to start creating a new PDF bookmark definition:
Create PDF Bookmark definition BMK310D
Bookmark definition name . DEMOSPOOL_
Description . . . . . . . Bookmarks for the Demo Spooled File
Display bookmarks at open. 1 0=No 1=Yes
|
Above we have stated a name and description for the definition and decided, that the bookmarks should be visible when opening the PDF file later. Press Enter to proceed. Here you will see a list of bookmark detail lines, that is empty. Press F6=Create to create a new sequence line:
Create PDF Bookmark details BMK330D
Sequence number . . . . . 000
Description . . . . . . . All_pages_________________________
Type option, Press Enter. 1=Select
Opt Definition _ Page selection _ Initial open level _ Level-1 _ Level-2 _ Level-3 _ Level-4 _ Level-5 _ Level-6
F3=Exit F12=Cancel
|
Through Page selection we could have inserted conditions so we could handle bookmark differently for some of the pages, but as this spooled file is the same for all pages, this will not be used here.
Initial open level tells to what degree the bookmarks should be expanded. Here we use '1' as we want this display when we open the PDF file:
The definitions for the individual levels are shown below:
Level-1
Field Prefix Print line Position 1 Cust._No._______ _13 _57 - _60 2 ________________ ___ ___ - ___
Color _3 F4=List
|
Level-2
Field Prefix Print line Position 1 Zip_____________ __8 __8 - 11 2 City____________ __8 _13 - 40
Color _5 F4=List
|
Level-3
Field Prefix Print line Position 1 _______________ _11 __8 - _35 2 _______________ ___ ___ - ___
Color _8 F4=List
|
When done defining the levels you just press Enter several times and the bookmark definition has been saved.
As the final thing we want to use the PDF Bookmark definition. You can do it in this manner:
•Create the demo spooled file.
•With the same interactive job you go to a command line and type the command:
APF3812/MRGSPLFPDF KARTSET(SAMPLE) KLICHE(IF400DEMO) FILNVN(QPRINT) SPLNBR(*LAST) BMKDEF(DEMOSPOOL) OUTTYPE(*VIEW)
This will create a pdf file with the same name as your user ID in the /APF3812Home/VIEW directory. If you have access to this directory from your PC and you have associated .PDF with Acrobat Reader it will show you the result automatically.
Go through the setup described here, if Acrobat Reader does not start or does not show the PDF file.