Hi to all,
By using in HPDF_SaveToFile for the 2nd parameter ex. this path/filename
c:\Users\Dragan Andrejević\AppData\Local\Temp\mypdffile.pdf
also for
c:\Users\Драган Андрејевић\AppData\Local\Temp\mypdffile.pdf
As It can be seen these paths are the users paths created second the users wishes and that I have to use as app temp folders.
Obviously the HaruPdf library in contribs cannot handle unicode characters in paths either in filenames.
I used as a solution the: save the file in some ex. mytemp folder and then copy it in the user temp folder since the COPY FILE command works with these kinds of paths.
I also see on the net that HPDF_SaveToFile can be done by using HPDF_SaveToStream with thr code below but I am not able to convert it for a prg usage.
/* save the document to a stream */
HPDF_SaveToStream (pdf);
fprintf (stderr, "the size of data is %d\n", HPDF_GetStreamSize(pdf));
HPDF_ResetStream (pdf); /* rewind the stream. */
/* get the data from the stream and output it to stdout. */
for (;;) {
HPDF_BYTE buf[4096];
HPDF_UINT32 siz = 4096;
HPDF_STATUS ret = HPDF_ReadFromStream (pdf, buf, &siz);
if (siz == 0)
break;
if (fwrite (buf, siz, 1, stdout) != 1) {
fprintf (stderr, "cannot write to stdout", siz, wsiz);
break;
}
}
Grateful fo any suggestion/opinion/help about
Thanks
Zoran