Howard,

 

I’m finding some troubles building and writing the rtf tag! 

I have no experience with rtf specification so I’m confused on how to build the 
tag!

I created a rtf document in Word, open it with notepad++, and saw how tag is 
built ({\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid11358770 HYPERLINK 
"../Documents/Frutas.docx"}).

 

After this I tried this kick example, 

 

currentParagraph.add(new Chunk(“here is my link”));

                                String hyper = "{\\rtlch\\fcs1 \\af31507 
\\ltrch\\fcs0 \\insrsid11358770 HYPERLINK "../Documents/Frutas.docx"}”;

                                currentParagraph.add(new 
RtfDirectContent(hyper));

 

But no content is added!

 

If not asking too much, I would like to ask you some questions!

I’m creating the tag in the correct way? I think that the rtf tag does not 
needs all that ‘crap’ before the HYPERLINK word? I saw the rtf specs and I got 
more confused…

Do I have to encapsulate the RtfDirectContent inside something? What I’m I 
missing here? 

 

Can you show me some light please J

Again, many thanks and good weekend, 

Rico

 

 

From: Howard Shank [mailto:[email protected]] 
Sent: sexta-feira, 19 de Junho de 2009 14:38
To: Post all your questions about iText here
Subject: Re: [iText-questions] RTF Anchor to external file with relative path!

 

You would need to use direct content and build the RTF tag/block yourself.

Howard Shank

 

  _____  

From: Luís Tiago Rico <[email protected]>
To: Post all your questions about iText here 
<[email protected]>
Sent: Thursday, June 18, 2009 12:23:38 PM
Subject: [iText-questions] RTF Anchor to external file with relative path!

Hi to all,

 

I want to create a link from RTF to a external file with a relative path!

I know Anchor’s are only for hyperlinks in PDF, and PdfAction is nor supported 
in RTF.

Setting the refence of the anchor to file:/// only works with absolute paths….

 

So my question is it possible to build a anchor for a file with a relative path?

 

Thanks in advance

Rico

 

 

------------------------------------------------------------------------------
Are you an open source citizen? Join us for the Open Source Bridge conference!
Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250.
Need another reason to go? 24-hour hacker lounge. Register today!
http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Reply via email to