itext

Line spacing in iText list item or JTextArea

风格不统一 提交于 2020-01-24 11:00:13
问题 I need to syncronise line spacing of my PDF ListItem and JTextArea in my GUI. I can do it by adjusting one or another. And it all works great unil a ListItem (or JTextArea) is more than one line long (line wrap is set to true in JTextArea). I can adjust the height between the two ListItems. That distance will also be applied to the height between two rows of a single multiline ListItem. However, in my GUI, due to compononet boreders and default line spacing in JTextArea, those two are not the

Why does maven build fails on dowloading itext from incorrect repo?

﹥>﹥吖頭↗ 提交于 2020-01-24 09:10:46
问题 I am downloading certain dependency from external repository. So I have added following repository tag to my pom.xml <repository> <id>cdatoolsrelease</id> <name>cdatools.com-releases</name> <url>http://www.cdatools.com:8081/artifactory/ext-release-local</url> </repository> <repository> <id>cdatoolssnapshot</id> <name>cdatools.com-snapshot</name> <url>http://www.cdatools.com:8081/artifactory/libs-snapshot-local</url> </repository> Everything works well. I can see my required dependencies

“Find Tag from Selection” is not working in tagged pdf?

不羁的心 提交于 2020-01-24 08:51:30
问题 I have tagged a pdf using pdfbox. How I was tagged: Instead of extract text and tagging I am adding mcid's to the existing content stream (both open and closing ex: /p<< MCID 0 >> BDC .. .. .. EMC) and then I am adding that marked content to document root catalog structure. What working: Almost everything is working fine like completely tagged pdf. It is passing the PAC3 accessibility checker also. //Adding tags tokens.add(++ind, type_check(t_ype, page)); currentMarkedContentDictionary = new

Add text and an alligned image to a ColumnText Itext

萝らか妹 提交于 2020-01-24 01:31:20
问题 I am writing text from right to left. how can i add an image at the end of the text (alligned nicely)? 回答1: The question isn't entirely clear. The order of objects added to a Document is always respected, except in the case of Image objects. If an Image object doesn't fit the page, it can be forwarded to the next page, and other content can be added first. If you want to avoid this, use writer.setStrictImageSequence(true) ; However: you're writing from Right to Left (probably in Hebrew), so

External signing PDF with iText (2) [closed]

无人久伴 提交于 2020-01-24 01:10:12
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 13 days ago . Following External signing PDF with iText by Grazina, and reading the mkl answer on that post, I currently have invalid signature (syntax error), even after adding the hash prefix. Current code: private void SignPDFCore(string pdfFilePath) { var chain = this.GetUserCertificates(userId, ProgramV2

External signing PDF with iTextsharp (3)

痴心易碎 提交于 2020-01-23 17:27:05
问题 Need to sign PDF by using an external webservice that signs the document hash, the process has to be done in 2 steps, and using a temporary empty signature. Following Priyanka question and Grazina question and reading the mkl answers on that posts, I currently have invalid signature, even after adding the hash prefix like Grazina did. iTextSharp version: 5.5.13.1 This program is another aproach to my previous question. Current code (compiles and starts calling SignPDF method): public class

Modifying an Existing PDF without creating an new pdf file

只愿长相守 提交于 2020-01-23 17:16:21
问题 Using iText, I am wanting to open a PDF file, add some more pages with text to it, and then close it. I have found some questions like this on here, but all require creating a new PDF file. Is there any way to read in the pdf file and modify it and then overwrite the original? 回答1: Of course you can create a new pdf file, and afterwards overwriting the old file with the new one. Commons Apache File Util forceDelete(oldPdf) moveFile(newPdf, oldPdf) 回答2: Of course, you can always overwrite a

PdfPKCS7 .verify() return false

别等时光非礼了梦想. 提交于 2020-01-23 04:00:09
问题 I have been working with itextpdf-5.5.5, and the Integrity check return false. PdfPKCS7 pkcs7 = fields.verifySignature(name); pkcs7.verify();<------ HERE return false But Adobe Acrobat Reader say: Signed and all signatures are valid. :( This is the document: Test.pdf. Could someone explain what is happening?. Thanks in advance 回答1: The CMS signature container embedded in your PDF has some questionable properties. In particular it has an encapsulated content, even though it merely is a byte

Sign PDF hash using java and iText

一笑奈何 提交于 2020-01-23 03:52:05
问题 I have an application that generates a PDF, and that needs to be signed. We have not the certificates to sign the document, because they're in a HSM, and the only way we could make use of the certificates is using a webservice. PdfReader reader = new PdfReader(src); reader.setAppendable(true); ByteArrayOutputStream baos = new ByteArrayOutputStream(); FileOutputStream fout = new FileOutputStream(dest); PdfStamper stamper = PdfStamper.createSignature(reader, fout, '\0'); PdfSignatureAppearance

Replace JasperReport iText 2.1.7 with latest iText 7.0.1

笑着哭i 提交于 2020-01-23 01:26:30
问题 We are using JasperReport 6.1.0 which has a dependency to com.lowagie:itext:jar:2.1.7.js2. It looks like iText 2.1.7 has IP issue, and iText is asking all users to use the latest version which requires a commercial license. So we would like to buy iText license. Now iText latest version is 7.0.1. I tried did below steps to replace JasperReport's iText 2.1.7 with latest iText 7.0.1: 1. Exclude default itext 2.1.7 dependency in pom.xml <dependency> <groupId>net.sf.jasperreports</groupId>