Java Tutorial/PDF/Thumbs — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Текущая версия на 08:21, 1 июня 2010
PdfWriter.PageModeUseThumbs
<source lang="java">
import java.io.FileOutputStream; import com.lowagie.text.Document; import com.lowagie.text.Paragraph; import com.lowagie.text.pdf.PdfWriter; public class MainClass {
public static void main(String[] args) throws Exception { Document document = new Document(); PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream("thumb_image.pdf")); writer.setViewerPreferences(PdfWriter.PageModeUseThumbs); document.open(); Paragraph hello = new Paragraph("(English:) hello, "); document.add(hello); document.newPage(); document.add(new Paragraph("A")); document.add(hello); document.add(new Paragraph("B")); document.add(hello); document.close(); }
}</source>