create link to html anchor with pdf attachment

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

create link to html anchor with pdf attachment

vimalsinghal
hi

I am using itext sharp to generate the pdf from HTML content

in html content i am having the anchor tag which point to some file

so i need to get the file and attach that file as an attachment and need to replace the anchor tag href path accordingly.

i am able to create the attachment using

  PdfAnnotation attachment = PdfAnnotation.CreateFileAttachment(....);

now i want to replace the anchor tag href to point to correct file in the pdf attachment

i tried <a href=\"CID:Name.doc\">Name.doc  but it is not working , it give the popup but file doesn't opens up i want this way only so that i didn't loose the formatting.

can some one help me on this.