pdf-generation

Prawn: Table of content with page numbers

假装没事ソ 提交于 2019-12-08 19:19:09
问题 I need to create a table of contents with Prawn. I have add_dest function calls in my code and the right links in the table of content: add_dest('Komplett', dest_fit(page_count - 1)) and text "* <link anchor='Komplett'> Vollstaendiges Mitgliederverzeichnis </link>", :inline_format = true This works and I get clickable links which forward me to the right pages. However, I need to have page numbers in the table of content. How do I get it printed out? 回答1: you should read the chapter on Outline

FlyingSaucer renderer.setDocument throws “Stream closed” exception

孤人 提交于 2019-12-08 19:16:45
问题 I am having problems with creating a PDF using the simple example found here. It is my first time trying to use it and I have tried a few things and lots of searching but haven't found a reason why the error is generating. The error originates on the renderer.setDocument(url); line. If anyone has any ideas, suggestions or alternatives it would be greatly appreciated. package flyingsaucerpdf; import java.io.*; import com.lowagie.text.DocumentException; import org.xhtmlrenderer.pdf

PDF Box generating blank images due to JBIG2 Images in it

爷,独闯天下 提交于 2019-12-08 17:34:30
问题 Let me give you an overview of my project first. I have a pdf which I need to convert into images(One image for one page) using PDFBox API and write all those images onto a new pdf using PDFBox API itself. Basically, converting a pdf into a pdf, which we refer to as PDF Transcoding. For certain pdfs, which contain JBIG2 images, PDFbox implementation of convertToImage() method is failing silently without any exceptions or errors and finally, producing a PDF, but this time, just with blank

Phantom pdf on Azure in ASP.NET Core

僤鯓⒐⒋嵵緔 提交于 2019-12-08 17:06:49
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, Controllers, etc). module.exports = function (callback, html, htmlFooter) { var jsreport = require('jsreport

Split PDF in separate file in Javascript

回眸只為那壹抹淺笑 提交于 2019-12-08 16:14:38
问题 i Have a big pdf file and i would like to split it in separate PDF files, each page in separate file. It is possible to do that in JS with node module. I search but in npm i just have modules that convert html to pdf 回答1: After a lot of searching and nearly giving up, I did eventually find that the HummusJS library will do what I want to do! thanks to @Taxilian See this post How can I create a customized version of an existing pdf file with node.js? 回答2: PDF format too complex for handling it

How could you dynamically create a pdf within wordpress? [closed]

蹲街弑〆低调 提交于 2019-12-08 16:09:34
问题 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 3 years ago . I'm using a Contact Form 7 to have the users enter data, then based on their data entry, I need to add different text to the pdf before outputting the entire pdf. For example, if the user says they like red balloons, the created balloon pdf will mention how important red balloons

Why doesn't border-collapse work in html2pdf?

你说的曾经没有我的故事 提交于 2019-12-08 14:32:08
问题 I want to create a pdf with an html table like : So, I created this html : <table style="width: 100%; border:2px solid; border-collapse: collapse; padding: 0; margin: 0;"> <tr style="border-bottom: 1px solid;"> <th style="border-left: 1px solid; width: 60%;">Ref produit</th> <th style="border-left: 1px solid; width: 10%;">Taille</th> <th style="border-left: 1px solid; width: 10%;">Quantit�</th> <th style="border-left: 1px solid; width: 10%;">Prix net HT</th> <th style="border-left: 1px solid;

PHP PDF creation A3, A4 and A5

不羁的心 提交于 2019-12-08 13:46:36
问题 I'm looking at generating PDFs to output various types of document sizes, A3, A4, A5 using PHP. Currently I have a div that has various divs within this area that are positioned absolutely. What I'm looking to do though is to have this div a fixed height a width, but when I save the contents, it can be used for A4, A3 and A5 print sizes. What's the best way of achieving this? Thanks EDIT: I am also trying to add a full width background image for each type? Also, does the div need to be a

How do I create (and display) a pdf page from a Silverlight application

筅森魡賤 提交于 2019-12-08 13:44:16
问题 I am trying to decide if I can cope with the fact that Silverlight does not support printing. One option is to create a pdf page that the user can then print. How practical is this? (I don’t know match about Siverlight yet, I am trying to decide if it is an option for the application before I start learning it in detail) 回答1: We use a product called SharpShooter by Perpetuum Software: http://www.perpetuumsoft.com/Report-Sharp-Shooter-for-Silverlight.aspx It produces PDFs, Word docs and images

Are PDF box coordinates relative or absolute?

守給你的承諾、 提交于 2019-12-08 13:26:49
问题 I want to programmatically edit a PDF using pyPDF. Currently, I'm struggling with interpreting the various PDF boxes' (TrimBox, MediaBox etc.) dimensions. Each box has four dimensions stored as a four-tuple, e.g.: TrimBox: 56.69 56.69 1040.31 751.18 According to the PDF specification, these are supposed to describe a rectangle, and certainly (56.69, 56.69) determines the upper left corner of this rectangle. However, is (1040.31, 751.18) to be interpreted as the lower right corner of this