pdftk split pdf with multiple pages but total size grew

后端 未结 4 901
梦毁少年i
梦毁少年i 2020-12-30 22:24

with php i have to split a single pdf file with multiple pages inside it to a lot of PDF file with one page per file. I use pdftk and works fine, but every pdf created for e

4条回答
  •  醉酒成梦
    2020-12-30 23:21

    Had a similar problem. But does not apply 1:1 to the question. Anyways somebody might find it useful:

    1. I had a very big pdf file - original.pdf - of more than 240MB. It was almost impossible to use it. I printed it out with evince as a pdf and removed any scaling in the printer setup. This generated a file - new.pdf - of around 102MB! Obviously all the embedded fonts, bookmarks and so on were removed.
    2. To get the bookmarks back I used cpdf to extract the bookmarks from the original pdf document and applied it to the new one. The resulting document - result.pdf - is easy to navigate and very quick in any pdf viewer.

    Reference: cpdf to extract and apply bookmarks: http://www.coherentpdf.com/cpdfmanual/node38.html

    cpdf -list-bookmarks original.pdf > booksmarks.txt
    cpdf -add-bookmarks booksmarks.txt new.pdf -o result.pdf
    

提交回复
热议问题