Welcome! Log In Create A New Profile

Advanced

[WD23] Serious PDF printing problem

Posted by Ola 
Ola
[WD23] Serious PDF printing problem
April 16, 2019 10:42PM
Hi all,

I have serious problems trying to print reports in a PDF file. It seems that currently

most of my reports do not print as PDF at all!
There is something in the file but they display and print as plain white sheets.

They do display correctly in the prewiev window and they print correctly on paper and all ather file formats available in WD but not PDF! Some reports do print correctly also in PDF files, but so far I have not been able to figure out what is the difference.

The problem is the same whether I print from the preview or directly from code with iDestination(iPDF,sPdfFileName).

I did not have this probem with WD22.

I do not confess having knowingly done anything myself to cause this condition.

My development machine is a Win7 Home Premium SP1 and WD version is 23 01A230053k.

Best regards
Ola

This is a show total stopper for me. I cannot release my latest ERP version in this condition.
I will appreciate any hints and tips to get overcome this problem.
Al
Re: [WD23] Serious PDF printing problem
April 17, 2019 12:30AM
Hello Ola

Maybe font issue that the printer cant handle ? Can you force the source report to be in courier or Arial ? Have you tried them on a different printer ?

If you select a PDF printer do they print on that ? Foxit has a PDf printer if you don't have one.

I am chanelling PCSoft tech support here smiling smiley
Can you make a small project with one of the non working reports and those of us with V23 can download it and see what can be done ?

Regards
Al
Re: [WD23] Serious PDF printing problem
April 17, 2019 08:01AM
Hi,

i had a strange behaviour some time ago too. A customer told me that a report doesnt show values, but it worked some days ago.
On my computer it didnt work too anymore, but it defintifily worked in the past.
In the opening code i did a hreadseekfirst for the file to print, in the bodys code i did some operations to concatenate text and show it. A simple thing but it didnt work from one day to the other.
If i remember correctly i placed some explicit hreadseekfirst calls in the body code too and switched the fields from static to items (or vice versa, i dont remember). And suddenly it worked again. I dont know why it solved the problemand why it occured but it did.
Maybe it helps.
Re: [WD23] Serious PDF printing problem
April 17, 2019 10:09AM
Hi Ola,

each update and version of WINDEV had changes to the "printing to PDF" thing - without exception. Some to the better and some to the worse. My many-years-old problem is still unsolved. Whine. If the print format changes from portrait to landscape and then back to portrait, the landscape sheet will print to the margins of a portrait page only. Intermediate solution: just print an empty page in between the pages with different formats. Doesn't look nice, but it works.

Kind regards,
Guenter Predl
office@windev.at
Peter Holemans
Re: [WD23] Serious PDF printing problem
April 17, 2019 11:04AM
Recalling something on my end…

Are you viewing your PDF's in 'Edge', then it is likely 'blank'... Are you viewing the PDF in Adobe Acrobat Reader it is OK…
I never saw a similar behaviour with any of the zillion non WX generated PDF's but this was what I noticed if I recall correctly.
Probably some Frenglish in its WX/PDF encoding that Edge doesn't understand ;-)

Cheers,

Peter Holemans
Re: [WD23] Serious PDF printing problem
April 17, 2019 12:45PM
Hi Peter,

thanks, that's a good suggestion! From time to time I do receive PDF's which can be read / printed only using the Adobe Acrobat reader.

Kind regards,
Guenter Predl
office@windev.at
Re: [WD23] Serious PDF printing problem
April 17, 2019 01:59PM
Hi Ola,

Take a look here: [help.windev.com]

// This is what I use ONCE at the Project code area ...
iParameterPDF("","",iPDFUnicode+iMaximumQuality)

You can "delete" iPDFUnicode from above IF you don't use unicode ...

This has "fixed" ALL problems I had with PDFs

Regards
Steven Sitas
Ola
Re: [WD23] Serious PDF printing problem
April 17, 2019 03:04PM
Hi all, and thanks for the hints. I tired a few of them.

I tried reading the "invisible" PDF files with Adobe Acrobat 5 and Adobe Reader 9 in an XP and Foxit Reader 8.3.2.25013 in Win7. Same problem in all: PDF files display as plain white sheets.

I tried iParameterPDF in the project initialization code: same problem.

There is something that I have done with at least some of these problem reports: Initially they were set to print even if they contained no data. In WD23 I changed them to NOT print at all, if there is no data, but then I realized that I actually needed also the "zero data" because these reports were part of the monthly maintenance, update and reporting process and there they updated a report summary file. So now they should again print even if no data, and they do, but not in PDF files.

Of course this kind of change should not have caused this kind of problem, but who knows? These reports have been made with the report generator, and such generated reports have traditionally been rather unstable, if you change anything in them.

The problem may be caused by the fonts, because there is a warning sign at the end of the code calling these reports, complaining about the "Wingding" font. And there are checkmarks in these reports, which obviously are wingding characters, although it is not indicated anywhere else.

So, I tried to change these fields (columns) to normal text and control their values in the body initialization code to show an "x" when "checked". But this seems not to be possible. You can change the field type in the report's table editor, but the change does not stick. When you re-open the report, they are again checkmarks.

On the other hand, there are checkmarks also in those reports that do not have any problems printing as PDFconfused smiley

Does this ring any bell with any of you?

Best regards
Ola
Al
Re: [WD23] Serious PDF printing problem
April 17, 2019 03:26PM
Hello Ola

Regardless of any data, the page number and/or report heading and footer should always print.
Could it be some weird foreground/background issue or you have an image overlay or something setting the report invisible ?


Regards
Al
Al
Re: [WD23] Serious PDF printing problem
April 17, 2019 03:42PM
Hello Ola

Still thinking

Do you print direct using a combination of IParameter() and IDestination() settings.
Is it possible that the settings are sending the report to a file and not the printer ?
Try an iReset() at the last command before printing to clear the settings.

Does the report display properly in the preview screen ?
I think the print preview uses the current printer driver to form the report.

Does the report work if you send it to a PDF printer - Is it just the Windev PDF that doesn't work ?

Regards
Al
Ola
Re: [WD23] Serious PDF printing problem
April 17, 2019 04:17PM
Hi Al,

Thanks for trying hard to helpsmileys with beer

Preview is OK.
I've tried both ways to print as pdf, both from the preview and from code: they both fail as PDF, but not as paper prints.

I suspect that the problem report source files may be somehow partly corrupted, and the corruption was caused by changing back and forth the "what to do if there is no data" setting of the report.

I just tried restoring an older version of one of the report .wde files from the situation right after "upgrading" to WD23, and it seems to work also as a PDF, so I think this is the easiest way to solve the problem.

By the way, I upgraded from 21 to 23, skipping 22 altogether.

Thanks again to all.

Best regards
Ola
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: