pdf-generation

R&OS PDF in PHP (name of pdf)

情到浓时终转凉″ 提交于 2020-02-25 07:18:30
问题 anyone uses this function to create PDF in PHP? http://www.ros.co.nz/pdf/ I need set the name of this pdf, and I don't find the option. The name is the same of the current page; for example if the page is www.myweb.com/hello.php the name will be hello.pdf. I need change this name with an unique name for each pdf because it is for billing. This is an example of the code: <?php include('class.ezpdf.php'); $pdf =& new Cezpdf('a4'); $pdf->selectFont('fonts/courier.afm'); $datacreator = array (

R&OS PDF in PHP (name of pdf)

时光怂恿深爱的人放手 提交于 2020-02-25 07:17:07
问题 anyone uses this function to create PDF in PHP? http://www.ros.co.nz/pdf/ I need set the name of this pdf, and I don't find the option. The name is the same of the current page; for example if the page is www.myweb.com/hello.php the name will be hello.pdf. I need change this name with an unique name for each pdf because it is for billing. This is an example of the code: <?php include('class.ezpdf.php'); $pdf =& new Cezpdf('a4'); $pdf->selectFont('fonts/courier.afm'); $datacreator = array (

How do I replace a string in a PDF file using NodeJS?

走远了吗. 提交于 2020-02-18 21:36:11
问题 I have a template PDF file, and I want to replace some marker strings to generate new PDF files and save them. What's the best/simplest way to do this? I don't need to add graphics or anything fancy, just a simple text replacement, so I don't want anything too complicated. Thanks! Edit: Just found HummusJS, I'll see if I can make progress and post it here. 回答1: I found this question by searching, so I think it deserves the answer. I found the answer by BrighTide here: https://github.com

How do I replace a string in a PDF file using NodeJS?

你说的曾经没有我的故事 提交于 2020-02-18 21:33:24
问题 I have a template PDF file, and I want to replace some marker strings to generate new PDF files and save them. What's the best/simplest way to do this? I don't need to add graphics or anything fancy, just a simple text replacement, so I don't want anything too complicated. Thanks! Edit: Just found HummusJS, I'll see if I can make progress and post it here. 回答1: I found this question by searching, so I think it deserves the answer. I found the answer by BrighTide here: https://github.com

Assign filename to pdf from cell value

南笙酒味 提交于 2020-02-08 02:55:06
问题 I have a macro that saves the excel file into a PDF one: Sub PDF() ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, _ Filename:="C:\Report.pdf", _ OpenAfterPublish:=False End Sub How do I assign the pdf name to a value in a specific cell in excel? And how I do specify the save directory as the same where the excel file is located? 回答1: If you modify your code like below, your ActiveSheet will get exported as a .PDF to the same folder as the ActiveWorkbook , and with the name defined in cell

Is it possible to merge multiple pdf pages to one sheet of pdf and print in java?

北战南征 提交于 2020-02-06 18:02:22
问题 I am trying to create Java program, which can read multiple pdf files and merge them into a single pdf file. Then print the PDF but while printing i need to merge multiple pdf pages in a single page and print. Even if it is a new pdf created, that is fine for me. I need some open source java pdf manipulation library to handle this. I know one solution is while printing, select multiple printing option for muliple pages to one sheet. But the printer i can access doesn't have such capabilities.

CGPDF<…> - where are the setters?

给你一囗甜甜゛ 提交于 2020-02-04 14:34:29
问题 Is there any way to create PDF objects (e.g. a PDF-dictionary with parameters that are needed by a custom PDF producer/consumer/viewer) with CGPDF<...> or do I have to write my own parser and create new trailers, xref etc. in order to add new objects to the PDF? As I understand it, CG translates all drawing calls of its graphics context into the correct PDF counterparts when creating a PDF - but I have custom data/objects (e.g. for annotations, threads etc.) that should be stored in the PDF

text-align: justify; not working with wkhtmltopdf

南楼画角 提交于 2020-02-03 08:55:27
问题 Good day! I'm creates PDF docs from HTML using wkhtmltopdf library. I used svg font according to this issue wkhtmltopdf custom font letter spacing I used custom font, added it by @font-face. All works fine for me, except one thing: text-align: justify is not working for some reason. In html text is aligned as expected, but not in PDF. Is anyone know how to fix this issue? UPD : Added CSS and HTML example <style type="text/css"> @font-face{ font-family:'source_sans_prolight'; src: url('/font

Docx to pdf using openoffice headless way too slow

依然范特西╮ 提交于 2020-02-02 02:08:29
问题 I've been using PHPWord for docx files generation. And it's been working great. But now I have the need to also make available some of those files on a pdf version. After a few research I found PyODConverter which use OOo. Seemed quite a good option since I don't want to depend on third party web services. I tried it out on my machine and it works fined, so I've applied it on my server as well. It took a little longer but I've managed to get it working on there too. There is however an (bad)

Relative paths in Flying Saucer XHTML?

こ雲淡風輕ζ 提交于 2020-01-31 08:46:48
问题 I am using Flying Saucer to render some PDF documents from strings to XHTML. My code is something like: iTextRenderer.setDocument(documentGenerator.generate(xhtmlDocumentAsString)); iTextRenderer.layout(); iTextRenderer.createPDF(outputStream); What I'm trying to understand is, when using this method, where are relative paths in the XHTML resolved from? For example, for images or stylesheets. I am able to use this method to successfully generate a text-based document, but I need to understand