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
0
votes
1 answer

Building and using the LibHaru (v2.3.0-RC3) library

I'm trying to build and use libharu (v2.3.0-RC3) library in order to create PDFs. My spec (Windows 7, Qt 5.9.1, Qt Creator 4.3.1, CMake 3.9.0 - rc5, GNU Make 3.82.90) I do it this way download from the official site enter link description…
0
votes
1 answer

How do I get binary data from pdf created in libharu?

I have a basic C function, which creates a pdf and then writes it to the disc with HPDF_SaveToFile(pdf, filename) where pdf is an instance of HPDF_Doc. But now I want to change the function behaviour so instead of writing to disc, it would return…
0
votes
1 answer

Read an image from file in C++ and pass to the DrawImage method of Libharu

I am using LibHaru libraries to generate a Pdf report. In this report, I have to draw an image also. The image is present in a file (could be .jpg, .png, .JPEG). How can I safely get the data of this image and pass to the…
skm
  • 5,015
  • 8
  • 43
  • 104
0
votes
1 answer

Put an image with transparent background into a pdf using Libharu

I have to put an image (.png) into a pdf file using LibHaru. The image has a transparent background due to which it looks quite awkward (black background) into the pdf file. How can I put this image (with transparent background) properly using C++…
skm
  • 5,015
  • 8
  • 43
  • 104
0
votes
1 answer

HPDF_SetCompressionMode() not working in Libharu

I am generating Pdf files using LibHaru libraries. My code is following #include #include "hpdf.h" using namespace std; void error_handler(HPDF_STATUS error_no, HPDF_STATUS detail_no, void *user_data) { } int main() { …
skm
  • 5,015
  • 8
  • 43
  • 104
0
votes
2 answers

Why specify particular library in Visual Studio if the path to lib is known?

TL/DR: Question start with steps that I've made and that I think are important to mention (let me know if it is not important and I will delete it). The question itself is in the bottom of page. I've posted 3 questions that has the same steps that…
Wakan Tanka
  • 7,542
  • 16
  • 69
  • 122
0
votes
1 answer

How to use Qt resource for ttf font in libharu?

I'm creating a Qt application that writes a pdf file using libharu. The true-type-font that is used in the pdf file shall be embedded into the binary file, so it is available on all platforms. For this, I want to use the Qt resource system. The font…
Gregor
  • 411
  • 1
  • 6
  • 12
0
votes
1 answer

printing japanese characters in pdf using libharu

Currently I am using libharu to create pdf file. In the file I have some Japanese characters and they are saving as utf-8 first. After that, I am using HPDF_UseJPEncodings(m_pdf), HPDF_UseJPFonts(m_pdf) and m_fontStandard = HPDF_GetFont(m_pdf,…
user2753594
  • 145
  • 4
  • 15
0
votes
3 answers

what to use libharu c++ or i text java

i need to create pdf creation server and i don't know what is the best tools to chose java itext engine or c++ libharu , programming is not the problem c++ and java is the same to me . but i need something that will be fast so c++ libharu is good…
user63898
  • 29,839
  • 85
  • 272
  • 514
0
votes
0 answers

How to get code page of font by using font file name in c++

I have the font file name. I have to set code page at runtime to get HPDF_Font handle in LibHaru PDF lib. Currently, it is using CP1252 code page. We need support fonts from other code pages. Code snippet: const char * font_name =…
0
votes
1 answer

LibHaru Qt 5 cannot find usr/local/lib. File format not recognized

I installed libraries from libharu.org accordingly to the instructions on the page (without any errors). Then I tried to run an example in Qt 5. After adding paths to installed directories INCLUDEPATH +=/usr/local/include LIBS +=/usr/local/lib…
murnko
  • 148
  • 1
  • 10
0
votes
1 answer

Cannot write texts in a PDF file using libHaru

The following code creates a PDF file containing two words and saves it: #include "hpdf.h" #include void error_handler (HPDF_STATUS error_no, HPDF_STATUS detail_no, void *user_data) { std::cerr << "error! " << error_no << " " <<…
lightning_missile
  • 2,821
  • 5
  • 30
  • 58
0
votes
1 answer

Call HPDF_SaveToFile() with japanese filename

Im trying to save one pdf in path that contains japanese username. In this case, HPDF_SaveToFile is doing crash my app on windows. Any options to compile or other thing? Any idea to support Unicode filenames with libhaur? I not want to create pdf…
Juan Garcia
  • 843
  • 2
  • 11
  • 34
0
votes
0 answers

Read TIFF image using LibHaru

I need load an image in TIFF format and export it to a PDF file using the C++ library of LibHaru. Is there a way to load TIFF images using LibHaru? If not, what other option do I have?
Said Savci
  • 818
  • 4
  • 14
  • 28
0
votes
2 answers

adding pages dynamically in libharu C

I'm generating a pdf report the problem is that i don't know how many pages the report will be it will vary a lot. I need to create a the pages dynamically as they are need it, I try this but it doesn't work. //page counter int page_num=1; HPDF_Doc…
Ubaldo Quintero
  • 169
  • 3
  • 15