itext

Itext PDF writer, Is there any way to allow unicode subscript symbol in the pdf? (Without setTextRise)

99封情书 提交于 2020-01-05 03:01:29
问题 I have been trying to create PDF files using Itext PDF writer. I have found that Superscript (0,4,5,6,7,8,9) and Subscript (0,1,2,3,4,5,6,7,8,9) are not allowed in the default font. Only Superscript 1,2,3 are allowed in PDF texts in the default setting. A String in my PDF contains subscript and superscript characters, is there a way i can display them in PDF? I searched and found: setTextRise() method is used to change the displacement of the text with respect to the current line, I cannot

Convert html+css+js to PDF

这一生的挚爱 提交于 2020-01-05 02:44:06
问题 I want to create something like this (code is here): in pdf format. I'm using google charts and regarding to this forum converting chart to pdf is impossible. I've already tryied iText+XMLWorker, but there is some problem with css and any js supporting at all, I think. So, the questions are: How can I convert html+css+js to .pdf file? Or, may be, the issue have other variants? 回答1: As promised in the comment, I've asked Raf. This was his answer: One way to use XML Worker for HTML+CSS+JS is to

How to increase the width of PdfPTable in itext Pdf

扶醉桌前 提交于 2020-01-05 02:03:25
问题 I am trying to export records from database into pdf using itext pdf library in java..But i am getting following problems in alignment of pdf table inside pdf file.. 1.Table is not showing in the full pdf page .It is leaving spaces from left and right of the pdf page. 2.Every page is showing values in half of the page only .Means pdf table is showing in half of the pdf pages.. Here is my code.. Document document = new Document(); PdfWriter.getInstance(document, fos); PdfPTable table = new

XMLWorkerHelper performance slow

廉价感情. 提交于 2020-01-04 09:28:14
问题 I am using itext 5.3 in java to generate PDF. I was using HTMLWorker.parseToList(Reader, StyleSheet) to convert part to String which contains HTML tags like Bold, Italic, href etc to PDF. I don't want to generate complete HTML to PDF instead a part of text in PDF will be HTML. For example, strings like "This is test bold text" to convert part of text to be bold. The performance is good with HTMLWorker . Since its deprecated now, I started using XMLWorkerHelper.parseXHtml(ElementHandler,

Change PDF Annotation properties using iTextSharp C#

余生颓废 提交于 2020-01-04 06:11:15
问题 Hi I am adding a caret annotation to an already existing PDF using iTextSharp in C#. Now I want to change some of the annotation's properties, such as Opacity of color and Locked . 回答1: Suppose that you have a PdfAnnotation object. This is a class that extends PdfDictionary . To lock the annotation defined by this annotation dictionary, you need to set the PdfAnnotation.FLAGS_LOCKED flag, for instance with the setFlags() method: annot.setFlags(PdfAnnotation.FLAGS_LOCKED); Note that using this

Extract Image and its name from pdf using iTextSharp

不羁岁月 提交于 2020-01-04 05:35:15
问题 I am using iTextSharp c# to extract images and its name from catalog pdf. I Am able to extract images from pdf, but struggling with extracting its corresponding image name as per the attached screenshot and save the file with that name. Please find the code below and let me know your suggestions. Sample PDF : https://docdro.id/PwBsNR9 Code: private static List<System.Drawing.Image> ExtractImages(String PDFSourcePath) { List<System.Drawing.Image> ImgList = new List<System.Drawing.Image>();

Pades LTV verification in itextsharp throws The Uri Prefix is not Recognized

狂风中的少年 提交于 2020-01-04 04:36:04
问题 I have successfully signed a pdf with LTV support. I can check the pdf and LTV signature is valid through Adobe Acrobat Reader and also with an external validator. I'm trying to make the same validation with iTextSharp 5.5.10. I'm following the iText sample code C5_06 But when I call to ltvVerifier.Verify , I am getting a System.NotSupportedException, The Uri Prefix is not Recognized . I am loading the certificate used to sign the pdf en cert parameter. Validation code: public static bool

How do i use itext7.pdfhtml in AGPL mode?

本秂侑毒 提交于 2020-01-04 03:01:07
问题 I'm trying to use itext7.pdfhtml to convert a html string to a pdf document in a C# .Net project. When I run this code: iText.Html2pdf.HtmlConverter.ConvertToPdf(htmlString, pdfStream) I get the following exception: iText.License.LicenseKeyException: License file for product not loaded . I don't want to load a trial license or a commercial license. I want to run itext7 in AGPL mode. How do I do that? I'm using: itext7 v7.0.3 itext7.licensekey v2.0.4 itext7.pdfhtml v1.0.0.2 回答1: You can't.

iText set cell's height

允我心安 提交于 2020-01-03 18:34:07
问题 I am using a java version of this library and can't figure out how to set the cell's height. When I use cell.setFixedHeight() and passing any number less that 18 the content dissapears in output PDF file. Why? Thank you 回答1: Check whether the width and height given for document is not exceeds. Document document = new Document(PageSize.A4, 60, 60, 120, 80); and for cell height you have to give in float value for e.g Cell.setFixedHeight(45f); I hope this will help you to proceed further :-) 来源:

iText set cell's height

陌路散爱 提交于 2020-01-03 18:33:08
问题 I am using a java version of this library and can't figure out how to set the cell's height. When I use cell.setFixedHeight() and passing any number less that 18 the content dissapears in output PDF file. Why? Thank you 回答1: Check whether the width and height given for document is not exceeds. Document document = new Document(PageSize.A4, 60, 60, 120, 80); and for cell height you have to give in float value for e.g Cell.setFixedHeight(45f); I hope this will help you to proceed further :-) 来源: