Hi,
There is demo folder provided along the src of libHaru.
open that and copy arc_demo.c to ur desired location on ubuntu..
lets say /home/gautam/arc_demo.c
open the file
copy and paste below main .. (actually i am making minimum code for
making a pdf)
int
main (int argc, char **argv)
{
HPDF_Doc pdf;
HPDF_Page page;
char fname[256];
HPDF_Point pos;
strcpy (fname, argv[0]);
strcat (fname, ".pdf");
pdf = HPDF_New (error_handler, NULL);
if (!pdf) {
printf ("error: cannot create PdfDoc object\n");
return 1;
}
if (setjmp(env)) {
HPDF_Free (pdf);
return 1;
}
/* add a new page object. */
page = HPDF_AddPage (pdf);
HPDF_Page_SetHeight (page, 220);
HPDF_Page_SetWidth (page, 200);
HPDF_SaveToFile (pdf, fname);
/* clean up */
HPDF_Free (pdf);
return 0;
}
save and compile the file
$gcc arc_demo.c -L"/usr/local/lib" -lhpdf -o test (update lib
location as per ur).
$./test
this should give u a pdf.. if not check the file & folder permission
$ls -l (in GUI with right click).
hope this may solve ur.