Compressing and Encrypting Treatment Plan .PDF Files

(to send as email attachments and when ordering rental plaques)

Sharing treatment plans by email

The I-125 and similar radiation sources used in eye plaque brachytherapy are fairly short lived and so are often custom ordered and manufactured to deliver a specified dose rate on a specific date. These sources are assembled into a plaque that must be sterilized prior to use. This process requires close, timely coordination of a treatment planning and delivery team which includes radiation oncologists, ophthalmic surgeons, physicists, dosimetrists, schedulers, a sterile processing department (SPD) and the manufacturer of the radiation sources. A very convenient way for this complex team to communicate and coordinate is via email.

Anything that Plaque Simulator (PS) can print may also be saved in electronic form as .pdf files which may be distributed amongst the planning team as email attachments. This section of the PS user guide describes Eye Physics recommended methods for preparing PS created .pdf documents for use as email attachments. If you intend to use the IsoAid preloaded, presterilized plaque rental service, you will definitely need to familiarize yourself with these methods.

Many email systems impose size limitations of about 10 to 20 MB on attachments, and to meet security requirements the .pdf files must be encrypted prior to transmitting over the internet. The .pdf files that PS initially creates are neither compressed or encrypted and can become fairly substantial in size when CT, ultrasound and fundus images are included.

To compress and encrypt .pdf documents for secure transmission as email attachments you can use either the OSX or the Eye Physics OSX automator PDF Compressor for that is distributed with PS and its accompanying helper utilities; the quartz compression filter PS Email Size.qfilter and the automator extension Get Parent Folder.action. The qfilter MUST be installed before using the Eye Physics automator and is highly recommended when using Preview to manually process .pdf files. The free OSX automator extension Get Parent Folder.action by Tiago Nodari (c) 2009 MUST also be installed before using the Eye Physics automator.


The Eye Physics automator application, qfilter and automator extension are initially installed by PS version 6.3 and later in: Plaque Simulator Folder/Plaque Simulator Data/(Hidden Support Files)/(Email Utilities)/.

If you are using a version of PS6 earlier than 6.3, you can download the Eye Physics qfilter using this link PS Email Size.qfilter and use to manually compress and encrypt the .pdf files. After downloading you will need to expand the zip compressed file. This usually can be accomplished in OSX by simply double clicking the downloaded file.


Custom quartz filters for the Preview program (and also used by the Eye Physics automator app) are to be placed in the OSX system library PDF Services folder. To do this, simply drag or copy the file PS Email Size.qfilter from (Email Utilities) into the PDF Services folder of your bootup system drive Library folder as illustrated below.


The Eye Physics PDF Compressor for also requires the automator extension Get Parent Folder.action to be placed in the OSX system library's Automator folder. Running the getParentFolderV01.00.pkg installer package that you will find in the PS (Email Utilities) folder will do this for you.


Eye Physics recommends you next drag the automator PDF Compressor for to the OSX dock (ie create an alias to the automator in the OSX dock) next to the Plaque Simulator alias.


PDF compression and encryption using

Eye Physics recommends Apple's program, the default PDF viewer in OSX, to locally view the .pdf documents created by Plaque Simulator. You can also use Preview to compress and password encrypt these .pdf files for use as email attachments.

To manually compress a Plaque Simulator treatment plan that was printed to a .pdf file to a smaller size compatible with email transmission:

  • Open the treatment plan .pdf file with the Preview app.
  • Choose Export from the Preview File menu.

  • In the file export sheet:
    1. Rename the file in the Export As: field at the top of the sheet. Eye Physics uses a naming convention consisting of the original filename followed by "_for_email". For example, if the original treatment plan .pdf file was XX.pdf, the new compressed file could be renamed and saved as XX_for_email.pdf
    2. Navigate to where you want the new file to be saved (e.g. the Desktop).
    3. Set the quartz filter to PS Email Size.
    4. Enable the encryption checkbox.
    5. Enter and verify the password for the encrypted file.
    6. Click the Save button to exit the sheet and save the new compressed version of the .pdf file.

Compression and encryption using PDF Compressor for

Eye Physics has created an OSX automator application which greatly streamlines the manual process described above. The automator requires the quartz filter and automator extension helper utilities described above, and will not function properly until you have installed those helper utilities.

To use the automator, simply drag and drop your treatment plan .pdf file (e.g. XX.pdf) onto the automator PDF Compressor for or an alias to the automator (e.g. that you may have placed in the OSX dock).

  1. The automator will first duplicate the file, e.g. XX.pdf will be duplicated as XX copy.pdf.
  2. The automator will then rename the file, e.g. XX copy.pdf will be renamed as XX_for_email.pdf.
  3. The automator will then apply the quartz compression filter PS Email Size.qfilter that you previously installed in the OSX system library PDF Services folder.
  4. The automator will then prompt you to enter an encryption password. The default password is macula. Click Continue to accept the default or enter your own password and then click Continue.
  5. The automator will then encrypt the file and send you an OSX notification that the process is complete. The compressed and encrypted copy of the original .pdf file will appear in the same folder as the original. Do not move or open the _for_email file until you receive the ready notification.
  6. Once you have received the ready notification you can verify that the file has been compressed and encrypted by opening it with using the applicable password.
  7. In the PS Institution window you can further automate the process by sending an email message to all the members of your planning team. Simply drag and drop the just created XX_for_mail.pdf file into the designated location in that email message template.

Example quartz compression filter

There is a nice article on c/net that explains how to modify an existing quartz compression file. Technically, these qfilters are OSX property list (plist) xml files. This is the xml code of the Eye Physics qfilter.