pdf-generation

How to improve display quality in pdf.js

≯℡__Kan透↙ 提交于 2019-12-19 02:17:06
问题 I'm using open source library for PDF documents from mozilla(pdf.JS). When i'm trying to open pdf documents with bad quality, viewer displays it with VERY BAD quality. But if I open it in reader, or in browser (drag/drop into new window), whis document displays well Is it possible to change? Here is this library on github mozilla pdf.js 回答1: Maybe it's an issue related with pixel ratio, it used to happen to me when device pixel ratio is bigger than 1 (for example iPhone, iPad, etc.. you can

Digital signature with timestamp in Java

被刻印的时光 ゝ 提交于 2019-12-18 18:15:08
问题 I have an issue creating a valid CMS signature with Bouncy Castle using a trusted timestamp. The signature creation works well (I want to include the signature to a PDF file), the signature is valid. But after I include a trusted timestamp to the signature's unsigned attribute table, the signature still stays valid, but the Reader reports that The signature includes an embedded timestamp but it is invalid . This leads me to believe, that the hash I timestamp is not the correct one, but I

Node js Converting pdf Buffer back to pdf

守給你的承諾、 提交于 2019-12-18 16:57:31
问题 I have created a pdf with the browser in Javascript and sent it via post to the server using this code: var blob = pdf.output('blob') var xhr = new XMLHttpRequest(); xhr.open('post','/upload', true); xhr.setRequestHeader("Content-Type", "application/pdf"); xhr.send(blob); I would like to save as pdf on the server running Node with express. I have come up with the following code using express and body-parser package: const bodyParser = require('body-parser'); app.use(bodyParser.urlencoded({

PHP - How to use mPDF to merge PDFs

♀尐吖头ヾ 提交于 2019-12-18 16:46:17
问题 I will start out by saying that I can generate PDFs just fine with mPDF, but for the life of me, I can't get it to merge an existing PDF with the PDF it just generated. What I need to figure out is how to append/add the existing PDF to the newly generated PDF. I've tried using the mPDF methods for importing pages, but all I can get is an error like: mPDF error: Cannot open '/downloads/test.pdf'. The above message is ambiguous and unclear as to WHY it can't open the file... Here's the code I'm

what are the leading XSL-FO implementations? How do I decide among them?

断了今生、忘了曾经 提交于 2019-12-18 16:10:32
问题 I'm evaluating PDF rendering technologies. XSL-FO is our chosen path because its an open standard and our source data is XML. What experiences have people had with the various implementations of XSL-FO? The implementations I've found so far are: renderX ecrion Antenna House Apache FOP The criteria I'm using to evaluate are: performance, stability, supportability, price, template management tools. Also important: good java APIs and ability to run on Unix. Whatever product we end up choosing,

How to generate pdf file from dynamic data coming from mysql database in php?

纵饮孤独 提交于 2019-12-18 13:47:36
问题 I am doing one web application society management system. In this application I want to generate pdf file for each user separately. Means during invoice generation , if there are 10 users then for each user separate invoice should get generated as a pdf after clicking on generate PDF button. My invoice got generated for each user but now I dont understand how to convert it into pdf dynamically. So please help me in this question ? 回答1: Use any of the following php scripts to generate dynamic

How to make part of rmarkdown document without section numbering?

只愿长相守 提交于 2019-12-18 12:58:19
问题 I have an rmarkdown document (.Rmd) that I want to knit into a pdf document. number_sections has been put to 'yes' and toc to 'true'. How can I add appendix sections that appear in the table of contents but don't have a section number? Here is an example .Rmd code. How can I let appendix A and appendix B be numberless sections and let them appear in the table of contents at the same time? --- title: "Test" author: "test test" geometry: margin=1in output: pdf_document: keep_tex: yes latex

Generate single PDF from multiple images

你。 提交于 2019-12-18 12:41:06
问题 I need to create single pdf file from multiple images. For example, I have 12 images then pdf will generate 3 pages with consist of 4 image in single page 2 images in a row. So, is there any dll, sample I can use to generate pdf from images? 回答1: There are multiple libraries that have support for this: iTextSharp - working with images tutorial: pdfSharp - Working with images tutorial PDF Clown 回答2: Have a look at the book "iText in Action", this more or less also covers iTextSharp, which is a

Add a page to PDF document using iTextSharp

有些话、适合烂在心里 提交于 2019-12-18 12:22:40
问题 I would like to add a page to an existing PDF document containing simple text. I have tried the following code that I found on the internet, but so far I haven't got it to work: PdfReader reader = new PdfReader("1.pdf"); Document document = new Document(reader.GetPageSize(1)); PdfCopy copier = new PdfCopy(doc, new FileStream("2.pdf", FileMode.Create)); for (int pageCounter = 1; pageCounter < reader.NumberOfPages + 1; pageCounter++) { //byte[] page = reader.GetPageContent(pageCounter); copier

How make 2 column layout in R markdown when rendering pdf?

守給你的承諾、 提交于 2019-12-18 12:18:59
问题 When rendering html documents with rmarkdown there are ways to make a two columns layout, e.g. here Is there an easy way to render a pdf document with two column layout? Is there an example code somewhere? 回答1: You can use the article option twocolumn to format the whole document in two columns. Add this to your yaml front matter: --- output: pdf_document: pandoc_args: [ "-V", "classoption=twocolumn" ] --- 回答2: More succinctly: --- output: pdf_document: classoption: twocolumn --- 回答3: