I am having a problem with a blank page showing up after every time I add an 
instance of an image.  If anybody could help me out with a work around, I 
would greatly appreciate it.  I will list the pertinent code below.


public static void main(int commonid, int orgid) throws Exception {

            Document document = new Document(PageSize.A4.rotate());

            PdfWriter writer = PdfWriter.getInstance(document, new 
FileOutputStream(file_name));
            PdfContentByte cb = writer.getDirectContent();

            Image form = Image.getInstance("/Users/stephen/form.gif");
            form.setAlignment(Image.TOP);
            document.open();

            cb.beginText();
            BaseFont bf = BaseFont.createFont(BaseFont.HELVETICA, 
BaseFont.CP1252, BaseFont.NOT_EMBEDDED);

            cb.setFontAndSize(bf, 35);
            cb.showTextAligned(cb.ALIGN_CENTER, orgname, 430, 500, 0);   // 
draw the ORGNAME --430

            document.add(form);
            /* tell the content byte that we're done writing. */
            cb.endText();
        }
        catch(DocumentException de) {
            System.err.println(de.getMessage());
        }
        catch(IOException ioe) {
            System.err.println(ioe.getMessage());
        }
        // step 5: we close the document
        document.close();
    }




_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com


_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to