B4A Library HtmlToPdf

Hello everybody,

I've created this library that converts an html file (or string) to a pdf file programmatically.

A couple of important notes: it only works on devices with SDK versions >= 21 and it cannot read files from the asset folder (you can either copy the file to the internal folder and use it from there or read the content with File.ReadString and use the result)

You can find an example attached to this thread.

  • PalmoHtmlToPdf
    • Events:
      • Finished (Success As Boolean)
    • Functions:
      • ConvertFromFile(DirectoryInput as String,FilenameInput as String,DirectoryOutput as String,FilenameOutput as String)
      • ConvertFromString(htmlData as String, DirectoryOutput as String, FilenameOutput as String)
      • Initialize (EventName As String)


  • HtmlToPdf_example.zip
    9.5 KB · Views: 450
  • HtmlToPdf.zip
    7.2 KB · Views: 478