[Solved] How to build a PDF with Python

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
rudy-garceau
Posts: 1
Joined: Mon Aug 24, 2020 2:02 pm

[Solved] How to build a PDF with Python

Post by rudy-garceau »

I would like to use an .ott or .odt file to create a PDF with in Python. My intent is to create a simple GUI to run in a container with a single form input that will do some f string replacements (or something similar) to create a report with letterhead to send to clients about their on-site consultation. The only requirements is that there is an image to be placed at the top of each page and that the end result may be emailed to clients. It may stay in .odt if needed, but I have seen PyPDF2, and am looking for some support as I work through this solution. I will offer it in a public repo on GitHub.

My next step may be digging through SAM on AWS or some other hub that may have a spec file or dockerfile that can expedite the development process. If anyone has anything they are willing to share, it would be greatly appreciated. Thanks ahead of time.
Last edited by MrProgrammer on Wed Sep 02, 2020 5:02 pm, edited 1 time in total.
Reason: Tagged ✓ [Solved]
OpenOffice 4.1.7 on MacOS 10.15.5
User avatar
MrProgrammer
Moderator
Posts: 4904
Joined: Fri Jun 04, 2010 7:57 pm
Location: Wisconsin, USA

Re: How to build a PDF with Python

Post by MrProgrammer »

Hi, and welcome to the forum.
rudy-garceau wrote:My intent is to create a simple GUI to run in a container with a single form input that will do some f string replacements (or something similar) to create a report with letterhead to send to clients about their on-site consultation. The only requirements is that there is an image to be placed at the top of each page and that the end result may be emailed to clients.
Doesn't Mail Merge do about 90% of this? Why re-invent the wheel? However perhaps this exercise is intended as a fun project on which you can spend three or four days of your time.

If this solved your problem please go to your first post use the Edit button and add [Solved] to the start of the subject field. Select the green checkmark icon at the same time.
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.6.3, iMac Intel.   The locale for any menus or Calc formulas in my posts is English (USA).
Post Reply