PDF Converter + VFP 9.0

If you are a VFP developer and have any questions about using our products from VFP here is the place to post them.
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan » Wed Jan 05 2005

Hello,

Personally, I didn't try to use the PDF Converter with VFP 9.0 but I don't see why it would not be compatible with the new version of VFP as it is compatible with version 8.

I can suggest you to check how VFP 9 is printing. Will it print to the default printer of the system or to the printer specified for a given report?

Also please check if in VFP 9 there is any new function to print to a specific printer.

When opening your application in VFP 9, please open your reports in design mode and select the PDF Printer as the specific printer for this report.


Hope this helps.

Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan » Thu Jan 06 2005

Hello,

Please add 7000 Hex (or 28672 Decimal) to the Options parameter of SetDocFileProps().

Thanks.

tmcconec
Posts: 3
Joined: Mon Jan 10 2005

Tried this solution and it didnt work.

Post by tmcconec » Tue Jan 11 2005

Sorry, to but In but I am having the same problem.

I tried the options parameter but it didnt work. Does anyone have a working code sample they can post that shows a solution to this problem?

Thanks.

Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan » Wed Jan 12 2005

Hello,

How are you specifying the output file name?

Please debug your application and check how the output file name is computed, you might need to make some adjustment on this level.

If you are still facing problems, please post your code (the part related to printing and to the locking mechanism) so I can check it.

Thanks.

Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan » Fri Jan 14 2005

Hello,

Please check the following:

1- Please check that when printing from VFP 9, the printjob name is test_report.frx.
To do so please pause the PDF Printer or any other printer and print test_report.frx to that printer without using the locking mechnism.
Check what is the print job name displayed in the printer spooler.

2 - Please try to remove the underscore '_' from the name, call the report testreport.frx.

Hope this helps.

tmcconec
Posts: 3
Joined: Mon Jan 10 2005

Solution Found:

Post by tmcconec » Tue Jan 25 2005

Hi All,

I found a solution where you can change the print job which solves this issue:

The code uses the report listener to change the job name.

It looks like this:

Code: Select all

lcDocName=JUSTFNAME(lcReport)

oPdf = CreateObject("CDINTFEx.CDINTFEx")
oPdf.DriverInit("QuestPDM PDF Printer Driver 436")
oPDF.EnablePrinter("xyz","123")
SET PRINTER TO NAME "QuestPDM PDF Printer Driver 436" 

oPdf.SetDefaultConfig()
oPDF.Lock(lcDocName)
				
oPdf.FileNameOptionsEx= 1 + 2 + 4 - 2147483648 

oPDF.SetDocFileProps(lcDocName,oPdf.FileNameOptionsEx,"\",ALLTRIM(lcPDFFile))
		
oPDF.EnablePrinter("blah","blah")

loListener = .NULL.
do (_ReportOutput) with 0, loListener
loListener.PrintJobName = lcDocName
loListener.AllowModalMessages=.F.
loListener.QuietMode= .T.

**Print Report..
REPORT FORM (lcReport) TO PRINTER NOCONSOLE OBJECT loListener

oPDF.UnLock(lcDocName,5)

Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan » Tue Jan 25 2005

Thanks for posting this code, i am sure it will help developers using the locking mechanism under VFP 9.

I edited your post however and removed your LicenseTo and ActivationCode information because this information is private, you can not distribute it to your customers or post it online.

Best Regards,

tmcconec
Posts: 3
Joined: Mon Jan 10 2005

Post by tmcconec » Wed Jan 26 2005

Glad it helped.
Sorry about posting the code I didnt notice it has in there twice.

BR
Tim

radu_aanei
Posts: 5
Joined: Fri Dec 17 2004
Location: Bucharest

Is there another solution/workaround?

Post by radu_aanei » Fri May 27 2005

Hi there!

The solution presented here is helpfull but I want to avoid it because I don't want to use the 9.0 reportbehaviour it's slower and the reports I'm having don't need the new features.

Is there a solution or workaround that doesn't use a report listener?

Thanks.

Post Reply