![]() In Figure 4.2, we created an annotation that is invisible, but that shows an URL if you hover over its location. We ask the PdfDocument for its first page and add the annotation. We set the color, title (a PdfString), contents (a String), and the open status of the annotation. We define the location of the text annotation using a Rectangle. + "you can truly take your documentation needs to the next level.") The only difference is that we create and add an annotation: PdfAnnotation ann = new PdfTextAnnotation(new Rectangle(20, 800, 0, 0)) Most of the code of the TextAnnotation example is identical to the Hello World example. On top of the text, we've added a green text annotation. Figure 4.1 shows a PDF with a Paragraph of text. We'll start with a series of simple examples. There are many different types of annotations, many of which allow user interaction. They are usually added on top of the existing content. Annotations aren't part of the content stream. We'll add interactive features, known as annotations. ![]() In this chapter, we'll add content of a different nature. lineTo(), moveTo(), stroke()), iText converted everything to PDF syntax that was written to one or more content streams. ![]() a Paragraph) or low-level instructions (e.g. It didn't matter if we were adding high-level objects (e.g. ![]() In the previous chapters, we've created PDF documents by adding content to a page. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |