Trying to create PDF with generated images

Hello GPT-World!

I’m traying (and failling) to create a PDF file than contains texts and images generated with a custom GPT.

Viewing the code now I now that FPDF is used, so i watch a mini course about this program:

After that I’m been traying several atemps:

WORK:

  • Upload images and a .py file, then I excute it and ask for download link for the PDF. Works fine everytime (easy method, but nothing new is created by the gpt)

NOT WORK (or partially works with several errors and retries, add wrong code):

  • Ask the GPT to create the images and save them with fixed paths like ‘/mnt/data/1.png’
  • Generate image and save their paths to a variable like ‘path_img_1’
  • Put the code inside the instructions or inside a uploaded .py file
  • Some error are about the format of the images (apparently where webm, but the downloaded are png), other about the path.

Please I need help with all of this. My idea is to create small pdf with a few images into them, and it is very extrange (and also inconsistent) that using the same method sometime works and other not (or with errors displayed)

What I need is a consistant way to create images, compile a PDF with them (and some text), and obtaint a download link, with no error and working every time.

Best reagards.

G.

2 Likes

I met the same problem using gpt4o. Generating or compiling contents as pdf is a truly convenient and efficient tool. Assistance is required!

1 Like

Yep, Assistance is required!