{oapdf_gg}
Syste m . Drawing.Bitmapsample code 0610 is a more advanced topic for the following reasons:
TIFF and CCITTsample code 0611 is a more advanced topic, for example, a TIFF file converted to PDF documents. u picture mask sample code in 0613, we have created a mask for the image
the picture size is 8 กม 8 pixels, each one byte, the use of makeMask () method can be converted into a mask. byte maskr [] = ((byte) 0x3c, (byte) 0x7e, (byte) 0xe7, (byte) 0xc3, (byte) 0xc3, (byte) 0xe7, (byte) 0x7e, (byte) 0x3c); Image mask = Image.getInstance (8, 8, 1, 1, maskr); mask.makeMask (); mask.setInvertMask (true); we can directly use the mask to cover part of the other pictures. PdfContentByte cb = writer.DirectContent; Image image = Image.getInstance ( "vonnegut.gif "); image.ImageMask = mask; Wethe mask or cover up the crime for the template. PdfContentByte cb = writer.DirectContent; cb.setRGBColorFill (255, 0, 0); cb.addImage (mask, mask.scaledWidth () * 8, 0, 0, mask.scaledHeight () * 8, 100, 400); more information on the object ContentByte see chap. pictures and other objectsu picture in block Sometimes, pictures can be easily placed in block by a certain offset of a picture placed in block: Chunk ck = new Chunk (img, 0, -5); specific code, see sample code 0614, we can add a special picture of the block to the phrase, tables and so on, the picture in this case go to /upfile/2009417/2009417205948162.png to download. u picture in the table you can add pictures to the cell, but there are two side effects: l is to determine the width of the table, when the picture beyond the width of the cell, it will be automatically narrowed. You can notl wrapping text and add an underscore for the picture. see the sample code 0615. Notesu picture link If you want a clickable image, or would like to add a link to the picture on the Notes, you need to create a Annotation object, and add to the picture, you do not need to specify the location (you can use 0,0,0, 0), the location will be updated to fit within the picture. gif.Annotation = new Annotation (0, 0, 0, 0, "Chap1102b.pdf", 3); jpeg.Annotation = new Annotation ( "picture", "These are my children", 0, 0, 0, 0); sample code to participate in 0616. |