Package org.pdfbox.pdmodel.font

Examples of org.pdfbox.pdmodel.font.PDFont


        {
            doc = new PDDocument();
           
            PDPage page = new PDPage();
            doc.addPage( page );
            PDFont font = PDType1Font.HELVETICA_BOLD;
           
            PDPageContentStream contentStream = new PDPageContentStream(doc, page);
            contentStream.beginText();
            contentStream.setFont( font, 12 );
            contentStream.moveTextPositionByAmount( 100, 700 );
View Full Code Here


      {
      final PDPage page = (PDPage) iter.next();
      try {
          for (final Iterator fontIterator = page.findResources().getFonts().values().iterator();
              fontIterator.hasNext();) {
            final PDFont font = (PDFont) fontIterator.next();
            fonts.add(new PDFBoxPDFFont(font, iter.nextIndex())); // nextIndex() because page number start with 1 not 0
          }
        }
          catch (final IOException e)
          {
View Full Code Here

        Iterator iter = fonts.keySet().iterator();
        COSDictionary dic = new COSDictionary();
        while( iter.hasNext() )
        {
            COSName name = (COSName)iter.next();
            PDFont font = (PDFont)fonts.get( name );
            dic.setItem( name, font.getCOSObject() );
        }
    }
View Full Code Here

TOP

Related Classes of org.pdfbox.pdmodel.font.PDFont

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.