Possible to put HTML annotations on PDF? -


i know can put text, links , videos..but can put html annotation well?

if there's sdk, please point me well.

i have tried search as possible couldn't find on it.

updated: okay, here more details. i'm creating script create pdf image, , @ same time have place annotations on top of image. when person click annotation, html shown. understand there link annotations , shape annotation, i'm looking ability place html markup/codes in annotation. example, able design simple form or style text or embed youtube video.

i hope i'm clear.

thanks!

here goes basic sample code : please add itext jar in project

code :

import com.itextpdf.text.document; import com.itextpdf.text.pagesize; import com.itextpdf.text.rectangle; import com.itextpdf.text.pdf.pdfwriter; import com.itextpdf.text.image; //input image in string format    public void createfromimage(string input){         document document = new document(pagesize.a4.rotate());         document.setmargins(0,0,0,0);                  string output = "c:/users/username/downloads/text.pdf";         try {             fileoutputstream fileoutputstream = new fileoutputstream(output);             pdfwriter pdfwriter = pdfwriter.getinstance(document, fileoutputstream);             image image = image.getinstance(input);             document.setpagesize(new rectangle(image.getwidth(),image.getheight()));             document.open();             pdfwriter.open();             document.add(image);             document.close();             pdfwriter.close();         } catch (exception e){             e.printstacktrace();         }     } 

you can add annotations in above way, , link annotations, refer link below :

https://pdfbox.apache.org/apidocs/org/apache/pdfbox/pdmodel/interactive/annotation/pdannotationlink.html

please note, simple example.


Comments

Popular posts from this blog

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -