Page 1 of 1

pdf file size too big & preview

PostPosted: Tue Feb 16, 2016 6:06 pm
by Romeo
Hi,

there is a very big difference in file size between create a PDF file with Preview Print and choosing PDF driver printer (as PDFCreator, PDF995...)

Example creating same file:

pdfcreator file size: 20 kb
pdf995 file size: 28 kb
PDF FWIN PREVIEW: file size 1800 kb

About 90 times bigger !!

My i reduce this size ? How ?

tks

Re: pdf file size too big & preview

PostPosted: Wed Feb 17, 2016 2:30 pm
by Carlos Mora
The difference is because in case of Pdf Printers, printing device commands are translated to pdf commands, giving such compact result. FW pdf generation is based on the convertion of the generated EMF page image into a format like JPEG, and then the pdf's pages are made up using that image.
You can verify this trying to select text from the pdfs.
The best thing you cando is to use a pdf library to generate the pdf, so you'll have the behavoir and performance you want. HaruPdf is my favorite, it can be found in Harbour's contrib directory.

Re: pdf file size too big & preview

PostPosted: Wed Feb 17, 2016 3:23 pm
by hmpaquito
Real (text) translation wmf to pdf file http://www.fpdf.org/en/script/script55.php
It is php language... sorry.

Re: pdf file size too big & preview

PostPosted: Wed Feb 17, 2016 5:41 pm
by Carlos Mora
Paquito,

this translation is limited to graphics objects, but does not translate the most important (and complex) objects for us in the translation: Text and fonts. And WMF is a dead format, isn't it?

I used ImageToPdf.dll to do such translation in Windows for a while, but never got an acceptable result. The library's author gave all the support he could, but translating font (and fonts names) is a real nightmare.

I'm currently using Haru, and it is the fastest lib you can use, with the best results, in terms of speed, precision of rendering and size of the document.

Re: pdf file size too big & preview

PostPosted: Wed Feb 17, 2016 5:57 pm
by karinha

Re: pdf file size too big & preview

PostPosted: Wed Feb 17, 2016 6:08 pm
by hmpaquito
Carlos,

It is likely that this routine does not do the entire job but is there another out there that if you do? It's easy to transform wmf emf.

Yes imgtopdf.dll is a nightmare.
Haru is fine to design all reports from scratch, but when you already have reports running necessary conversion from wmf / emf to pdf.

I once raised the issue of designing all reports to pdf and do not use more or WMF or EMF. There if Haru would fit.


---

Carlos,

Es probable que esa rutina no haga el trabajo completo ¿ pero habrá otra por ahí que si lo haga ? Es facil transformar de wmf a emf.

Sí imagetopdf.dll es una pesadilla. Lo probé y lo descarté.
Haru está bien para diseñar todos los informes desde cero, pero cuando ya tienes informes funcionando es necesario una conversion desde wmf/emf a pdf.

Alguna vez me he planteado el hecho de diseñar todos los informes para pdf y no usar mas ni wmf o emf. Ahí si tendria cabida haru.