PyPDF script to convert pdf to image

Hi,

I wonder if someone who understands Python Scripting would be able to help me with a Python Script to convert a pdf file (all pages) to image/s. If the file column is already an image to copy it to the receipts image column.

My table name is Requisitions
My PDF file column is called Receipts Upload
The column where I would like to save the image is Receipt Image

I have tried my hand in using AI to assist me with this but I am getting errors and am not clued up in how to solve this.

I would appreciate any assistance :slight_smile:

Thanks,
Helene

I guess this new topic is related to this topic: Converting file to image - #14 by rdb

What I still don’t understand: Why do you want to convert a PDF to an image to then use it in the Page Design plugin to create another PDF? Why don’t you simply create one PDF using the Page Design plugin and then merge the Page Design PDF with the other PDF? The latter procedure seems more reasonable to me and for this we also have a documentation: 6. Merge PDF - SeaTable Developer Manual

I have tried this method and it has not worked for me. The reason for this workaround is because sometimes the file might be a PDF and sometimes it might already be an image. Also I can then just click the button “Create Req Doc” and then I have my file complete. In my head it seems simpler.

It also appears to me that the MergePDF script wants both PDFs to be in the same column? Anyway, if you are able to help me either way I will be happy to try it.

I am working on a script which converts images into DINA4 PDFs. Would this help you?

I am unsure what a DINA4 PDF is.

Sorry for being imprecise. By DINA4 PDF, I mean a PDF with the page dimension of A4.

Thanks, I don’t think this will solve my problem. For now I will just contintue to screenshot the pdf and upload as image, in image column.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.