itext7

Itext7 generate pdf with Exception “Pdf indirect object belongs to other PDF document. Copy object to current pdf document.”

我的未来我决定 提交于 2019-11-29 10:08:24
i want to generate a pdf with itext 7,but some wrong happens to us: com.itextpdf.kernel.PdfException: Pdf indirect object belongs to other PDF document. Copy object to current pdf document. at com.itextpdf.kernel.pdf.PdfOutputStream.write(PdfOutputStream.java:195) ~[kernel-7.0.2.jar:na] at com.itextpdf.kernel.pdf.PdfOutputStream.write(PdfOutputStream.java:185) ~[kernel-7.0.2.jar:na] at com.itextpdf.kernel.pdf.PdfOutputStream.write(PdfOutputStream.java:115) ~[kernel-7.0.2.jar:na] at com.itextpdf.kernel.pdf.PdfOutputStream.write(PdfOutputStream.java:187) ~[kernel-7.0.2.jar:na] at com.itextpdf

iText7 Performance Issue Compared With iTextSharp

故事扮演 提交于 2019-11-28 14:51:45
I have tested iTextsharp and iText7 for HTML to PDF conversion. Based on the performance iTextsharp is taking 3 minutes for 10000 PDF creation. But iText7 taking 17 minutes for 10000 PDF creation. Since iText7 is new Version compared to iTextsharp,i decided to use iText7 for Commercial Purpose. But Performance wise iText7 is Low.So Please Tell me How to improve performance of HTML to PDF conversion in iText7? Testing in iText7 For i As Integer = 0 To 10000 HTML = ReadFile '=> Read HTML file from particular location 'HTML = Replace(HTML) => To Replace the content dynamically Dim writer As

How to display Arabic strings from RTL in PDF generated using itext 7 API?

可紊 提交于 2019-11-28 14:20:44
I'm struggling with this problem for hours now but I can't find a way out, the problem is that: I wrote a program that generate a pdf file using itext version 7 (and a lot of it) along with some statistics, every things is right till here, but when my pdf should contain some arabic strings they just appear from left to right, no matter what I've tried (changing fonts, using universal encodings, making the string inside a cell of table, using canvas, ...) I can't make them appear normally. Here is a piece of code I use for displaying arabic strings: PdfFont fArabic=PdfFontFactory.createFont

In Itext 7, how to sign a pdf with 2 steps?

*爱你&永不变心* 提交于 2019-11-28 11:00:00
问题 Following the answers given in this previous question : In Itext 7, how to get the range stream to sign a pdf?, i've tried to reimplement the two steps signing method working in Itext 5 but i encounter an issue when trying to reopen the document result of the first step (with the PdfReader or a pdf reader).(invalid document) Here is the presigning part for a document already containing an empty signature field named certification ... why is the result of this step invalid ? PdfReader reader =

How to add an SVG to a PDF using iText7

痞子三分冷 提交于 2019-11-28 09:33:39
问题 I need to add an SVG graphic into PDF file. Is it that possible using iText7? Using iText5: BufferedReader in = new BufferedReader(new InputStreamReader(svgUrl.openStream())); String xmlParser = XMLResourceDescriptor.getXMLParserClassName(); SVGDocument svgDoc = new SAXSVGDocumentFactory(xmlParser).createSVGDocument(null, in); in.close(); // Try to read embedded height and width float svgWidth = Float.parseFloat(svgDoc.getDocumentElement().getAttribute("width").replaceAll("[^0-9.,]",""));

In Itext 7, how to get the range stream to sign a pdf?

梦想与她 提交于 2019-11-28 08:45:09
问题 I'm trying to migrate my application from iText 5.5.9 to iText 7 and I have a problem with signing a document on the server using a signature created on the client (described in the Digital Signatures for PDF documents). As the getRangeStream() method isn't public anymore as it was in iText 5.5.9, how can I obtain a reference to the range stream? 回答1: getRangeStream is not the only method that was refactored from PdfSignatureAppearance to PdfSigner and made protected on that way. The same

Is it possible to merger several pdfs using iText7

邮差的信 提交于 2019-11-28 08:09:54
问题 I have several datasheets for products. Each is a separate file. What I want to do is to use iText to generate a summary / recommended set of actions, based on answers to a webform, and then append to that all the relevant datasheets. This way, I only need to open one new tab in the browser to print all information, rather than opening one for the summary, and one for each datasheet that is needed. So, is it possible to do this using iText? 回答1: Yes, you can merge PDFs using iText 7. E.g.

Itext7 generate pdf with Exception “Pdf indirect object belongs to other PDF document. Copy object to current pdf document.”

北城余情 提交于 2019-11-28 03:34:22
问题 i want to generate a pdf with itext 7,but some wrong happens to us: com.itextpdf.kernel.PdfException: Pdf indirect object belongs to other PDF document. Copy object to current pdf document. at com.itextpdf.kernel.pdf.PdfOutputStream.write(PdfOutputStream.java:195) ~[kernel-7.0.2.jar:na] at com.itextpdf.kernel.pdf.PdfOutputStream.write(PdfOutputStream.java:185) ~[kernel-7.0.2.jar:na] at com.itextpdf.kernel.pdf.PdfOutputStream.write(PdfOutputStream.java:115) ~[kernel-7.0.2.jar:na] at com

iText7 LtvVerification.addVerification not enabling LTV

左心房为你撑大大i 提交于 2019-11-28 00:37:26
We are trying to make the signed signature LTV enabled. I am using the below code to add verification. When signature.isTsp() is false, the PDF says Signature is not LTV enabled , though in the other case (signature.isTsp() is true) it shows as valid. When we open the PDF and try to manually add verification info by right clicking on the signature it enables LTV without any issue. Not sure what we are missing here. Any input will be highly helpful. // Adds LTV-enabled information to the PDF document. private ByteArrayOutputStream addLtv(final IOcspClient ocspClient, final ByteArrayOutputStream

iText7 Performance Issue Compared With iTextSharp

馋奶兔 提交于 2019-11-27 19:39:59
问题 I have tested iTextsharp and iText7 for HTML to PDF conversion. Based on the performance iTextsharp is taking 3 minutes for 10000 PDF creation. But iText7 taking 17 minutes for 10000 PDF creation. Since iText7 is new Version compared to iTextsharp,i decided to use iText7 for Commercial Purpose. But Performance wise iText7 is Low.So Please Tell me How to improve performance of HTML to PDF conversion in iText7? Testing in iText7 For i As Integer = 0 To 10000 HTML = ReadFile '=> Read HTML file