/UE_LibHaru

UE5 runtime PDF writing plugin based on LibHaru.

Primary LanguageC++MIT LicenseMIT

UE_LibHaru

USED LIBRARY

https://github.com/libharu/libharu

DEPENDENCIES

https://github.com/FF-Projects-UE/ExtendedVars

TARGET PLATFORM

  • It currently only works on Windows platform.

LIBHARU WRITE FUNCTIONS

  • LibHaru - Create Document: It creates a LibHaru based PDF file. It's object is different than PDFium's. So, you can't merge them unless export it and then re-import it, first.

  • LibHaru - Add Pages: It adds pages to target PDF file with defined size. (Array count is page count and each vector element of array is its size)

  • LibHaru - Load Standart Font: There are 14 standart fonts embedded to PDF libraries according to PDF Spec 1.7 page 416. This function allows to select one them.

  • LibHaru - Add Text: It adds text objects to target page. Libharu doesn't support line break at default but we integrated a parse system. So it has auto wrap feature. Neverthless, we suggest you that be careful about your layout (for example when will you create a line break or not)

    • Text Color
    • Position X = Horizontal position.
    • Position Y = Vertical position but it starts from bottom. If your PDF page's height is 800 pixel, top will be 800 and bottom will be 0.
    • Shear X and Y = It strecth your text object. Scaling won't be vectoral. So we don't suggest it.
    • Rotation X and Y = We don't know how it works right now.
    • Border X and Y = It defines vertical and horizontal borders.
  • LibHaru - Add Image: It adds an UTexture2D to target PDF's target page. Extension and format is not important. Function converts its data to RGB Raw Data.

  • LibHaru - Save PDF: It saves PDF file to given absolute path. You don't need to spawn anything to use this function like PDFium.

  • LibHaru - Save as Bytes: It saves PDF as bytes array (TArray). So, you can render it with PDFium without writing and reading a PDF file.

  • LibHaru - Close Document

ROADMAP

  • Load external fonts
  • Mobile Support
  • 3D Model integration (PDFs supports u3d extensions.)