Package org.apache.pdfbox.pdmodel.edit

Examples of org.apache.pdfbox.pdmodel.edit.PDPageContentStream.endText()


                PDPageContentStream contentStream = new PDPageContentStream(doc, page, true, true);
                contentStream.beginText();
                contentStream.setFont( font, fontSize );
                contentStream.moveTextPositionByAmount( centeredPosition, 30 );
                contentStream.drawString( message );
                contentStream.endText();
                contentStream.close();
            }


            doc.save( outfile );
View Full Code Here


                    page);
            contentStream.beginText();
            contentStream.setFont(font, 12);
            contentStream.moveTextPositionByAmount(100, 700);
            contentStream.drawString(message);
            contentStream.endText();
            contentStream.close();
            doc.save(file);
            System.out.println(file + " created!");
        }
        finally
View Full Code Here

                    {
                        page = new PDPage();
                        doc.addPage( page );
                        if( contentStream != null )
                        {
                            contentStream.endText();
                            contentStream.close();
                        }
                        contentStream = new PDPageContentStream(doc, page);
                        contentStream.setFont( font, fontSize );
                        contentStream.beginText();
View Full Code Here


            }
            if( contentStream != null )
            {
                contentStream.endText();
                contentStream.close();
            }
        }
        catch( IOException io )
        {
View Full Code Here

            contentStream.beginText();
            contentStream.setFont(fontHelveticaOblique, 11);
            contentStream.moveTextPositionByAmount(xpos, ypos);
            contentStream.drawString(footer);
            contentStream.endText();
        } finally {
            contentStream.close();
        }
    }
View Full Code Here

            for (String line : page) {
                contentStream.drawString(line);
                contentStream.moveTextPositionByAmount(0, -fontSize);
            }

            contentStream.endText();
            contentStream.close();
            doc.addPage(pg);
        }

        doc.save(out);
View Full Code Here

            contentStream.setFont(font, fontSize);

            drawPageText(page, contentStream);
            drawStenographer(transcript, page, contentStream);

            contentStream.endText();
            contentStream.close();
            doc.addPage(pg);
        }
        doc.save(out);
        doc.close();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.