Word .doc to PDF HyperLinks non-functioning

If you are a VB developer and have questions about using our products from VB, here is the place to post them.
Post Reply
joku
Posts: 5
Joined: Tue Mar 09 2004

Word .doc to PDF HyperLinks non-functioning

Post by joku »

When I convert .doc to .pdf the HyperLink colors remain, but it is no longer a link.
I saw something in another post where you talked about FileNameOptions Hyperlink = 100000 Hex
So I tried FileNameOptionsEx = &H100000, and I also tried FileNameOptionsEx = &H186A0 just to make sure.
Neither worked for me on retaining the links from .doc to .pdf.
Know what might be wrong?
A code snippet might be the easiest to understand...
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan »

Hello,

Please add 1048576 to your call of FileNameOptions.

Ie, if You are already calling :

FileNameOptions = 1 + 2 'NoPrompt + UseFileName

Pleaes call

FileNameOptions = 1 + 2 + 1048576

If you are using the ActiveX interface of CDIntf, please replace FileNameOptions by FileNameOptionsEx.

Please note that your hyperlinks should start by: www, http:// , mailto:/, file://, https://, or ftp:// to be retained as hyperlinks in the generated pdf file.

Hope this helps.
joku
Posts: 5
Joined: Tue Mar 09 2004

Post by joku »

Sorry, but this option didn't work for me... I get an overflow error which I'm assuming is happening because the FileNameOptions type isn't large enough to hold the number specified.
When I do the FileNameOptionsEx = 1 + 2 + 1048576 I don't get the error, but the final pdf file still doesn't retain the links... Hope I'm not at fault here.
joku
Posts: 5
Joined: Tue Mar 09 2004

Post by joku »

I'd like to include that the version of my CdInt dll is 2.1 and it looks like FileNameOptions is of Integer type where FileNameOptionsEx is long.
Thanks in advance. =)
joku
Posts: 5
Joined: Tue Mar 09 2004

Post by joku »

Well, it looks like I'm able to make it work with the ActiveX control... ummm is there a way to convert the link even when it doesn't start with http:// file:// etc...? I'd really like a way to make the links look more natural...
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan »

You should be able to make this work from both the DLL and the ActiveX interfaces.

Using the PDF Converter you can retain links that starts with http://, file://, www. , ect...

If you wish to set a normal text as a hyperlink in the pdf file you can use our PDF Creator to open the pdf file and convert a given text to a hyperlink. This is easily done using the End User version of the PDF Creator. A demo version is available at http://www.amyuni.com/en/products/pdf_creator/demo.html

Hope this helps.
joku
Posts: 5
Joined: Tue Mar 09 2004

Post by joku »

The problem with that is - I need to do this programmatically.( Did I spell that right? =) )
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan »

Hello,

Yes you can do that programmatically (your spell is perfect 8) )

You have to do one of the following:

1 - You can open the pdf file, search for a given text in the document, get the name of the text object containing that text and then set it to a hyperlink.

2 - You can also open the pdf file, add a new text to it at a speciflic location, and set this text to be a hyperlink.

For further details or samples please send an e-mail to support@amyuni.com so we can send you any specific sample you may need.

Have a nice day !
Post Reply