pdf-generation

Displaying a pdf to webpage using iTextSharp?

烂漫一生 提交于 2020-01-13 17:04:08
问题 I am generating a pdf using iTextSharp. I would like to display it on the webpage and let the user save it from the online pdf viewer. dynamicpdf has a drawtoweb() method, but it is not free to use and I cannot find the same functionality using iTextSharp. How can I display the pdf? string newFile = "Pdf Document.pdf"; Document doc = new Document(); PdfWriter writer = PdfWriter.GetInstance(doc, new FileStream(newFile, FileMode.Create)); doc.AddCreator("Myself"); doc.AddTitle("Sample PDF

How to embed external pdf/txt file into another using XSL-FO?

大兔子大兔子 提交于 2020-01-13 02:47:09
问题 Is it possible to embed an external PDF or TEXT document into a master PDF by using XSL-FO/XSLT? I have xslt stylesheet to produce PDF documents. But, the input XML contains inlined TEXT or Base64 encoded PDF documents. So what I do in my HTML version of my stylesheet I extract the TEXT or PDF and dump it on disk. Then in the xslt I have this: <xsl:when test='(n1:text/@mediaType="application/pdf") or (n1:text/@representation="B64")'> <IFRAME name='documentFrame' id='documentFrame' WIDTH='100%

How do I force formatting and calculations in a PDF when filling other fields using iTextSharp?

杀马特。学长 韩版系。学妹 提交于 2020-01-12 19:06:34
问题 I have a PDF form with a number of text fields. The values entered in these fields are used to calculate values in other fields (the calculated fields are read-only). When I open the form in Adobe Reader and fill in a field, the calculated fields automatically re-calculate. However, I am using iTextSharp to fill in the fields, flatten the resulting form, then stream the flattened form back to the user over the web. That part works just fine except the calculated fields never calculate. I'm

Which PDF Generation API (Java) supports Gujarati Font?

南楼画角 提交于 2020-01-12 13:51:22
问题 I have tried iText, PDFBox & Oracle Forms. And I also succed in case of iText to generate Gujarati PDF Document. But, unfortunately it is not generating proper Font in Gujarati (UTF-8) language. I have my project in jdk 1.4 & that is mandatory to use. So, I need older version of API that support Gujarati Font. Please suggest if any option is available. Sample Code: public void GeneratePDFusingiText(String lStrGujaratidata) { try { BaseFont bf = BaseFont.createFont("C:\\Windows\\Fonts\\Shruti

Which PDF Generation API (Java) supports Gujarati Font?

冷暖自知 提交于 2020-01-12 13:51:03
问题 I have tried iText, PDFBox & Oracle Forms. And I also succed in case of iText to generate Gujarati PDF Document. But, unfortunately it is not generating proper Font in Gujarati (UTF-8) language. I have my project in jdk 1.4 & that is mandatory to use. So, I need older version of API that support Gujarati Font. Please suggest if any option is available. Sample Code: public void GeneratePDFusingiText(String lStrGujaratidata) { try { BaseFont bf = BaseFont.createFont("C:\\Windows\\Fonts\\Shruti

Export SVG elements to PDF?

允我心安 提交于 2020-01-12 03:18:11
问题 I have a visualization generated by d3 (a javascript visualization library similar to Protovis or Raphael, which draws stuff using SVG elements). The vis is interactive, so the user can interact with and edit it. Once the user is satisfied with his/her visualization, I would like the user to be able to export this visualization as a PDF. I've tried several HTML to PDF libraries and they don't work with SVG elements. It is okay if the solution is either client side or server side. I'm using

line break problem with MultiCell in FPDF

五迷三道 提交于 2020-01-12 02:59:25
问题 I am using java port of fpdf. I am encountering fowwlowing errors. 1).When i call multicell 2 times every time the text is printed on a new line. MultiCell(0, 1, "abcd", currentBorders, Alignment.LEFT, false); //prints on one line MultiCell(0, 1, "efg", currentBorders, Alignment.LEFT, false); //prints on next line I want that there is no line break after the call to multicell. How can i do it? 2)If i do the following thing then some part of my string gets printed on one line and some on next.

How to programmatically convert SVG to PDF on Windows?

☆樱花仙子☆ 提交于 2020-01-12 02:43:13
问题 I'm looking to programmatically convert SVG to PDF documents on a server. What are my options for doing that on Windows? I've seen links to Inkscape, Batik, and svg2pdf, but I'm not sure if these can easily be automated to perform the conversion on a Windows server. There's an unusual solution here which involves automating OpenOffice Portable on the server: http://www.codeproject.com/KB/office/PortableOpenOffice.aspx 回答1: There are two options: Batik (Java, open source) Inkscape (native

How to restart page number from 1 in different group of BIRT report

纵饮孤独 提交于 2020-01-11 13:27:29
问题 Backgroud: Use Java + BIRT to generate report. Generate report in viewer and allow user to choose to export it to different format (pdf, xls, word...). All program are in "Layout", no program in "Master Page". Have 1 "Data Set". The fields in "Layout" refer to this DS. There is Group in "Layout", gropu by one field. In "Group Header", I create one cell to use as page number. "Page : MyPageNumber". "MyPageNumber" is a field I define which would +1 in Group Header. Problem: When I use 1st

How to print a PDF created with iText?

前提是你 提交于 2020-01-11 09:53:48
问题 Hi I have created a PDF file with an image in it, I want to print my pdf after creating. Better if I have the PDF in memory instead of having a file, and then send it to the printer... Any Idea ? I am using iText. Check my code: import com.lowagie.text.Document; import com.lowagie.text.DocumentException; import com.lowagie.text.Image; import com.lowagie.text.PageSize; import com.lowagie.text.Rectangle; import com.lowagie.text.pdf.PdfContentByte; import com.lowagie.text.pdf