0

I want to convert pdf files into jpeg files and save them as ImageField in Django. In my case, I already have pdf files in MyModel and some of them will be converted into jpeg files and saved as jpeg files as ImageField in AnotherModel.

pdf_path = MyModel.object.pdffile.path

If I use "convert_from_path" provided by pdf2image, I think it is necessary to prepare the path for a jpeg file in advance. However, I don't know how to prepare it before creating each record of ImageField.

Kairi
  • 25
  • 1
  • 5

0 Answers0