itextpdf

java.lang.NoClassDefFoundError: com.itextpdf.text.Document

与世无争的帅哥 提交于 2019-12-04 13:38:01
I have added the .jar files into my existing project as described in http://www.vogella.com/articles/Eclipse/article.html#classpath . When I try to run the emulator I end up with “java.lang.NoClassDefFoundError: com.itextpdf.text.Document” My .classpath file : <classpath> <classpathentry kind="src" path="src"/> <classpathentry kind="src" path="gen"/> <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/> <classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/> <classpathentry kind="lib" path="lib/itext-pdfa-5.3.3-javadoc.jar"/> <classpathentry kind=

Fitting a JTable in an iText PDF Document

前提是你 提交于 2019-12-04 07:08:26
问题 I have a JTable that has four columns. I am using iText libraries to print PDF documents with data from the JTable. The problem is that the JTable is not showing properly in the PDF. I have searched on Google and came across the same situation here. The code is similar to mine as well as the output. I have also tried this example using Templates, however, the result is not changing. How do we solve this? Please assist. If the codes are necessary, i will post but they are too many classes -i

How to display indian rupee symbol in iText PDF in MVC3

余生长醉 提交于 2019-12-04 03:58:42
问题 I want to display Special Character India Rupee Symbol in iTextPDf, My Code: Font fontRupee = FontFactory.GetFont("Arial", "₹", true, 12); Chunk chunkRupee = new Chunk(" ₹ 5410", font3); 回答1: It's never a good idea to store a Unicode character such as ₹ in your source code. Plenty of things can go wrong if you do so: Somebody can save the file using an encoding different from Unicode, for instance, the double-byte rupee character can be interpreted as two separate bytes representing two

Merging Tagged PDF without ruining the tags

删除回忆录丶 提交于 2019-12-02 13:34:58
问题 I am trying to merge two Tagged PDF's with the iTextPDF 5.4.4 version jar. After doing all the operations while closing the document on the line: document.close();): . It throws the below error java.lang.NullPointerException PDF Creation Failed java.lang.NullPointerException [B@1d5c1d5c at com.itextpdf.text.pdf.PdfCopy.fixTaggedStructure(PdfCopy.java:878) at com.itextpdf.text.pdf.PdfCopy.flushTaggedObjects(PdfCopy.java:799) at com.itextpdf.text.pdf.PdfDocument.close(PdfDocument.java:836) at

PageSize of PDF always the same between landscape and portrait with itextpdf

浪子不回头ぞ 提交于 2019-12-02 12:38:04
问题 I have a PDFReader which contains some page in landscape mode and other in portrait. I need to distinct them to do some treatment... However, if I call the getOrientation or getPageSize, the value is always the same (595 for pagesize and 0 for orientation). Why isn't the value different for a page in landscape ? I've tryied to find other methods to retrieve page width / orientation but nothing worked. Here is my code : for(int i = 0; i < pdfreader.getNumberOfPages(); i++) { document =

Fitting a JTable in an iText PDF Document

时光毁灭记忆、已成空白 提交于 2019-12-02 08:50:16
I have a JTable that has four columns. I am using iText libraries to print PDF documents with data from the JTable. The problem is that the JTable is not showing properly in the PDF. I have searched on Google and came across the same situation here . The code is similar to mine as well as the output. I have also tried this example using Templates , however, the result is not changing. How do we solve this? Please assist. If the codes are necessary, i will post but they are too many classes -i am working on a big application. The concept I would want is to make the JTable fit on the document.

Merging Tagged PDF without ruining the tags

故事扮演 提交于 2019-12-02 06:54:11
I am trying to merge two Tagged PDF's with the iTextPDF 5.4.4 version jar. After doing all the operations while closing the document on the line: document.close();): . It throws the below error java.lang.NullPointerException PDF Creation Failed java.lang.NullPointerException [B@1d5c1d5c at com.itextpdf.text.pdf.PdfCopy.fixTaggedStructure(PdfCopy.java:878) at com.itextpdf.text.pdf.PdfCopy.flushTaggedObjects(PdfCopy.java:799) at com.itextpdf.text.pdf.PdfDocument.close(PdfDocument.java:836) at com.itextpdf.text.Document.close(Document.java:416) at PDFMerger.mergePDF(PDFMerger.java:189) Please let

PageSize of PDF always the same between landscape and portrait with itextpdf

扶醉桌前 提交于 2019-12-02 06:30:22
I have a PDFReader which contains some page in landscape mode and other in portrait. I need to distinct them to do some treatment... However, if I call the getOrientation or getPageSize, the value is always the same (595 for pagesize and 0 for orientation). Why isn't the value different for a page in landscape ? I've tryied to find other methods to retrieve page width / orientation but nothing worked. Here is my code : for(int i = 0; i < pdfreader.getNumberOfPages(); i++) { document = PdfStamper.getOverContent(i).getPdfDocument(); document.getPageSize().getWidth; //this will always be the same

iText setting Creation Date & Modified Date in sandbox.stamper.SuperImpose.java

北城以北 提交于 2019-12-01 22:36:44
问题 I'm trying to set Creation Date & Modified Date in the Superimposing content from one PDF into another PDF example sandbox.stamper.SuperImpose.java. The principle is (I think) clear: use getInfo() & then do info.put(PdfName.CREATIONDATE, new PdfDate(calendar)); or info.put("CreationDate", "D:20160508090344+02'00'"); depending on whether a HashMap<String, String> or PdfDictionary is available. But where? I just can't quite seem to find the right place to insert the code... I'm also having

iText setting Creation Date & Modified Date in sandbox.stamper.SuperImpose.java

懵懂的女人 提交于 2019-12-01 20:34:29
I'm trying to set Creation Date & Modified Date in the Superimposing content from one PDF into another PDF example sandbox.stamper.SuperImpose.java. The principle is (I think) clear: use getInfo() & then do info.put(PdfName.CREATIONDATE, new PdfDate(calendar)); or info.put("CreationDate", "D:20160508090344+02'00'"); depending on whether a HashMap<String, String> or PdfDictionary is available. But where? I just can't quite seem to find the right place to insert the code... I'm also having trouble overwriting the original Title attribute. Please take a look at the following files state.pdf and