Example usage for org.apache.pdfbox.contentstream.operator.text SetFontAndSize SetFontAndSize

List of usage examples for org.apache.pdfbox.contentstream.operator.text SetFontAndSize SetFontAndSize

Introduction

In this page you can find the example usage for org.apache.pdfbox.contentstream.operator.text SetFontAndSize SetFontAndSize.

Prototype

SetFontAndSize

Source Link

Usage

From source file:com.repeatability.pdf.PDFTextStreamEngine.java

License:Apache License

/**
 * Constructor./* ww w. j  a v  a 2  s  . c  o m*/
 */
PDFTextStreamEngine() throws IOException {
    addOperator(new BeginText());
    addOperator(new Concatenate());
    addOperator(new DrawObject()); // special text version
    addOperator(new EndText());
    addOperator(new SetGraphicsStateParameters());
    addOperator(new Save());
    addOperator(new Restore());
    addOperator(new NextLine());
    addOperator(new SetCharSpacing());
    addOperator(new MoveText());
    addOperator(new MoveTextSetLeading());
    addOperator(new SetFontAndSize());
    addOperator(new ShowText());
    addOperator(new ShowTextAdjusted());
    addOperator(new SetTextLeading());
    addOperator(new SetMatrix());
    addOperator(new SetTextRenderingMode());
    addOperator(new SetTextRise());
    addOperator(new SetWordSpacing());
    addOperator(new SetTextHorizontalScaling());
    addOperator(new ShowTextLine());
    addOperator(new ShowTextLineAndSpace());

    // load additional glyph list for Unicode mapping
    String path = "org/apache/pdfbox/resources/glyphlist/additional.txt";
    InputStream input = GlyphList.class.getClassLoader().getResourceAsStream(path);
    glyphList = new GlyphList(GlyphList.getAdobeGlyphList(), input);
}

From source file:org.fit.pdfdom.PDFBoxTree.java

License:Open Source License

public PDFBoxTree() throws IOException {
    super();//from   w ww . ja  va 2s .c o  m
    super.setSortByPosition(true);
    super.setSuppressDuplicateOverlappingText(true);

    //add operators for tracking the graphic state
    addOperator(new SetStrokingColorSpace());
    addOperator(new SetNonStrokingColorSpace());
    addOperator(new SetLineDashPattern());
    addOperator(new SetStrokingDeviceGrayColor());
    addOperator(new SetNonStrokingDeviceGrayColor());
    addOperator(new SetFlatness());
    addOperator(new SetLineJoinStyle());
    addOperator(new SetLineCapStyle());
    addOperator(new SetStrokingDeviceCMYKColor());
    addOperator(new SetNonStrokingDeviceCMYKColor());
    addOperator(new SetLineMiterLimit());
    addOperator(new SetStrokingDeviceRGBColor());
    addOperator(new SetNonStrokingDeviceRGBColor());
    addOperator(new SetRenderingIntent());
    addOperator(new SetStrokingColor());
    addOperator(new SetNonStrokingColor());
    addOperator(new SetStrokingColorN());
    addOperator(new SetNonStrokingColorN());
    addOperator(new SetFontAndSize());
    addOperator(new SetLineWidth());

    init();
}