Hi;
I use the last 2.x Version of IText and have two Problems with it in my current
project.
1 The code below produces Documents which cant be read by Acrobat correctly in
some cases. The documents are flagged as damaged by Acrobat Reader 9.3. If i
leave out PDFA and encryption the same Code works perfectly.Seems combination
or oder sensitifity is goeing on. Any idea (Order of Options?) what can cause
this or how to prevent it?
The code create a PDF from a TIFF - writes the PDF to a File (Cache) and a
Servlets streams the file to Browser Clients. The file in the Filesystem is
damaged - i opened it with acrobat directly.
2 I was unable to create a PDF with IText that Acrobat Reader can use with its
annotation Tools (marks, notes etc). I can set whatever i want -
in Acrobat Reader 9 the security shows everything allowed on the lowest
Level (Security Box) and not allowd on the top level (comments not allowd).
Is it true that only Acrobat 9 can set this Options (since allowing
everything isnt enough) ?
CODE
...
writer = PdfWriter.getInstance(document,new FileOutputStream(dst));
// File system
writer.setFullCompression(); // COMPRESSION
writer.setCompressionLevel(PdfStream.BEST_COMPRESSION);
writer.setPDFXConformance(PdfWriter.PDFA1A); // FORMAT
opts = PdfWriter.ALLOW_MODIFY_ANNOTATIONS |
PdfWriter.ALLOW_ASSEMBLY |
PdfWriter.ALLOW_PRINTING |
PdfWriter.ALLOW_COPY | PdfWriter.ALLOW_FILL_IN |
PdfWriter.ALLOW_DEGRADED_PRINTING |
PdfWriter.ALLOW_MODIFY_CONTENTS |
PdfWriter.ALLOW_SCREENREADERS;
writer.setEncryption("".getBytes(),"".getBytes(),opts,PdfWriter.STANDARD_ENCRYPTION_40);
writer.setViewerPreferences(PdfWriter.PageLayoutSinglePage);
writer.setViewerPreferences(PdfWriter.PageModeUseThumbs);
writer.setViewerPreferences(PdfWriter.CenterWindow);
RaImageProps props = new RaImageProps(); // METADATA
document.addTitle(props.getRaiDocTitel());
document.addSubject(props.getRaiDocTopic());
document.addKeywords(props.getRaiDocKeywords());
document.addCreator("SOME LABEL");
document.addAuthor(props.getRaiDocAuthor());
document.addProducer();
document.setPageSize(PageSize.A4); // ORIENTATION
document.setMargins(36, 36, 144, 108); // MARGINs L,R,T,B
(72,36,144,108)
writer.createXmpMetadata();
writer.setPdfVersion(PdfWriter.PDF_VERSION_1_7); // PDF VERSION
document.open();
PdfContentByte cb = writer.getDirectContent();
....
hburde
Mail: [email protected]
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions:
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/