pdf-generation

Generate PDF on the server from Google Maps API?

﹥>﹥吖頭↗ 提交于 2019-12-06 05:15:06
问题 We have a hosted web app that uses the Google Maps API for various types of geographical reports, using a combination of the javascript API for adding markers and shapes, plus KML overlays for other layers. There's some demand from customers for turning these into nice downloadable & printable PDF maps. I'm not sure where to begin with that. Any ideas? 回答1: As Mark Storer pointed out, you can use wkhtmltopdf. If you have polylines or other stuff in your map you will likely need wkhtmltopdf to

Saving html to pdf in chrome

帅比萌擦擦* 提交于 2019-12-06 04:44:40
问题 I am using rmarkdown to generate an HTML report. I am on a restricted machine, can't install tex. So, I was trying to generate an HTML document and then convert/print it to a pdf. The example markdown document is: --- title: "trials" author: "Foo Bar" date: "15 December 2016" output: html_document --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` ```{r cars, echo=FALSE, cache=FALSE, message=FALSE} library(dplyr, quietly = TRUE) library(abind, quietly = TRUE) virginica <-

wkhtmltopdf - background color doesn't fill second page

倾然丶 夕夏残阳落幕 提交于 2019-12-06 04:08:59
I am trying to convert an HTML to a PDF document with wkhtmltopdf. Command I am running is wkhtmltopdf ./test.html test.pdf Software version: wkhtmltopdf -V wkhtmltopdf 0.12.5 (with patched qt) The content is dynamic therefore I don't really know where it will end. Unfortunately when the content renders to the second page the background stops with the content. HTML below, any help would be fully appreciated and make an old developer happy after struggling so much :) <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http:/

How to merge two landscape pdf pages using pyPdf

时光总嘲笑我的痴心妄想 提交于 2019-12-06 03:55:42
问题 I'm having trouble merging two PDF files with pyPdf. When I run the following code the the watermark (page1) looks fine, but the page2 has been rotated 90 degrees clockwise. Any ideas what's going on? from pyPdf import PdfFileWriter, PdfFileReader # PDF1: A4 Landscape page created in photoshop using PdfCreator, input1 = PdfFileReader(file("base.pdf", "rb")) page1 = input1.getPage(0) # PDF2: A4 Landscape page, text only, created using Pisa (www.xhtml2pdf.com) input2 = PdfFileReader(file("text

Export HTML to PDF (C++, Windows)

拈花ヽ惹草 提交于 2019-12-06 03:29:42
问题 I am looking for a redistributable component to convert HTML to PDF. I would - at the moment - like to avoid using a "PDF printer", as this requires a printer installation and some user "playing around" in the printers panel might break that feature. The HTML is available in a Browser control or as external file. The HTML is normally fairly simple, but customers can create their own templates, so a "good range" of HTML should be supported. Should be accessible for an automated process from C+

Writing Arabic in pdf using itext

坚强是说给别人听的谎言 提交于 2019-12-06 02:16:15
问题 I am generating PDF file using itext lib. I want to write Arabic words. When i run the below code, The words characters are reverse displayed. The used code : PdfContentByte cb = docWriter.getDirectContent(); BaseFont bfBold = BaseFont.createFont("assets/arial.ttf", BaseFont.IDENTITY_H, BaseFont.EMBEDDED); createHeadings(cb, document.leftMargin(), 70, "السعر الاجمالي: " + tprice + " L.E."); . . . private void createHeadings(PdfContentByte cb, float x, float y, String text){ cb.beginText(); cb

Single source documentation tool

∥☆過路亽.° 提交于 2019-12-06 02:06:27
问题 What OSS (or free) tools are available for drafting a single source for documentation that can be used to generate manuals? Specifically, in the following formats: HTML website PDF document Embedded (within an application; possibly HTML) 1 Text (optional) Man pages (optional) Additional requirements: Tool is suitable for technical writers (need not be WYSIWYG). XML/SGML source High quality PDF output (comparable to TeX) Multi-platform Expanded Requirement 1 The same command-line application

itext xmlworker with javafx htmleditor

倾然丶 夕夏残阳落幕 提交于 2019-12-06 02:02:53
I created a simple JavaFX (2.2) FXML project. I am trying to convert a html string to different Elements and add them to a Paragraph in my PDF document generated by iText. As HTMLWorker is deprecated, I use XMLWorker. It does seem to work with a own written simple html string, e.g.: StringReader in = new StringReader("<html><body><p>test</p></body></html>"); However, when I try to use the html string generated by the JavaFX HTMLEditor control, I receive following message: Caused by: java.lang.NoSuchMethodError: com.itextpdf.tool.xml.html.pdfelement.NoNewLineParagraph.setMultipliedLeading(F)V

Any font for generating pdf that will handle Chinese, Cyrillic… ?

南笙酒味 提交于 2019-12-06 01:39:54
问题 I'm creating generator of pdf documents in Ruby on Rails with Prawn gem and I came up with issue that when I have Chinese, Japanese and Cyrillic chars they are displayed incorrectly. I googled out that it's because "when I'm generating font I need to specify, what font should pdf text be rendered with" . Now this isn't the issue, but the fact that my documents will include all different possible chars that gTLD supports. Question 1: Do you know any font for generating pdf documents that will

Disallow editing but allow page extraction in Java iText / PDF

删除回忆录丶 提交于 2019-12-06 01:36:57
问题 I'm using iText to generate PDF files. I want to disallow editing of the PDF, but allow the reader to extract pages. Here's my code to set encryption: writer.setEncryption(null, null, 0xffffffff, PdfWriter.STANDARD_ENCRYPTION_128); The third parameter specifies permissions. I'm using 0xffffffff instead of the individual iText flags ALLOW_PRINTING etc. This will ask iText to enable everything. But this is what I get in the PDF file: I should think I should be allowed to enable extraction but