itextpdf

rendering images XmlWorkerHelper(itextpdf)

情到浓时终转凉″ 提交于 2021-02-08 07:53:51
问题 please help me. I have problem with rendering image in pdf im usung itextpdf 5.5.6 and itext 5.5.6 my code is: . . . URL url = new URL("http://some.html"); URLConnection uc = url.openConnection(); InputStreamReader inputStreamReader = new InputStreamReader(uc.getInputStream()); XMLWorkerHelper worker = XMLWorkerHelper.getInstance(); worker.parseXHtml(pdrwriter, doc, inputStreamReader); doc.close(); //close the writer pdrwriter.close(); my html has: <table><tr><td><img src="http://mysite/logo

rendering images XmlWorkerHelper(itextpdf)

天大地大妈咪最大 提交于 2021-02-08 07:53:02
问题 please help me. I have problem with rendering image in pdf im usung itextpdf 5.5.6 and itext 5.5.6 my code is: . . . URL url = new URL("http://some.html"); URLConnection uc = url.openConnection(); InputStreamReader inputStreamReader = new InputStreamReader(uc.getInputStream()); XMLWorkerHelper worker = XMLWorkerHelper.getInstance(); worker.parseXHtml(pdrwriter, doc, inputStreamReader); doc.close(); //close the writer pdrwriter.close(); my html has: <table><tr><td><img src="http://mysite/logo

Showing image on a acro text field position

拥有回忆 提交于 2020-02-01 09:10:09
问题 I had a PDF document which has acro text fields which is already shared to the client. Now the client wants to insert signature image in one of the text fields. My manager asked me to try a way to do the same.My idea is to replace an image on top of the text field position and resize the text field as image size. For replacing acro text field of pdf into image, i am trying as below 1.Finding the text field by its field id String position = null; List<FieldPosition> fieldPositons = form

Is it possible to have space between cells in iTextPdf?

旧城冷巷雨未停 提交于 2020-01-24 17:27:29
问题 Does iTextPdf allow to set spacing between cells in table? I have a table with 2 columns and I am trying to draw a border-bottom on cell. I want space between each border same as cell padding. I am using below code: PdfPTable table = new PdfPTable(2); table.setTotalWidth(95f); table.setWidths(new float[]{0.5f,0.5f}); table.setHorizontalAlignment(Element.ALIGN_CENTER); Font fontNormal10 = new Font(FontFamily.TIMES_ROMAN, 10, Font.NORMAL); PdfPCell cell = new PdfPCell(new Phrase("Performance",

Add named destinations to an existing PDF document with iText

无人久伴 提交于 2020-01-16 11:26:30
问题 I have a PDF previously created with FOP, and I need to add some named destinations to it so later another program can open and navigate the document with the Adobe PDF open parameters, namely the #namedest=destination_name parameter. I don't need to add bookmarks or other dynamic content but just some destinations with a name and thus injecting a /Dests collection with names defined in the resulting PDF. I use iText 5.3.0 and I read the chapter 7 of iText in Action (2nd edition), but still I

Add named destinations to an existing PDF document with iText

青春壹個敷衍的年華 提交于 2020-01-16 11:26:24
问题 I have a PDF previously created with FOP, and I need to add some named destinations to it so later another program can open and navigate the document with the Adobe PDF open parameters, namely the #namedest=destination_name parameter. I don't need to add bookmarks or other dynamic content but just some destinations with a name and thus injecting a /Dests collection with names defined in the resulting PDF. I use iText 5.3.0 and I read the chapter 7 of iText in Action (2nd edition), but still I

iTextPDF Library - Can't find the class “com.itextpdf.text.pdf.PdfAWriter”

浪尽此生 提交于 2020-01-11 12:10:37
问题 Can't find the class "com.itextpdf.text.pdf.PdfAWriter" in latest version of itextpad v5.4.0. I have even tried downloading the extra jars but to no avail. Any help will be appreciated. 回答1: I'm the original developer of iText; I made the 5.4.0 release, but I've never heard of itextpad. If you download the release from SourceForge, you'll find PdfAWriter in the extra jar named itext-pdfa-5.4.0.jar. 回答2: As said by Bruno, PDF/A Libraries are in a different jar file: itext-pdfa . Here the Maven

iTextPDF Library - Can't find the class “com.itextpdf.text.pdf.PdfAWriter”

喜夏-厌秋 提交于 2020-01-11 12:10:08
问题 Can't find the class "com.itextpdf.text.pdf.PdfAWriter" in latest version of itextpad v5.4.0. I have even tried downloading the extra jars but to no avail. Any help will be appreciated. 回答1: I'm the original developer of iText; I made the 5.4.0 release, but I've never heard of itextpad. If you download the release from SourceForge, you'll find PdfAWriter in the extra jar named itext-pdfa-5.4.0.jar. 回答2: As said by Bruno, PDF/A Libraries are in a different jar file: itext-pdfa . Here the Maven

How to extract page number from PDF file [closed]

╄→гoц情女王★ 提交于 2020-01-04 17:34:27
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 5 years ago . We explored so many API's like tika,Pdfbox and itextpdf to extract page number from pdf file but we did not able to do this. In itextpdf we got PdfPageLabels.getPageLabels(reader) but the behaviour of this method is not uniform. 回答1: The reason why you don't find any software that

Shrink PDF pages with rotation using Rectangle in existing PDF

▼魔方 西西 提交于 2020-01-01 17:10:51
问题 I am using following code to shrink every pages (Top and bottom) of existing pdf using iText library. Code working fine. But now if i process result pdf , i get 0 value for rotation of every page, while old pdf has other rotation too(i.e. 90deg). I want to keep rotation as it is but unable to do it. Code i am using As below to shrink pages public void shrinkPDFPages() throws Exception { PdfReader reader = new PdfReader("D:/testpdfs/test.pdf"); Document doc = new Document(); PdfWriter writer =