nixp.ru v3.0

25 апреля 2024,
четверг,
16:46:29 MSK

Sasha2 написал 16 апреля 2006 года в 12:39 (1111 просмотр) Ведет себя неопределенно; открыл 108 тем в форуме, оставил 880 комментариев на сайте.

Ребята не подскажете такую вещь.

Если у меня есть два pdf файла: file1.pdf и file2.pdf, то как мне их слить в один file1+file2.

В Windows все очень просто, но там есть полный Acrobat, который может это выполнять, а в Линуксе только Acrobat Reader, который это выполнять не может.

Genie


$ apt-cache search pdf merge
pdfjam - collection of PDF document handling utilities
pdftk - A useful tool for manipulating PDF documents

в обоих этих пакетах есть утилиты для слияния pdf.

описание гласит:

$ apt-cache show `apt-cache search pdf merge|awk '{print $1}'`
Package: pdfjam
Maintainer: Eduard Bloch 
Version: 1.20-1
Description: collection of PDF document handling utilities
 PDFjam is a small collection of shell scripts that work similarly to
 the well known psutils (psmerge, psnup). They provide a simple
 interface to some of the functionality of the pdfpages package for
 pdfLaTeX. At present, the utilities available are pdfnup, pdfjoin, and
 pdf90. PDFjam depends on a working installation of (pdf)LaTeX.
 .
  - pdfnup puts multiple document pages together on one physical page at
    a reduced size
  - pdfjoin concatenates multiple PDF documents
  - pdf90 rotates the pages of PDF documents
Package: pdftk
Maintainer: Aurelien Jarno 
Version: 1.12-3
Description: A useful tool for manipulating PDF documents
 If PDF is electronic paper, then pdftk is an electronic stapler-remover,
 hole-punch, binder, secret-decoder-ring, and X-Ray-glasses. Pdftk is a
 simple tool for doing everyday things with PDF documents. Keep one in the
 top drawer of your desktop and use it to:
  - Merge PDF documents
  - Split PDF pages into a new document
  - Decrypt input as necessary (password required)
  - Encrypt output as desired
  - Fill PDF Forms with FDF Data and/or Flatten Forms
  - Apply a Background Watermark
  - Report PDF on metrics, including metadata and bookmarks
  - Update PDF Metadata
  - Attach Files to PDF Pages or the PDF Document
  - Unpack PDF Attachments
  - Burst a PDF document into single pages
  - Uncompress and re-compress page streams
  - Repair corrupted PDF (where possible)
 .
  Author: Sid Steward 
  Homepage: http://www.accesspdf.com/pdftk
Sasha2

Спасибо Gennie.

В моем дистрибутиве (Gentoo) есть оба этих пакета.

Сейчас буду устанавливать и пробовать.

Sasha2

Да все работает отлично.

Только для pdfjoin потребовалось добавить права на папку /var/tmp, а для компиляции pdftk пришлось уже перекомпилировать gcc с поддержкой java (gcj).

Дмитрий Шурупов

И pdftk нормально работает?

У меня он в свое время при попытке сделать watermark для PDF (на разных платформах) падал в segfault :(

Sasha2

Ну я не знаю пока, что это за watermark, а вот

pdftk 1.pdf 2.pdf cat output 12.pdf работает как положено.

Sasha2

Нет тоже все работает нормально, ну имеется в виду

pdftk 1.pdf background 2.pdf output result.pdf

Дмитрий Шурупов

Sasha2, ok, спасибо. Будем пробовать еще…

Последние комментарии

ecobeingecobeing.ru
Экология и вегетарианство на благо всем живым существам Планеты.