pdf-generation

Remove all text from PDF file

北城余情 提交于 2019-11-30 05:20:46
I am using Ghostscript to convert source PDF file into array of PNG images. Before I convert PDF page into PNG image I would need to extract (delete) all text from PDF so that converted page image would contain all other elements, excluding text. Can I achieve this with Ghostscript or will I need to look into different tools? I would also be interested in a tool that can read-save my source PDF removing all the text. Since my previous answer, development has continued, and a new option is available now, which justifies a new answer. The most recent versions of Ghostscript support 3 new

Using Flying Saucer to Render Images to PDF In Memory

北慕城南 提交于 2019-11-30 05:02:26
I'm using Flying Saucer to convert XHTML to a PDF document. I've gotten the code to work with just basic HTML and in-line CSS, however, now I'm attempting to add an image as a sort of header to the PDF. What I'm wondering is if there is any way whatsoever to add the image by reading in an image file as a Java Image object, then adding that somehow to the PDF (or to the XHTML -- like it gets a virtual "url" representing the Image object that I can use to render the PDF). Has anyone ever done anything like this? Thanks in advance for any help you can provide! I had to do that last week so

fpdf page break issue

∥☆過路亽.° 提交于 2019-11-30 04:48:10
问题 I have this loop that prints 6 rows (multicell) for about 30 times. The issue is that when it reaches the bottom page it prints 2 or 3 rows from the multicell and on the next page it prints the other 3 rows. I want to make it print all 6 rows on the next page if there is not enough space for all 6 rows on the present page. I use this code: $height_of_cell = 60; mm $page_height = 279.4; // mm (portrait letter) $bottom_margin = 20; // mm $space_left = $page_height - $p->GetY(); // space left on

Applying watermarks on pdf files when users try to download the files

落花浮王杯 提交于 2019-11-30 04:18:27
The solutions for my school's assignments all have waterstamps on the PDFs with our username on it. I was wondering if you guys know how to do something like that using PHP? Do they run a script prior to the download process? Thanks. Although there are several very good PDF libs for PHP, if I were writing such a program I'd just shell out to run pdftk but you' still need to generate your watermark. $tempfile=tempnam(); system("pdftk input_file.pdf background watermark.pdf output $tempfile dont_ask", $errcode); if (!$errcode && $ih=fopen($tempfile, 'r')) { header('Content-Type: application/pdf'

How to generate a PDF using Angular 7?

大城市里の小女人 提交于 2019-11-30 04:08:35
问题 I have to generate a PDF report from data entered by a user, which would be saved in an object. So far, I have come across stuff which generates an HTML page and then takes a screenshot and converts it into PDF. I am looking to generate a PDF directly from data stored in the object. Any ideas? 回答1: It is a common requirement, but you haven't provided much detail on specific requirements of your PDFs. You can look at: https://www.npmjs.com/package/angular-pdf-generator or https://parall.ax

How to append PDF pages using PyPDF2

荒凉一梦 提交于 2019-11-30 04:06:36
问题 Is anybody has experience merging two page of PDF file into one using python lib PyPDF2. When I try page1.mergePage(page2) it results with page2 overlayed page1. How to make it to add page2 to the bottom of the page1? 回答1: As I'm searching the web for python pdf merging solution, I noticed that there's a general misconception with merging versus appending. Most people call the appending action a merge but it's not. What you're describing in your question is really the intended use of

PDF Report generation [closed]

女生的网名这么多〃 提交于 2019-11-30 04:00:25
EDIT : I completed this project using ABCpdf. For anyone interested, I love this product and their support is A+. Everything I listed as a 'Con' for the HTML -> PDF solution was easily doable in ABCpdf. I've been charged with creating a data driven pdf report. After reviewing the plethora of options, I have narrowed it down to 2. I need you all to to help me decide, or offer alternatives I haven't considered. Here are the requirements: 100% Data driven Eventually PDF (a stop in HTML is fine, so long as it is converted) Can be run with multiple sets of data (the layout is always the same, the

How do you make a table like this with FPDF using PHP?

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-30 03:51:53
问题 How do you make a table like this with FPDF using PHP? I can't seem to figure out how to do this with $this->Cell . 回答1: FPDF does not recognize rowspan or colspan . Here is a workaround that you can try, using empty cells and the border attribute for Cell. $pdf->Cell(40,5,' ','LTR',0,'L',0); // empty cell with left,top, and right borders $pdf->Cell(50,5,'Words Here',1,0,'L',0); $pdf->Cell(50,5,'Words Here',1,0,'L',0); $pdf->Cell(40,5,'Words Here','LR',1,'C',0); // cell with left and right

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

无人久伴 提交于 2019-11-30 03:33:37
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . 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

Best ways to convert XPS to PDF (and vice-versa)?

雨燕双飞 提交于 2019-11-30 03:30:50
I have XPS documents being generated from XAML User Controls that act as templates. I want to convert the XPS documents into alternative formats, mainly PDF, programmatically with a .NET based API. What is the best way to do this? You can also use ABCpdf PDF Component for .NET . Version 7 can serve your purpose. see http://www.websupergoo.com/abcpdf-12.htm . it provides fully functional trial version unlike NiXPS and almost equally as fast as NiXPS. The way I have done this in the past is print my XPS file to a PDF printer. I use cutePDF for this. So when you select to print, you print to