Q100156: How do I create custom PDFs in Flix?



In this article I will show you how to add a custom sized PDF plugin to Flix 5.2+. In the steps listed below and in the screenshot I create a 5 row, 5 column PDF for a total for 25 panels per page.  The source files used in this example can be found in the attachments.

  1. With a text editor, open flixApp/builds/flix_web.release/pythonSource/flix/plugins/toPDF.py
  2. Copy any one of the TOPDF# classes from the above file and paste it to the end of the file.
  3. Give your new class a unique name to reflect the panels per page. e.g class TOPDF25(ToPDF1):
  4. Change the icon path to /flixApp/builds/flix_web.release/assets/20px-pdf.png which will display a blank PDF icon in the PDF plugin dropdown menu. If you intend to have multiple custom PDFs it's best to use the blank icon to create an icon with a number that indicates the number of panels per page. 
  5. Change the label from label='Letter 3/pg’  to label='Landscape 25/pg’
  6. Change the plugin path to: flix.plugins.toPDF.TOPDF25()
  7. Change the rows(pdf.row) and columns(pdf.column) to adjust the number of panels displayed per page. 5x5 will show 25 panels on a single page. The variables, are in the getPDFTemplate method.


 Your finished class should look something the image below. 


8. Open /builds/flix_web.release/pythonSource/flix/plugins/pluginConfig.py and scroll to the PDF section. Duplicate one of the existing lines in the PDF section and rename the class at the end of the path to match the name of the class your class.     

The PDF section of pluginConfig.py should look like the image below. 

9. After making all of the above changes you will now need to restart the Flix server

Once back in Flix if you click and hold the PDF icon to reveal the new size. Your icon should look like the one below. 


Keywords: Customize, PDF, Export, Plugin








Was this article helpful?
0 out of 0 found this helpful