Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

iText PDF - Setting Page Magnification?

 
M Burke
Ranch Hand
Posts: 406
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am generating a pfd using iText-Java, but when someone openes it, the magnification is set randomly. Is there a way I can default it?

My code is pretty straight forward...

Document document = new Document();
PdfWriter.getInstance(document, new FileOutputStream(fileName));
document.open();

PdfPTable table = new PdfPTable(1);
table.setWidthPercentage(100);
PdfPCell cell = new PdfPCell("Cell Text");

cell.setColspan(1);
table.addCell(cell);
document.add(table);
document.close();


 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic