itext7

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

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

Adding page number text to pdf copy gets flipped/mirrored with itext 7

时光总嘲笑我的痴心妄想 提交于 2020-12-29 17:49:15
问题 So... I've been trying to use the example provided in the documentation of itext for merging documents and creating a TOC for the merged result. But the part that adds page number text to every page isn't working as I would expect. What happens is that the text added gets flipped over some horizontal axis as shown in the next picture: Also, the java doc for the method used to set a fixed position to the added text ( public T setFixedPosition(int pageNumber, float left, float bottom, float

What value to use for .MoveUp of canvas

点点圈 提交于 2020-12-12 11:56:45
问题 The bounty expires in 4 days . Answers to this question are eligible for a +50 reputation bounty. Gustav wants to draw more attention to this question: There must be a simple, yet not very well-known, answer to this. The code below copies all pages from a PDF file to a new file and inserts on the first page a rectangle at the top with a red border holding a short text. If I don't move it, a gap will be left at the top (here enlarged a lot, font size is 8 only): However, if I move the

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