The compression is not working and the value returend by the following line is 4129. The documentation about errors says that 4129 means "Invalid value set for compression".
HPDF_STATUS Status = HPDF_SetCompressionMode(pdf, HPDF_COMP_ALL);
My code looks like follwoing:
//Create the PDF
HPDF_Doc pdf = HPDF_New(error_handler, NULL);
if (!pdf)
return 0;
HPDF_STATUS Status = HPDF_SetCompressionMode(pdf, HPDF_COMP_ALL);
//HPDF_STATUS Status = HPDF_SetCompressionMode(pdf, HPDF_COMP_IMAGE);
Last edit: Siddharth Mittal 2016-10-19
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi ,i am using this code for creating new pdfDoc object but it is not creating and printing error:cannot create pdfDoc object.
pdf = HPDF_New (error_handler, "s");
if (!pdf) {
printf ("error: cannot create PdfDoc object\n");
return 1;
}
can anybody help me?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The compression is not working and the value returend by the following line is 4129. The documentation about errors says that 4129 means "Invalid value set for compression".
My code looks like follwoing:
Last edit: Siddharth Mittal 2016-10-19
If you step into the code, you will see you are getting the error because the ZLIB compression library was not compiled into your copy of HaruPDF.
First: comment out this line in ..\win32\include\hpdf_config.h:
Second: find, download and unzip the ZLIB code. You can obtain the source from the following Website:
Third: tell HaruPDF where it can find the ZLIB code, and recompile HaruPDF.
You should now be able to use compression.
Ain't Open Source grand?
Hi ,i am using this code for creating new pdfDoc object but it is not creating and printing error:cannot create pdfDoc object.
pdf = HPDF_New (error_handler, "s");
if (!pdf) {
printf ("error: cannot create PdfDoc object\n");
return 1;
}
can anybody help me?
and I checked it with the geterror code it is showing 4133 means HPDF_INVALID_DOCUMENT .