How to programmatically set the attributes for PDFs?

Question ID : 281
Created on 2016-10-14 at 8:24 AM
Author : Veryant Support [support@veryant.com]

Online URL : http://support.veryant.com/support/phpkb/question.php?ID=281



In the 2016 R1 release, isCOBOL added the ability to configure attributes of a program-generated PDF file.
To set the default attributes for PDF prints in your programs, use the configuration variables that start with "iscobol.print.attribute".
For example, to set the author and encryption level of PDFs:

   iscobol.print.attribute.author=GTStone
   iscobol.print.attribute.encryption=258
You can also set the attributes for individual PDFs, overwriting the environment variable with the WIN$PRINTER op-code "WINPRINT-SET-ATTRIBUTE".
For example, this code snippet sets the subject and jpeg compression level of the next PDF to be printed:
  call "win$printer" using winprint-set-attribute 
                           "subject"
                           ws-subject-date
  call "win$printer" using winprint-set-attribute 
                           "jpeg"
                           50



Back to Original Question