pdf-generation

Why doesn't jasper report throw a JRFontNotFoundException if font for PDF is missing?

会有一股神秘感。 提交于 2019-12-01 19:39:27
I read https://stackoverflow.com/a/4028080/5277820 https://stackoverflow.com/a/35549391/5277820 http://community.jaspersoft.com/questions/543275/fonts-problem-while-using-jasper-reports-402-version http://refermycode.com/remove-font-dependency-in-jasper-report/ and I expected that Jasper Reports throws a JRFontNotFoundException if a font is not installed on the machine. But my application doesn't throw a JRFontNotFoundException , although I have not installed the used font "Helvetica" on any (Jaspersoft Studios, JasperReports, Adobe Acrobat Reader) machine. JRXML: <parameter name="timestamp"

RTF to PDF in Java

北战南征 提交于 2019-12-01 18:56:07
We are building an application which partially interacts with other system. We are pulling some data from the other system which is returned as RTF document. But we have to prevent users from editing this file, so we thought about converting it with iText into PDF. Code snippet: // moving the rtf data into input stream to be used in RTF parser ByteArrayInputStream rtfInputStream = new ByteArrayInputStream(rtfStream.toByteArray()); // set headers resp.setHeader("Cache-Control", "no-store"); resp.addHeader("Content-Type", "application/pdf"); resp.addHeader("Content-Disposition", "inline;

Imagemagick: generate raw image data for PDF flate embedding?

拥有回忆 提交于 2019-12-01 18:35:26
I'm trying to come up with a command-line, source code example of a PDF ( see also How to generate plain-text source-code PDF examples that work in a document viewer? ), but with embedding an image. This is how far I got - I have a template hello.pdf : %PDF-1.4 1 0 obj << /Type /Catalog /Outlines 2 0 R /Pages 3 0 R >> endobj 2 0 obj << /Type /Outlines /Count 0 >> endobj 3 0 obj << /Type /Pages /Kids [ 4 0 R ] /Count 1 >> endobj 4 0 obj << /Type /Page /Parent 3 0 R /MediaBox [ 0 0 612 792 ] /Contents 5 0 R /Resources << /ProcSet 6 0 R /Font << /F1 7 0 R >> /ProcSet [ /PDF /Text /ImageC ]

How to add SVG image to PDF built with HTML and Flying Saucer library (and Batik)?

雨燕双飞 提交于 2019-12-01 18:34:48
问题 Im working on generation of PDFs with XHTML using the flying saucer library (old but open source). I got that working but I also want to add SVG images. Ive started working on integrating batik to try and get it to work but I'm running into issues. The SVG images are not drawn. The XHTML still renders, but it doesnt seem to show the SVG. I've gotten SVG to render on separate PDFs but never together with the flying saucer results. I've added the usual ReplacedElementFactory (which works with

Tracking Code Into a PDF or PostScript File

落爺英雄遲暮 提交于 2019-12-01 18:12:01
Is there a way to track when a PDF is opened? Perhaps by embedding some script into the pdf itself? I saw the question below, and I suppose the answer is "no" for javascript, but I am wondering if this is possible at all. Google analytics tracking code insert in pdf file The PDF standard includes support for JavaScript but as @Wes Hardaker pointed out, not every PDF reader supports it. However, sometimes some is better than none. Here's Adobe's official Acrobat JavaScript Scripting Guide . What's probably most interesting to you is the doc object which has a method called getURL() . To use it

How to add SVG image to PDF built with HTML and Flying Saucer library (and Batik)?

十年热恋 提交于 2019-12-01 18:08:49
Im working on generation of PDFs with XHTML using the flying saucer library (old but open source). I got that working but I also want to add SVG images. Ive started working on integrating batik to try and get it to work but I'm running into issues. The SVG images are not drawn. The XHTML still renders, but it doesnt seem to show the SVG. I've gotten SVG to render on separate PDFs but never together with the flying saucer results. I've added the usual ReplacedElementFactory (which works with regular images as well but havent included that code). The only relevant method (that does get called

Tracking Code Into a PDF or PostScript File

亡梦爱人 提交于 2019-12-01 18:08:41
问题 Is there a way to track when a PDF is opened? Perhaps by embedding some script into the pdf itself? I saw the question below, and I suppose the answer is "no" for javascript, but I am wondering if this is possible at all. Google analytics tracking code insert in pdf file 回答1: The PDF standard includes support for JavaScript but as @Wes Hardaker pointed out, not every PDF reader supports it. However, sometimes some is better than none. Here's Adobe's official Acrobat JavaScript Scripting Guide

HTML to PDF Converters for .NET [closed]

自古美人都是妖i 提交于 2019-12-01 17:47:45
问题 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 am in search of a FREE HTML to PDF converter for .NET which preferably takes an HTML page and renders it into a PDF document. The HTML page (when printed) will most often be more than one page . I know of ABCPDF, but from a quick overview, it appears it just wants to convert a single page of HTML and doesn't

ReportLab LayoutError: too large on page

我是研究僧i 提交于 2019-12-01 16:37:50
I'm doing my first program using ReportLab where I don't know in advance where the page breaks will fall and I'm having trouble. To keep things simple I'm using the SimpleDocTemplate . My flowables look something like this: flowables = [Paragraph("Some title", style=headerParagraphStyle), Spacer(0, 10), Paragraph("first paragraph", style=bodyParagraphStyle), Paragraph("second paragraph", style=bodyParagraphStyle), ... Paragraph("nth paragraph", style=bodyParagraphStyle), PageBreak(), Paragraph("Some title", style=headerParagraphStyle), Spacer(0, 10), Paragraph("first paragraph", style

How do I continue a content to a next page in Reportlabs - Python

最后都变了- 提交于 2019-12-01 15:48:50
I'm making a table, where the table can be either small or large depending upon the data being received. While I was providing a huge data set, I noticed that although the table is being made but my all content is not there, since it occupies only 1 page for that. So, my question is How do I continue a content to a next page in Reportlabs without using showpage() , since I wont be able to know when to hit showpage or when not, because the content is being dynamically generated? Code def plot_table(pie_labels, pie_data, city_devices): styles = getSampleStyleSheet() styleN = styles["BodyText"]