Examples of writeTokens()


Examples of org.apache.pdfbox.pdfwriter.ContentStreamWriter.writeTokens()

                            int bmcIndex = tokens.indexOf( PDFOperator.getOperator( "BMC" ) );
                            int emcIndex = tokens.indexOf( PDFOperator.getOperator( "EMC" ) );

                            if( bmcIndex != -1 )
                            {
                                writer.writeTokens( tokens, 0, bmcIndex+1 );
                            }
                            else
                            {
                                writer.writeTokens( tokens );
                            }
View Full Code Here

Examples of org.apache.pdfbox.pdfwriter.ContentStreamWriter.writeTokens()

                            {
                                writer.writeTokens( tokens, 0, bmcIndex+1 );
                            }
                            else
                            {
                                writer.writeTokens( tokens );
                            }
                            output.write( "\n".getBytes("ISO-8859-1") );
                            insertGeneratedAppearance( widget, output,
                                pdFont, tokens, appearanceStream );
                            if( emcIndex != -1 )
View Full Code Here

Examples of org.apache.pdfbox.pdfwriter.ContentStreamWriter.writeTokens()

                            output.write( "\n".getBytes("ISO-8859-1") );
                            insertGeneratedAppearance( widget, output,
                                pdFont, tokens, appearanceStream );
                            if( emcIndex != -1 )
                            {
                                writer.writeTokens( tokens, emcIndex, tokens.size() );
                            }
                        }
                        writeToStream( output.toByteArray(), appearanceStream );
                    }
                    else
View Full Code Here

Examples of org.apache.pdfbox.pdfwriter.ContentStreamWriter.writeTokens()

            if(fontIndex != -1 )
            {
                daTokens.set( fontIndex-1, new COSFloat( fontSize ) );
            }
            ContentStreamWriter daWriter = new ContentStreamWriter(output);
            daWriter.writeTokens( daTokens );
        }
        printWriter.println( getTextPosition( boundingBox, pdFont, fontSize, tokens ) );
        int q = getQ();
        if( q == PDTextbox.QUADDING_LEFT )
        {
View Full Code Here

Examples of org.apache.pdfbox.pdfwriter.ContentStreamWriter.writeTokens()

                //now that the tokens are updated we will replace the
                //page content stream.
                PDStream updatedStream = new PDStream(doc);
                OutputStream out = updatedStream.createOutputStream();
                ContentStreamWriter tokenWriter = new ContentStreamWriter(out);
                tokenWriter.writeTokens( tokens );
                page.setContents( updatedStream );
            }
            doc.save( outputFile );
        }
        finally
View Full Code Here

Examples of org.apache.pdfbox.pdfwriter.ContentStreamWriter.writeTokens()

                    //BJL 9/25/2004 Must prepend existing stream
                    //because it might have operators to draw things like
                    //rectangles and such
                    ContentStreamWriter writer = new ContentStreamWriter( output );
                    writer.writeTokens( tokens );

                    output.write( " /Tx BMC\n".getBytes("ISO-8859-1") );
                    insertGeneratedAppearance( widget, output, pdFont, tokens, appearanceStream );
                    output.write( " EMC".getBytes("ISO-8859-1") );
                    writeToStream( output.toByteArray(), appearanceStream );
View Full Code Here

Examples of org.apache.pdfbox.pdfwriter.ContentStreamWriter.writeTokens()

                        }
                        int setFontIndex = tokens.indexOf( PDFOperator.getOperator( "Tf" ));
                        tokens.set( setFontIndex-1, new COSFloat( fontSize ) );
                        if( foundString )
                        {
                            writer.writeTokens( tokens );
                        }
                        else
                        {
                            int bmcIndex = tokens.indexOf( PDFOperator.getOperator( "BMC" ) );
                            int emcIndex = tokens.indexOf( PDFOperator.getOperator( "EMC" ) );
View Full Code Here

Examples of org.apache.pdfbox.pdfwriter.ContentStreamWriter.writeTokens()

                            int bmcIndex = tokens.indexOf( PDFOperator.getOperator( "BMC" ) );
                            int emcIndex = tokens.indexOf( PDFOperator.getOperator( "EMC" ) );

                            if( bmcIndex != -1 )
                            {
                                writer.writeTokens( tokens, 0, bmcIndex+1 );
                            }
                            else
                            {
                                writer.writeTokens( tokens );
                            }
View Full Code Here

Examples of org.apache.pdfbox.pdfwriter.ContentStreamWriter.writeTokens()

                            {
                                writer.writeTokens( tokens, 0, bmcIndex+1 );
                            }
                            else
                            {
                                writer.writeTokens( tokens );
                            }
                            output.write( "\n".getBytes("ISO-8859-1") );
                            insertGeneratedAppearance( widget, output,
                                pdFont, tokens, appearanceStream );
                            if( emcIndex != -1 )
View Full Code Here

Examples of org.apache.pdfbox.pdfwriter.ContentStreamWriter.writeTokens()

                            output.write( "\n".getBytes("ISO-8859-1") );
                            insertGeneratedAppearance( widget, output,
                                pdFont, tokens, appearanceStream );
                            if( emcIndex != -1 )
                            {
                                writer.writeTokens( tokens, emcIndex, tokens.size() );
                            }
                        }
                        writeToStream( output.toByteArray(), appearanceStream );
                    }
                    else
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.