8

The Python official site offers PDF documentation downloads, but they are separated by chapters. I downloaded the source code and built the PDF documentation, which were separate PDFs also.

How can I build one PDF file from the Makefile in the source code? I think that would be more convenient to read.

If concatenating the separate PDFs won't leaves out the table of contents (bookmarks), it would be acceptable too. I tried convert from Imagemagick, pdftk and pdfunite from poppler-utils, they all lose the bookmarks after concatenation.

bad_coder
  • 11,289
  • 20
  • 44
  • 72
Fish Monitor
  • 4,155
  • 3
  • 32
  • 53
  • I find the source documents are treated as separate **document**, and thus separated Latex files and PDFs are generated. Maybe not possible to generate one PDF with Sphinx. – Fish Monitor Jul 22 '13 at 07:13

2 Answers2

12

If you already have PDFs, there is no need to re-create them. Instead, use something like PDF Split & Merge or PDFArchitect.

--- edit ---

Since the above mentioned solutions work only partially, I googled a bit and found sejda. You can download latest version here.

sejda-console merge -f PDFfile_1.pdf PDFfile_2.pdf -o PDFoutput.pdf

I tried it and it works as expected.

Try sejda-console -h merge for other options (i.e. specify dir with PDFs instead single files, etc.)

-- edit2 --

It seems sejda-console is not freely available anymore, only as commercial sejda-console-pro

But the current free version of PDFsam (v.4.2.12) allows for the same bookmarking options.

Both appear to have the same developer.

nbux
  • 3
  • 3
blablatros
  • 733
  • 1
  • 7
  • 21
  • I tried, but it only allows you to specify one bookmark entry for each input PDF, which is insufficient for convenient browsing. – Fish Monitor Jul 22 '13 at 07:16
  • You are right, PDF split and merge only create one bookmark for each input PDF. I googled a bit and I think I found the solution, so I edited my answer. Give it a try. – blablatros Jul 22 '13 at 08:31
  • I also posted answer to a similar question at here: http://stackoverflow.com/questions/2969479 . – Fish Monitor Jul 22 '13 at 09:12
  • To get a per-file bookmark added to the merged PDF, I had to do this: `sejda-console merge -b one_entry_each_doc -o merged.pdf --overwrite -f *.pdf` May also want '-t file_names' option to add a TOC page at the beginning. – acker9 Mar 03 '19 at 02:05
1
apt-get install poppler
pdfunite *.pdf all.pdf
Anonymous
  • 11
  • 1