Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » iText »

[iText-questions] Null pointer exception when trying to set zoom to 100%

david allen

2005-06-04


Hi all,

I am getting a null pointer exception when trying to set the zoom to 100%

Here is my code:

Document document = new Document(new Rectangle( 500, 500));

ByteArrayOutputStream out = new ByteArrayOutputStream();

PdfWriter writer = PdfWriter.getInstance(document, out);

writer.setOpenAction(PdfAction.gotoLocalPage(1, new
PdfDestination(PdfDestination.XYZ, 0, 10000, 1), writer));

The null pointer exception is generated on the writer.setOpenAction line.

Please help as this has been very frustrating.

Thank you
david




-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
iText-questions mailing list
iText-questions@(protected)
https://lists.sourceforge.net/lists/listinfo/itext-questions
©2008 junlu.com - Jax Systems, LLC, U.S.A.