itext

Tag structure initialization failed, tag structure is ignored, it might be corrupted

a 夏天 提交于 2021-01-07 01:31:15
问题 I created a fillable PDF using Adobe Acrobat pro and tagged the input fields. Tagged Content, Tagged annotations, Tagged Form Fields passed in the Accessibility check for the document I am trying to fill using itext. I am getting this error when i am trying to fill the document from java code using itext library. ERROR com.itextpdf.kernel.pdf.PdfDocument - Tag structure initialization failed, tag structure is ignored, it might be corrupted. com.itextpdf.kernel.PdfException: StructParent index

Howto keep PDF-A when signing a document using IText SignDeferred

烈酒焚心 提交于 2021-01-05 05:54:11
问题 I do apply a signature to a pdf document via delayed signing(SignDeferred) using IText. The process contains the following steps: Prepare the pdf document for siging Reserve space for the signature in the pdf document Create the hash value of the pdf document Create the signature based on the hash value Using a self signed certificate Apply the signature to the pdf document The whole process works and i end with a pdf document where the signature is set and is valid. The original pdf is a PDF

Howto keep PDF-A when signing a document using IText SignDeferred

丶灬走出姿态 提交于 2021-01-05 05:51:43
问题 I do apply a signature to a pdf document via delayed signing(SignDeferred) using IText. The process contains the following steps: Prepare the pdf document for siging Reserve space for the signature in the pdf document Create the hash value of the pdf document Create the signature based on the hash value Using a self signed certificate Apply the signature to the pdf document The whole process works and i end with a pdf document where the signature is set and is valid. The original pdf is a PDF

Illegal reflective access operation warning with iText PDF FontFactory.registerDirectories() and Java 11

家住魔仙堡 提交于 2020-12-30 03:14:14
问题 Is it possible to avoid Illegal reflective access operation warning with iText PDF FontFactory.registerDirectories() and Java 11 ? Steps for reproducing the problem: Install OpenJDK 11 . Add iText PDF library v5.5.13.2 to your Java project. Call com.itextpdf.text.FontFactory.registerDirectories() . See the warning: WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by com.itextpdf.text.io.ByteBufferRandomAccessSource$1 to method java.nio

Illegal reflective access operation warning with iText PDF FontFactory.registerDirectories() and Java 11

南笙酒味 提交于 2020-12-30 03:13:52
问题 Is it possible to avoid Illegal reflective access operation warning with iText PDF FontFactory.registerDirectories() and Java 11 ? Steps for reproducing the problem: Install OpenJDK 11 . Add iText PDF library v5.5.13.2 to your Java project. Call com.itextpdf.text.FontFactory.registerDirectories() . See the warning: WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by com.itextpdf.text.io.ByteBufferRandomAccessSource$1 to method java.nio

Illegal reflective access operation warning with iText PDF FontFactory.registerDirectories() and Java 11

倖福魔咒の 提交于 2020-12-30 03:11:45
问题 Is it possible to avoid Illegal reflective access operation warning with iText PDF FontFactory.registerDirectories() and Java 11 ? Steps for reproducing the problem: Install OpenJDK 11 . Add iText PDF library v5.5.13.2 to your Java project. Call com.itextpdf.text.FontFactory.registerDirectories() . See the warning: WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by com.itextpdf.text.io.ByteBufferRandomAccessSource$1 to method java.nio

Illegal reflective access operation warning with iText PDF FontFactory.registerDirectories() and Java 11

若如初见. 提交于 2020-12-30 03:11:33
问题 Is it possible to avoid Illegal reflective access operation warning with iText PDF FontFactory.registerDirectories() and Java 11 ? Steps for reproducing the problem: Install OpenJDK 11 . Add iText PDF library v5.5.13.2 to your Java project. Call com.itextpdf.text.FontFactory.registerDirectories() . See the warning: WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by com.itextpdf.text.io.ByteBufferRandomAccessSource$1 to method java.nio

Illegal reflective access operation warning with iText PDF FontFactory.registerDirectories() and Java 11

笑着哭i 提交于 2020-12-30 03:10:59
问题 Is it possible to avoid Illegal reflective access operation warning with iText PDF FontFactory.registerDirectories() and Java 11 ? Steps for reproducing the problem: Install OpenJDK 11 . Add iText PDF library v5.5.13.2 to your Java project. Call com.itextpdf.text.FontFactory.registerDirectories() . See the warning: WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by com.itextpdf.text.io.ByteBufferRandomAccessSource$1 to method java.nio

How get the widthPoint in itext7

荒凉一梦 提交于 2020-12-12 02:03:41
问题 In the previous version of itext (5.5.x) I used the BaseFont class as follows: BaseFont bf = BaseFont.createFont ("Arial.ttf", BaseFont.WINANSI, true); Then used the method getWidthPoint bf.getWidthPoint (TEXT_EXAMPLE, fontSize); But in the version of itext 7 I am not finding the BaseFont class and also some utility that allows me to get the withPoint of a certain text. Any help is welcome. 回答1: To create a similar font in iText7 , use: PdfFont font = PdfFontFactory.createFont("Arial.ttf",

How to set orientation to Landscape in iText 7

老子叫甜甜 提交于 2020-12-11 08:58:28
问题 I am converting html to pdf using iText7 with method convertToPdf(). PDF is getting generated properly but Landscape mode is not working. Can some one tell how to get Landscape mode? import com.itextpdf.html2pdf.ConverterProperties; import com.itextpdf.html2pdf.HtmlConverter; import com.itextpdf.styledxmlparser.css.media.MediaDeviceDescription; import com.itextpdf.styledxmlparser.css.media.MediaType; import java.io.File; import java.io.IOException; import static com.itextpdf.html2pdf.css