ViewerPreferencesPageLayoutTwoColumnRightPageModeFullScreenNonFullScreenPageModeUseThumbs.java Source code

Java tutorial

Introduction

Here is the source code for ViewerPreferencesPageLayoutTwoColumnRightPageModeFullScreenNonFullScreenPageModeUseThumbs.java

Source

import java.io.FileOutputStream;

import com.lowagie.text.Document;
import com.lowagie.text.Font;
import com.lowagie.text.PageSize;
import com.lowagie.text.Paragraph;
import com.lowagie.text.pdf.PdfWriter;

public class ViewerPreferencesPageLayoutTwoColumnRightPageModeFullScreenNonFullScreenPageModeUseThumbs {
    public static void main(String[] args) {
        Document document = new Document(PageSize.A6);
        try {
            PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream(
                    "ViewerPreferencesPageLayoutTwoColumnRightPageModeFullScreenNonFullScreenPageModeUseThumbs.pdf"));

            writer.setViewerPreferences(PdfWriter.PageLayoutTwoColumnRight | PdfWriter.PageModeFullScreen
                    | PdfWriter.NonFullScreenPageModeUseThumbs);
            document.addTitle("This is the title.");
            document.open();

            document.add(new Paragraph(
                    "text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text ",
                    new Font(Font.HELVETICA, 12)));
        } catch (Exception de) {
            de.printStackTrace();
        }
        document.close();
    }
}