I updated to FWH-19.09 but I have a couple of problems with PDF generation from PREVIEW.
The process is:
1.- An invoice is generated
2.- It is sent to print (electronic invoicing) and the PDF, that will be validated via SOAP / WSDL and sent to the client, should be automatically generated.
3.- Sometimes it is necessary to reprint the invoices from the PREVIEW, and from there, the PDF is generated manually.
This works perfect if PDFs are forced to be generated directly, WITHOUT using HaruPDF or MsWord, but the internal class of FWH. The problem
is that the resulting PDFs weigh too much.
To avoid using HaruPDF or MsWord I make the following changes;
a.- Disable "#define USEGDI" in PRV2PDF.PRG and change
- Code: Select all Expand view RUN
- CLASSDATA bSaveAsPDF INIT {| Self | :: SaveAs (.t.)}
by
- Code: Select all Expand view RUN
- CLASSDATA bSaveAsPDF INIT {| Self | FWSavePreviewToPDF (Self)}
It works well, but generates very large PDFs, and for electronic invoicing small PDFs are required.
Ideally, HaruPDF or MsWord should be used, but in doing so, following the instructions in the "WhatsNew.txt" of FWH-19.09 the following problem occurs:
1.- The PDF is distorted and does not paint the color of the logos.
To solve it without making changes to the classes in FWH-19.09, when generating the invoice and putting the logo, I put RASTER at 0
- Code: Select all Expand view RUN
- // nRaster: = SRCAND: = 8913094
nRaster: = 0
xaCoord: = oPrn: CmRect2Pix ({1.45, 1.78, 5.20, 1.02})
oPrn: SayImage (xaCoord [1], xaCoord [2], cLogo, xaCoord [3], xaCoord [4], nRaster)
Although the logos (shape and color) are drawn well, it randomly generates micro PDFs.
I've tried everything, but I can't find a solution. Any suggestions of what I need or what am I doing wrong will be eternally grateful
Good quality - bad weight 584Kb
Good weight 202Kb - bad quality
Micro PDF
For information, the same document, with PDFCREATOR, with very good quality, weighs only 32Kb
Thanks and regards