pdf-generation

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 :-) 来源:

Setting character spacing with PDFBox

≡放荡痞女 提交于 2020-01-03 17:10:44
问题 I'm currently using Java and the PDFBox library to create some PDFs on the fly. I need to be able to set the character spacing/tracking of some text but can't seem to figure it out. It looks as there is a method to do so : http://ci.apache.org/projects/pdfbox/javadoc/index.html?org/apache/pdfbox/util/operator/SetCharSpacing.html But I'm not quite sure how to apply this in the situation. cs.beginText(); cs.setFont( font, fontSize ); cs.setNonStrokingColor(color); cs.moveTextPositionByAmount

Adding metadata to PDF

这一生的挚爱 提交于 2020-01-03 08:35:33
问题 I need to add metadata to a PDF which I am creating using prawn. That meta-data will be extracted later by, probably, pdf-reader. This metadata will contain internal document numbers and other information needed by downstream tools. It would be convenient to associate meta-data with each page of the PDF. The PDF specification claims that I can store per-page private data in a "Page-Piece Dictionary". Section 14.5 states: A page-piece dictionary (PDF 1.3) may be used to hold private conforming

Zend framework 2 PDF generation [closed]

南楼画角 提交于 2020-01-03 06:30:12
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . I want to crate single A5 PDF document with 24 pages , There is no need to account for slugs or bleed , What is the Best Zendframwork 2 PDF generation Module for this ? Do you have tutorials or example pleas send me the links thank you .. 回答1: I use TCPDF. To get it up and running within your Zf2 installation

Wht is the best solution for HTML to PDF (on Azure Web app) [closed]

帅比萌擦擦* 提交于 2020-01-03 04:51:29
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last year . Actually I am trying to convert html content to pdf using NReco PDF converter, however, this line of code pdfDoc.GeneratePdf(HtmlContent); unable to get through on Azure web app, but it works normally on my dev environment. So my Question is which cloud service should i go for? 回答1: Azure Apps (former WebSites)

iText parser exception for XML -> PDF conversion

五迷三道 提交于 2020-01-03 04:24:07
问题 I have a basic .vm file which I populate with XML, and then use iText to convert it to a PDF doc: <?xml version="1.0" encoding="UTF-8"?> <!--<!DOCTYPE itext SYSTEM "http://itext.sourceforge.net/itext.dtd">--> <itext creationdate='${System.DateTime.Now.ToString("dd/MM/yyyy hh:mm:ss")}' producer="X"> <paragraph align="Default" size="18.0" style="bold" indentationleft="0.0"> Test </paragraph> </itext> The above is parsed absolutely fine. However something slightly more complicated: <?xml version

How to create the PDF file from the .htm page in asp.net using C#

隐身守侯 提交于 2020-01-03 03:04:07
问题 I have a .htm page where the design is in the page with css files. and now i want to create this .htm page to PDF document. So how can i do this using ASP.Net in c#. 回答1: You can use itext sharp. import these using iTextSharp.text.html.simpleparser; using iTextSharp.text.pdf; using iTextSharp.text; Next is add this method public void ConvertHtmlStringToPDF() { StringBuilder sb = new StringBuilder(); StringWriter tw = new StringWriter(sb); HtmlTextWriter hw = new HtmlTextWriter(tw); ///This is

Phantom pdf on Azure in ASP.NET Core

。_饼干妹妹 提交于 2020-01-03 03:01:11
问题 I am using jsreport and the phantom pdf recipe to render a View as a pdf in ASP.NET Core . The project is running in Azure as an App Service . This works fine on my local machine, but when I publish to Azure , I get the below error message. Exception: Call to Node module failed with error: ReferenceError: e is not defined at module.exports (D:\home\site\wwwroot\serviceCallDetailsPdf.js:18:26) Here is my js file that is in the root of my project (same directory level as wwwroot, Views,

Generate PDF in Android without any 3rd party Library

大城市里の小女人 提交于 2020-01-03 02:28:08
问题 I need to generate PDF from my application using PdfDocument class introduced in API 19. I don't want to use any 3rd party library. Here is what I have done PdfDocument document = new PdfDocument(); PdfDocument.PageInfo pageInfo = new PdfDocument.PageInfo.Builder(300, 300, 1).create(); PdfDocument.Page page = document.startPage(pageInfo); View content = findViewById(R.id.testText); content.draw(page.getCanvas()); document.finishPage(page); String fullPath = Environment

Html to Pdf library in Azure Function

人走茶凉 提交于 2020-01-02 19:29:10
问题 Azure functions apparently doesn't yet support System.Drawing (sanbox info). Running a function with a dependency on it throws the following message: System.Drawing is not supported on this platform. I was originally using Select.HtmlToPdf in a WebApp to create PDF documents from HTML. But, since moving the PDF generation to an Azure function, that is no longer an option. Also, the reccomended library is wkhtmltopdf , but that doesn't seem to have a .netstandard2.0 version. How would you