Questions tagged [pdf-generation]

PDF generation is the process of creating a PDF document using various tools or libraries.

Use this tag for any programming-related question concerning the creation of PDF files, be it with a 3rd-party library or tools like PDF printers or PDF converters, or PDF authoring applications.

Questions asking us to recommend or find a tool, library or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam.

Related tags: ,

7433 questions
47
votes
6 answers

How to get a single PDF document from Doxygen?

When I generate Doxygen documentation in PDF format, I get plenty of different files with a single diagram in each. Is it possible to obtain a single PDF document, organized as a book, roughly as the HTML version? Is it possible to get it…
Pietro
  • 12,086
  • 26
  • 100
  • 193
47
votes
6 answers

How to generate multiple lines in PDF using Apache pdfbox

I am using Pdfbox to generate PDF files using Java. The problem is that when i add long text contents in the document, it is not displayed properly. Only a part of it is displayed. That too in a single line. I want text to be in multiple lines. My…
Ronald James
  • 647
  • 1
  • 5
  • 13
45
votes
5 answers

Header in PDF page using DOMPDF in PHP

I am creating a PDF file using DOMPDF. I have a big content to extract in PDF, we need some header in all the pages. So can anyone telme how to add a header and footer in the PDF so that the header will shown in all the pages using DOMPDF.
Sandy
  • 525
  • 2
  • 9
  • 17
45
votes
8 answers

Splitting a PDF with Ghostscript

I try to split a multipage PDF with Ghostscript, and I found the same solution on more sites and even on ghostscript.com, namely: gs -sDEVICE=pdfwrite -dSAFER -o outname.%d.pdf input.pdf But it seems not working for me, because it produces one…
zseder
  • 1,099
  • 2
  • 12
  • 15
44
votes
8 answers

How to edit or write on existing PDF with Ruby?

I have a couple of PDF template files with complex content and several blank regions/areas in them. I need to be able to write text in those blank regions and save the resulting PDFs in a folder. I googled for answers on this question quite…
Alex Kovshovik
  • 4,085
  • 4
  • 35
  • 36
44
votes
7 answers

Compare these products for PDF generation with Java given requirements inside: iText, Apache PDFBox or FOP?

There were questions on that but not recently and technology must have gone ahead since then. Requirements: generating pdf documents based on predefined template (I can use either pdf forms or xsl-fo) being able to fill textual data being able to…
topchef
  • 19,091
  • 9
  • 63
  • 102
43
votes
14 answers

Google Co-laboratory notebook PDF download

Google Co-laboratory notebook doesn't have the "Download as" dropdown menu item in "File" menu like standalone Jupyter does. How to download the notebook as PDF?
Pokemonrathon
  • 431
  • 1
  • 4
  • 4
43
votes
9 answers

Manual Page Break in TCPDF

I am using TCPDF to generate the PDF in one of my projects. I simply create a HTML file and give it to the TCPDF to handle the PDF generation. But now I have some HTML where multiple certificates are added one after the other and I want to have a…
swapnilsarwe
  • 1,290
  • 1
  • 8
  • 13
41
votes
6 answers

Embedding SVG in PDF (exporting SVG to PDF using JS)

The starting points: I don't have a server that can provide anything but static files. And I have an SVG element (dynamically created) in my that I want to export to a vector format, preferrably PDF or SVG. I started looking at using the…
Simeon
  • 5,519
  • 3
  • 29
  • 51
41
votes
8 answers

Are there any Java PDF creation alternatives to iText?

I am trying to render about 100,000 - 80 column records through FOP and it tanks pretty much everytime (OutOfMemoryException). I know iText could handle that kind of load but I can't use it because of the LGPL license. Are there any alternative Java…
Mike C.
  • 1,035
  • 2
  • 8
  • 13
40
votes
8 answers

Create pdf from html in golang

How to create PDF files from an HTML input in Google Go? If it is not possible yet, are there any initations that aims to solve this problem? I'm looking for a solution like TCPDF in php.
mimrock
  • 4,813
  • 8
  • 32
  • 35
38
votes
7 answers

Squared characters issue on wkhtmltopdf

I've installed wkhtmltopdf on Centos 5.5. (Since there was library issues, it's been 4 days). It's partly working now. I said partly because, all pdfs which was created by wkhtmltopdf include squares instead of text? What can I do? I've searched…
Tim Tuckle
  • 1,372
  • 7
  • 21
  • 31
38
votes
10 answers

Generate PDF from Rails

The Ruby On Rails Wiki lists a couple of libraries that facilitate PDF generation in Rails. I need to print out address labels (in letter format, thus 12-15 addresses per page) and cannot decide which one to use. Any recommendations?
Sebastian
  • 2,889
  • 4
  • 34
  • 37
38
votes
12 answers

Merge PDF's with PDFTK with Bookmarks?

Using pdftk to merge multiple pdf's is working well. However, any easy way to make a bookmark for each pdf merged? I don't see anything on the pdftk docs regarding this so I don't think it's possible with pdftk. All of our files merged will be 1…
Jason
  • 1,496
  • 4
  • 29
  • 41
38
votes
5 answers

How to use wkhtmltopdf.exe in ASP.net

After 10 hours and trying 4 other HTML to PDF tools I'm about ready to explode. wkhtmltopdf sounds like an excellent solution...the problem is that I can't execute a process with enough permissions from asp.net…
David Murdoch
  • 87,823
  • 39
  • 148
  • 191