Questions tagged [libharu]

libHaru is a free, cross platform, open source library for generating PDF files.

libHaru is a free, cross platform, open source library for generating PDF files.

It supports the following features:

  • Generating PDF files with lines, text, images.
  • Outline, text annotation, link annotation.
  • Compressing document with deflate-decode.
  • Embedding PNG, Jpeg images.
  • Embedding Type1 font and TrueType font.
  • Creating encrypted PDF files.
  • Using various character sets (ISO8859-1~16, MSCP1250~8, KOI8-R).
  • Supporting CJK fonts and encodings.

You can add the feature of PDF creation by using HARU without understanding complicated internal structure of PDF.

libHaru is written in ANSI C, so theoretically it supports most of the modern OSes.

88 questions
2
votes
2 answers

Libharu pdf creation : How to know the size of the printed text

I'm currently using the libharu library in order to render some pdf in a C++ program. I have no idea whether it is possible or not to know the size needed in order to draw a specific text with a specific font. The HPDF_Page_TextRect drawing method…
Michaël Azevedo
  • 3,874
  • 7
  • 31
  • 45
2
votes
0 answers

Using Type 1 Computer Modern Roman font in LibHaru

I am trying to use the Type 1 Computer Modern Roman (CMR) fonts with LibHaru but I am unable to display the characters from 0 to 31, even if the font is loaded successfully since I can display the ASCII characters in the resulting PDF file. With…
2
votes
3 answers

Vector of Vectors of CStrings initialization and usage

I am trying to create a Vector of Vectors of CStrings; a two dimensional array of CStrings. This will represent the data in a table. (All data is a CString of course). Here is how I try to initialize the Vector> std::vector>…
user1311286
1
vote
1 answer

LibHaru for iOS adding custom annotation

I am interested in Creating PDF in one of my iPad apps. The issue is that i need an Image as a annotation. So when some when clicks on that image the annotation message pops up. I learned that using libHaru one can add annotations in PDF which I got…
jAmi
  • 779
  • 7
  • 18
1
vote
1 answer

How can I set the Transformation-Matrix in Libharu?

I want to use libharu to render my documents to PDF. I would like to set a global scalefactor, which translates my document coordinates to the pdf-page coordinates. The only function in libharu, which has to do with scaling, is…
Christof Schardt
  • 551
  • 1
  • 5
  • 16
1
vote
1 answer

creating pdfs with libharu and vala

i was wondering if anyone could give me pointers on how to go about creating pdf files dynamically(without having to save the file as a pdf) from the vala language. i heard it can be done with libharu so ive been looking into their documentation but…
Sasha
  • 3,281
  • 7
  • 34
  • 52
1
vote
3 answers

Compiling libharu with Android NDK

I'm trying to compile libharu for Android. In my jni folder I've: /jni/lpng154/ with all sources and include files for libpng; /jni/libharu-2.2.1/ whit all sources and include files for libharu This is my Android.mk (in /jni/ folder). libharu has…
user891705
1
vote
1 answer

Can anyone tell me how to create PDF with text Annotate using libHaru Library

I wanted to create a PDF with a Text Annotate. I came across the 3rd Party library called libharu. Can anybody tell me how to create a PDF with a text annotate using this library or any documentation related to it.
philip abraham
  • 587
  • 1
  • 5
  • 20
1
vote
1 answer

utf8 in libharu: is embedding fonts really necessary?

I'm trying to support as much Unicode as I can in the PDF files I'm writing. I want to be able to output utf8 strings and have them display correctly in the PDF. I see in the libharu encodings documentation…
M Katz
  • 5,098
  • 3
  • 44
  • 66
1
vote
0 answers

Unable to embed font using libHaru on Windows

I have following code that perfectly works on Linux: auto pdf_doc = HPDF_New(nullptr, nullptr); if (!pdf_doc) { /* error handling */ } HPDF_SetCompressionMode(pdf_doc, HPDF_COMP_ALL); HPDF_UseUTFEncodings(pdf_doc); HPDF_SetCurrentEncoder(pdf_doc,…
Sam
  • 1,842
  • 3
  • 19
  • 33
1
vote
1 answer

Explicitly set image compression filter

According to PDF format spec, it has various image compression filters including CCITTFaxDecode. I'm using libharu and need to explicitly set compression filter to CCITTFaxDecode for all images in the generated PDF. How can I tell libHaru to use…
Alexander Abakumov
  • 13,617
  • 16
  • 88
  • 129
1
vote
0 answers

Load image in Libharu by HPDF_LoadPngImageFromFile()

I am trying to load a PNG image using LibHaru libraries. The Libharu provides the HPDF_LoadPngImageFromFile() method to load an image as per the Documentation. PROBLEM: I get a linker error when I put the following line in my code HPDF_Image…
skm
  • 5,015
  • 8
  • 43
  • 104
1
vote
0 answers

LibHaru: How to draw a line of exact one inch

Following is the code snippet I used to print a line of length 1 inch with the default DPI level(72dpi ). page.moveTo(5, 20); page.lineTo(72, 20); But when I take the printout, line is smaller than 1 inch. (around 2.24 cm instead of 2.54cm)
Mubarak
  • 1,419
  • 15
  • 22
1
vote
0 answers

How to Install 'libharu' library in Visual Studio 2013 version?

I am working on converting files to PDF using C++, I downloaded the libharu files from its website but do not know what to do next. I am unable to use the command "nmake -f script/Makefile.msvc".
1
vote
1 answer

Barcode fonts not working in LibHaru PDF lib

I am trying to use barcode font(ADVC128C.TTF) in libharu but it is not printing(throwing exception - Unsupported ttf format). I have used HPDF_LoadTTFontFromFile() to load font file. How do we print the barcode by using LibHaru pdf library? Could…