itext7

Change page orientation for only some pages in the resulting PDF (created out of html)

烂漫一生 提交于 2021-02-17 05:13:49
问题 I would like to change page orientation for just specific few pages in my PDF document. The PDF document is created out of html template using html2pdf. It goes like this: if the content of the page (typically a table) is too wide to be properly shown in portrait orientation, show page in landscape. Following the hint in [how to rotate pages into landscape and page content should be in portrait iTextpdf][1] [1]: how to rotate pages into landscape and page content should be in portrait

Change page orientation for only some pages in the resulting PDF (created out of html)

自作多情 提交于 2021-02-17 05:13:21
问题 I would like to change page orientation for just specific few pages in my PDF document. The PDF document is created out of html template using html2pdf. It goes like this: if the content of the page (typically a table) is too wide to be properly shown in portrait orientation, show page in landscape. Following the hint in [how to rotate pages into landscape and page content should be in portrait iTextpdf][1] [1]: how to rotate pages into landscape and page content should be in portrait

How to get a landscape orientation for only some pages while converting html to pdf in itext 7?

早过忘川 提交于 2021-02-17 01:51:33
问题 I convert HTML to PDF using iText7 with the convertToPDF() method of pdfHTML. I would like to change the page orientation for a few specific pages in my PDF document. The content of these pages is dynamic, and we cannot guess how many pages that should be in landscape (i.e. content of dynamic table could take more than one page) Current situation: I create a custom worker (implements ITagWorker ) which landscape the page that following the tag <landscape/> public byte[] generatePDF(String

How to get a landscape orientation for only some pages while converting html to pdf in itext 7?

一笑奈何 提交于 2021-02-17 01:50:24
问题 I convert HTML to PDF using iText7 with the convertToPDF() method of pdfHTML. I would like to change the page orientation for a few specific pages in my PDF document. The content of these pages is dynamic, and we cannot guess how many pages that should be in landscape (i.e. content of dynamic table could take more than one page) Current situation: I create a custom worker (implements ITagWorker ) which landscape the page that following the tag <landscape/> public byte[] generatePDF(String

How to get a landscape orientation for only some pages while converting html to pdf in itext 7?

痞子三分冷 提交于 2021-02-17 01:49:54
问题 I convert HTML to PDF using iText7 with the convertToPDF() method of pdfHTML. I would like to change the page orientation for a few specific pages in my PDF document. The content of these pages is dynamic, and we cannot guess how many pages that should be in landscape (i.e. content of dynamic table could take more than one page) Current situation: I create a custom worker (implements ITagWorker ) which landscape the page that following the tag <landscape/> public byte[] generatePDF(String

iText 7 Text Watermark annotation not recognized by Adobe Reader - uneditable text

走远了吗. 提交于 2021-02-11 14:53:09
问题 I am able to add and remove a page header using a text watermark annotation using itext 7 and C#. I am able to see and print the PDF via Adobe Acrobat Reader. @remy However, I am unable to use Adobe Acrobat Pro DC to remove the pager header. When I do a search and replace, it says text is un-editable. The PDF files are located here: PDF Files Original, With Watermark Step2 and WaterMark Removed Step3 public static string CompanyName= "ACME77"; public static string AnnotName = CompanyName +

Itext 7 Split Paragraph

萝らか妹 提交于 2021-02-08 10:16:29
问题 How can I split a given paragraph to 2 paragraphs, due to that it fits only partial into canvas. After split, I would like to add the first part into canvas and the second to a new canvas. public Paragraph addParagraphToPage(PdfDocument pdfDocument, int pageNum, Rectangle rectangle, Paragraph p) { PdfPage page = pdfDocument.getPage(pageNum); PdfCanvas pdfCanvas = new PdfCanvas(page.newContentStreamAfter(), page.getResources(), pdfDocument); Canvas canvas = new Canvas(pdfCanvas, pdfDocument,

Itext 7 Split Paragraph

蓝咒 提交于 2021-02-08 10:15:05
问题 How can I split a given paragraph to 2 paragraphs, due to that it fits only partial into canvas. After split, I would like to add the first part into canvas and the second to a new canvas. public Paragraph addParagraphToPage(PdfDocument pdfDocument, int pageNum, Rectangle rectangle, Paragraph p) { PdfPage page = pdfDocument.getPage(pageNum); PdfCanvas pdfCanvas = new PdfCanvas(page.newContentStreamAfter(), page.getResources(), pdfDocument); Canvas canvas = new Canvas(pdfCanvas, pdfDocument,

Does Visual Studio update break iText7?

本小妞迷上赌 提交于 2021-02-07 18:46:54
问题 I have a problem with iText7 7.1.6 and Visual Studio 2019. My program has been running for a year now, but having just updated Visual Studio (Community) to version 16.6.2 from 16.6.1, I did a rebuild without changing anything. Now, when I run the program, I get a System,NullReferenceException Object reference not set to an instance of an object exception at PdfFont font = PdfFontFactory.CreateFont(iText.IO.Font.Constants.StandardFonts.HELVETICA); The exact same solution copied to my laptop

Does Visual Studio update break iText7?

青春壹個敷衍的年華 提交于 2021-02-07 18:46:16
问题 I have a problem with iText7 7.1.6 and Visual Studio 2019. My program has been running for a year now, but having just updated Visual Studio (Community) to version 16.6.2 from 16.6.1, I did a rebuild without changing anything. Now, when I run the program, I get a System,NullReferenceException Object reference not set to an instance of an object exception at PdfFont font = PdfFontFactory.CreateFont(iText.IO.Font.Constants.StandardFonts.HELVETICA); The exact same solution copied to my laptop