pdf-generation

Node js Converting pdf Buffer back to pdf

試著忘記壹切 提交于 2019-11-30 14:47:54
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({ limit: '1gb', extended: false })); app.use(bodyParser.raw({ limit: '1gb', type: 'application/pdf' }));

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

笑着哭i 提交于 2019-11-30 14:23:23
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, we will also be asked to find consulting services to help us build our templates, so the ability to find

Using Sphinx docs how can I specify png image formats for HTML builds and pdf image formats for Latex/PDF builds?

偶尔善良 提交于 2019-11-30 14:08:56
问题 Using sphinx doc generator, I am trying to use .png images for the HTML builds of the documentation, and then I want to have the .svg images used for the PDF/LATEx builds. Anyone know how to "tag" sections as "HTML build"-only and "Latex build"-only? Cheers 回答1: Take a look at these options: Image filename wildcard: .. image:: gnu.* From the documentation: "For instance, if the file name gnu.* was given and two files gnu.pdf and gnu.png existed in the source tree, the LaTeX builder would

PHP - How to use mPDF to merge PDFs

蹲街弑〆低调 提交于 2019-11-30 13:57:55
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 using to try and merge PDFs: include_once("./pdf/mpdf/mpdf.php"); $output_file = $_GET['output_file'];

Looking for a PDF Writer for Windows 8 Metro Apps [closed]

时光毁灭记忆、已成空白 提交于 2019-11-30 13:41:13
I'm creating a Windows 8/Metro App and am looking for a library that can generate PDF documents programmatically (that can either be printed or emailed by the user). I've found some C# libraries for PDF writing (http://itextpdf.com/ for example) but I've been unable to get them to work in Windows 8. Any help would be appreciated. After an exhausting search, I've found the answer to my own question: Siberix Report Writer ( www.siberix.com ). They have versions for .NET, Silverlight, Mono for Android, AND for Windows Store. The binaries are only $199 ($3500 if you want source). It is very easy

How do I generate a pdf-file from a binary file?

荒凉一梦 提交于 2019-11-30 13:19:06
How do I generate a pdf-file from a binary file retrieved from database in php5? It comes base64 encoded, and I just decoded it, but don't know what to do next... The binary data is simply the actual file , or rather the important contents of that file, just without file name. $base64 = /* some base64 encoded data fetched from somewhere */; $binary = base64_decode($base64); And there you have the file data/contents of the file in the $binary variable. From here, it depends on what you want to do. You can write the data to a file, and you get an "actual" PDF file: file_put_contents('my.pdf',

Rails 3 -Render PDF from view and attach to email

给你一囗甜甜゛ 提交于 2019-11-30 12:49:37
问题 I have been using Wicked_pdf to render a view as a PDF and actionmailer to send emails, but I can't get them to work together. I want to attach a PDF version of a certain view to an email using actionmailer and send it out by clicking a link or a button. I have a link_to command that sends out an email. Here is my controller that gets the email generated: def sendemail @user = User.find(params[:id]) Sendpdf.send_report(@user).deliver redirect_to user_path(@user) flash[:notice] = 'Email has

Render image from servlet in flyingsaucer generated pdf

限于喜欢 提交于 2019-11-30 12:39:13
I'm using flyingsaucer to render an xhtml document to pdf through a servlet which returns the generated pdf document. The xhtml document features an image which is requested from another servlet. The image servlet checks who is logged in before returning the appropriate image. The code below shows how the image is requested: <img height="140" width="140" src="http://localhost:8080/myapp/servlet/DisplayPic" /> My problem is that the http request for the image is from the pdf renderer and not the logged in user so the image servlet doesn't know who's logged in and therefore the desired image is

How to do mail merge on top of a PDF?

与世无争的帅哥 提交于 2019-11-30 12:33:26
问题 I often get a PDF from our designer (built in Adobe InDesign) which is supposed to be sent out to thousands of people. I've got the list with all the people, and it's easy doing a mail merge in OpenOffice.org. However, OpenOffice.org doesn't support the advanced PDF. I just want to output some text onto each page and print it out. Here's how I do it now: print out 6.000 copies of the PDF, then put all of them into the printer again and just print out name, address and other information on top

SVG to PDF on a shared linux server

只愿长相守 提交于 2019-11-30 12:17:40
问题 I have a website which uses SVG for an interactive client side thingamabob. I would like to provide the option to download a PDF of the finished output. I can pass the final SVG output back to the server, where I want to convert to PDF, then return it to the client for download. This would need to work on a headless shared linux server, where installation or compilation is either an enormous pain, or impossible. The website is PHP, so the ideal solution would be PHP, or use software that's