PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → [WD20] Printing of a .PDF document
[WD20] Printing of a .PDF document
Iniciado por guest, 05,nov. 2015 09:32 - 6 respuestas
Publicado el 05,noviembre 2015 - 09:32
Hi, the idea is to archive certain printed documents as PDF-documents as well. So, the command iDestination(iPDF .. or iDestination(iGenericPDF .. seemed to fit. Tax authorities will look after an exact copy of the document, but, I'm sorry to say, the produced PDF documents are not really identical with the printout while a print to an external print driver like as the PDF Creator does make an exact copy! (hint: the difference is in the dotted lines of the rightmost columns!) Any comments?

[attachment 1758 2015_11_05_090800_Lieferschein_mit_PDF_Creator.pdf]
[attachment 1759 2015-11-05_090806_LSDatum2015-11-03_Ku000001_LS1_LIEFERSCHEIN.PDF]
Publicado el 05,noviembre 2015 - 13:40
Hi Guenter,

it seems to me that you are trying to print into the technical margin of the printer d.river, and that always has unpredictable results (truncation in the best of case, ignoring the string to print in other, or complete crazy behavior, like 227 blank pages...)

So I suggest you start by respecting a non printing area around the page, and also to use the quality option in the print to pdf choice.

Let us know if it helps.

Best regards
Publicado el 06,noviembre 2015 - 08:39
Hi Fabrice, thank you!

No, I'm not printing into the technical margins, for printing, the paper size is retrieved from the driver (iPageHeight() and iPageWidth) and can be even reduced on the left and right sides by a customer-defined margin reduction in millimeters in order to shift the whole printout to the right (for the holes made for filing) or to the left if a preprinted form is to be used. The remaining space is taken for the printout. Theoretically, there should be no way to exceed the given printer margings.

a) the print quality has no influence on the loss of the dotted lines. Neither maximum nor minimum quality lets the dotted lines appear like on the print. However, the dotted lines do appear when printing to a PDF-printer driver like PDF Creator.

b) document size could be any size from ticket size up to A3 (document size is taken from the printer driver!), but just to be sure, I defined an iParameter(iPaperSize, iPaperSize_A4) - which didn't help either. The attached pdf shows that margins of the item rows are much smaller than the paper width (see town / date)

I'm going to make a small demo program for PC Soft anyway and will make it available here. Same goes for the funny black duplicates which are printed just fine on the printer but stay pitch black as a duplicate.

[attachment 1763 2015-11-06_083243_LSDatum2015-11-03_Ku000001_LS1_LIEFERSCHEIN.PDF]
Publicado el 06,noviembre 2015 - 15:14
Guenter,

I have found PDF generation with Windev to be adequate at best.

While Fabrice gave some insightful advice, I think your problem most probably can be explained by the fact that we have no control over the "z" order of the objects placed on the Pdf generated.

If you look at your two examples the 10% shading bars for your lines most likely is at a layer above the graphic "lines" just below your body header and the last column. resulting in the body header "under line" being thinner than the other and all but the last line visible in the column.

As a test remove the shading and try your print again.

The "quality" parameters relate only to how the raster objects are handled in the output never the vector objects.

I have struggled with and resided to give up on "z" order issues of vector objects in windev Pdfs. If I need that type of control I find other routes to produce the results.

To be fair Windev is not marketed as a Pdf generation tool.
Publicado el 06,noviembre 2015 - 17:47
Hi Eric,

I tested it and you're right indeed! It's the shading. Removing it from the printout lets the dotted lines re-appear!

[attachment 1764 2015-11-06_173929_LSDatum2015-11-03_Ku000001_LS1_LIEFERSCHEIN.PDF]
Publicado el 06,noviembre 2015 - 19:15
Guenter

Glad the test pointed you in the right direction.
Publicado el 06,noviembre 2015 - 22:06
Hi Eric, many thanks for the insights!