Convert PDF to PNG/JPEG

Hello everyone,

I am facing a problem with a workflow designed to convert PDF files stored on OneDrive into JPEG/PNG images. To accomplish this, I’m using the “Edit Image” node. Previously, I had managed to bypass the lack of a direct conversion option to JPEG by applying a slight blur to the PDF, which allowed me to output the file in JPEG format. This method worked flawlessly during my initial tests with a first PDF.

However, after unpinning the data from the previous nodes and launching the complete workflow with new PDF files, I encountered an error on the “Edit Image” node indicating “Stream yields empty buffer”. This problem occurred despite the fact that the workflow worked perfectly with my initial test file.

I am trying to understand why this workflow worked previously and why it is failing now, especially since the only change made was moving to other PDF files. All the targeted PDFs contain resumes that are one page long.

Has anyone encountered this type of error “Stream yields empty buffer” when using the “Edit Image” node to process PDF files? Do you have any suggestions on how to solve this problem or recommendations for a better practice for converting PDFs into images in n8n?

Thanks for your help !

Information on your n8n setup

  • **n8n version: 1.34.2
  • **Database : default (SQLite)
  • **Running n8n via Docker
  • **Operating system: Ubuntu

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hi @Anthony_CAVALIER, as you’re self hosted, you may look into some of our community nodes available. You can find reference to one in this article. How can a multi-page pdf file be converted to image files? - #2 by n8n

Good luck and let me know how it turns out!

Hey @Ludwig :wave:

Thank you for your quick response !

It’s intriguing that my workflow operated successfully several times during the initial setup with my test PDF and now encounters issues regardless of the workflow used.

I understand that the solution might involve certain costs, and I was ideally looking for a free alternative.

I’m still puzzled about the underlying cause of this shift in performance and am keen on exploring any free solutions that might be out there.
If you or anyone else has insights or recommendations on free tools or methods within n8n that could facilitate this PDF to PNG conversion, I would be very grateful to hear more.

Thanks again for your time !

you can use Stirling PDF


Thank you @atwork1

I installed Stirling on my VPS following their documentation.

Then I could to use it with n8n to convert my PDFs into images

Thank you both for your time and support! :+1:

1 Like

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