PDF Generating Tool Support Forum

HOME   Login   Register    Search




  Subject: rendering <a> tags so they are still clickable in pdf
   PostPosted: 26 May 2011, 23:02 
Hi,
I'm using PD4ML 3.5.1-b8 pro, and I'm having trouble with simple <a> tag rendering.
My code looks like this:
Code:
StringReader isr = new StringReader("<html><head></head><body><a href='http://www.google.com'>Google</a></body></html>");
ByteArrayOutputStream stream = new ByteArrayOutputStream();
PD4ML pd4ml = new PD4ML();
try {
    pd4ml.render(isr, stream);
}
return stream.toByteArray();

However, even though the "Google" shows up in blue and underlined, I can't click on it in Adobe Acrobat to open a link.
On the other hand, if I also use a PD4PageMark footer and setHtmlTemplate, any <a> tags in the footer will work just fine. What am I doing wrong to get <a> tags in the main body to be rendered so they are still functional?
Thanks.


  Subject: Re: rendering <a> tags so they are still clickable in pdf
   PostPosted: 27 May 2011, 15:32 
Did you try it with actual (evaluation) versions of PD4ML?


  Subject: Re: rendering <a> tags so they are still clickable in pdf
   PostPosted: 09 Jun 2011, 18:34 
Thank you for the prompt response. I discovered that the problem was not with pd4ml, but with the iText code I was using to merge multiple pdf files together with. Pd4ml is creating the hyperlinks in pdfs perfectly.



[Reply]     [ 3 posts ] 

Copyright ©2004-10 zefer|org. All rights reserved. Bookmark and Share