pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "T. Groch" <t.gr...@gmail.com>
Subject Make the jar smaller?
Date Thu, 25 Nov 2010 07:00:14 GMT

I just use PDFbox to edit some PDFs and I have some problems with the
filesize. Is it somehow possible to shrink it? I don't know which files I
can delete.
My own code generally looks like this:

PDDocument doc = PDDocument.load(fileFoo);
List<PDPage> list = doc.getDocumentCatalog().getAllPages();
PDPage page = (PDPage) list.get(0);
PDFont font = PDType1Font.HELVETICA_BOLD;
PDPageContentStream cs = new PDPageContentStream(doc, page, true, true);
cs.setFont(font, 8);
cs.moveTextPositionByAmount(140, 754);
doc.save(sPathToOutputPDF + sPDFFilenamePrefix + sPDFFilenamePostfix +

So, I don't think I use much of PDFbox' capabilities. My program is on a LAN
server, so that all users can access it. And the 10 mb make it really slow.
Thanks in advance.

Best regards,


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message