Skip to main content
Visitor II
April 3, 2020
Question

What is the best way to generate PDF file directly from a STM32 microcontroller which can be delivered via USB ( the device can show up as a mass storage device). ?

  • April 3, 2020
  • 2 replies
  • 2591 views

Is there any library available?

    This topic has been closed for replies.

    2 replies

    Visitor II
    April 3, 2020

    PDF is a beast of a format (fonts, multimedia, compression, encryption, etc..), I don't think there will be a lightweight enough library without heavy external dependencies to generate PDFs in a microcontroller.

    Maybe you can try libharu, no warranties though, it requires zlib and pnglib, but thankfully the requirement seems to be optional.

    MStép.1Author
    Visitor II
    April 3, 2020

    Thank you @After Forever​ . For now, the only option seems to generate the file line by line so that a small amount of the file is in memory at any point in time.

    Visitor II
    April 3, 2020

    A STM32MP157C-DK2 + PC with Ubuntu 18.04 + STM32 Dev software + a few hours to bake and you'll have it!