ConvertHyperlinks does not convert

The Amyuni PDF Converter is our Printer Driver that enables you to convert any documents to PDF format. If you have any questions about installing and using the Amyuni PDF Converter please post them here.
Post Reply
davidgreene
Posts: 3
Joined: Mon Apr 14 2003

ConvertHyperlinks does not convert

Post by davidgreene »

We're using cdintfEx.cdintfEx with Visual FoxPro 6, version 2.10d, DevPro version of the PDF Converter.

Our list of options:
NoPrompt
UseFileName
EmbedFonts
BroadcastMessages
FullEmbed
LinearizeForWeb
ConvertHyperlinks
EmbedLicensedFonts
EmbedSimulatedFonts

Source code is as follows (error checking omitted for brevity):
***********************
nOptions=;
0x1+0x2+0x10+0x20+0x200+0x8000+;
0x100000+0x400000+0x1000000 && 22053427 decimal

printername = "PDF Exporter"
cLicNo=(our license#)
cLicName=(our licensed name)
PDF=createobject("cdintfEx.cdintfEx")
PDF.DriverInit(printername) && returns 0
PDF.SetDefaultPrinter() && returns true
*
* PDF properties are then set by users selections
*
filename=PDF.DefaultFileName
lockname=justfname(filename)

* check to see if defaults need updating
if PDF.DevModeFlags<>nOptions
var1=PDF.EnablePrinter(cLicName, cLicNo) && returns 0
PDF.FileNameOptionsEx=3 && reset to developer minimum
PDF.DevModeFlags=int(nOptions)
var2=PDF.SetDefaultConfig() && returns true
endif

n0=PDF.lock(lockname)
n1=PDF.EnablePrinter(cLicName, cLicNo)
PDF.FileNameOptionsEx=int(nOptions)
n2=PDF.SetDocFileProps(lockname, int(nOptions), "",filename)
n3=PDF.EnablePrinter(cLicName, cLicNo) && again
* print the report
n4=oRpt.DocPrint(filename) && returns true

*10 seconds to begin printing
PDF.unlock(lockname, 10000)

*reset to minimum for developers edition
PDF.FileNameOptionsEx=3

*check success
lPrinted=((n0=0) and (n1=0) and (n2=0) and (n3=0) and n4)

PDF.RestoreDefaultPrinter()
PDF.DriverEnd()
rele PDF
PDF=.null.
******************************
The PDF file is created and saved to the selected file name, with all embedded fonts in place. Hyperlinks, however, are not converted. We've re-checked settings after printing in the debugger and the numbers all add up. We've also tried document.linearized=.t. and document.optimize(1) after creating the file, but that doesn't seem to help.

Any idea what we need to change to get this to work?

Many thanks,
Dave
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan »

Hello,

I didn't try your code to see what is wrong, but as a quick advice, please try to set the options in Decimals and not Hexadecimals.

This may help if not please let me know and I will try your code.

Thanks.
davidgreene
Posts: 3
Joined: Mon Apr 14 2003

Post by davidgreene »

It doesn't matter - VFP converts on the fly and the int() function ensures it's an integer. At a command prompt in VFP, ? 0x50 results displays 80.

At the line just after SetDocFileProps(), what should the settings show for FileNameOptionsEx and DevModeFlags to ensure success with the conversion of hyperlinks?

Dave
davidgreene
Posts: 3
Joined: Mon Apr 14 2003

Post by davidgreene »

Any chance Jose can look into the question for us?
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan »

Yes sure, please send your code to canada.support@amyuni.com and Jose will look at it.

Have a nice day!
Post Reply