How to add Sticky Notes, Insert Text at cursor, .. Annotations in existing PDF file using iTextSharp with C#? -


i want add annotations comment in existing pdf file using itextsharp c#.

please give sample code add annotations in existing pdf file.

here ps script annotation:

[/contents (my text contents) /rect [100 600 150 550] /srcpg 1 /title (my title text) /color [0 0 1] /subtype /caret /ann pdfmark 

the itext(sharp) example timetableannotations1.java / timetableannotations1.cs chapter 7 of itext in action — 2nd edition shows how add annotations existing pdfs in general.

the central code (in c# example):

rect = getposition(screening); annotation = pdfannotation.createtext(     stamper.writer, rect, movie.movietitle,     string.format(info, movie.year, movie.duration),     false, "help" ); annotation.color = webcolors.getrgbcolor(     "#" + movie.entry.category.color ); stamper.addannotation(annotation, page); 

where stamper pdfstamper working on pdf file; movie data structure example retrieves title, text , color of annotation from.

pdfannotation offers multiple other create... methods create other types of annotations.


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -