Discussion:
[tex-live] pdfseparate/pdfunite.exe for Windows
Mojca Miklavec
2014-01-07 22:53:31 UTC
Permalink
Hello,

I recently noticed a question on a local forum, asking "How do I split
a large PDF file in multiple parts, for example page 1 & 2 together in
doc1.pdf, page 3 & 4 together in doc2.pdf, ..."

I know how to use TeX to do the job ("If all you have is a hammer,
everything looks like a nail"), but apparently pdfseparate & pdfunite
are very handy for these kinds of tasks. Given that a big bunch of
handy pdf tools for windows are already present (pdffonts.exe etc.
from xpdf), I was wondering if it would be nice/desirable if TeX Live
also included tools like pdfseparate.exe and pdfunite.exe (provided by
poppler). They are easily accessible on linux/mac, but getting them on
Windows seems less than trivial (I actually found a random third-party
site hosting poppler utils for Windows, but having them as part of TL
would be a lot easier).

Alternatively I imagine that someone could probably just as well
quickly come up with a lua script to do the same, possible even more
powerful and flexible than pdfseparate & pdfunite (allowing to specify
extraction of pages 2-4,8,10-14 into a single document for example, or
combining pages 1-5 and 10-11 from doc1.pdf with pages 3-8 from
doc2.pdf). ConTeXt provides a lot of functionality of that kind
already (but available options are well hidden).

What do you think? Would having these tools be useful for windows
users? Would it be feasible to add them?

Mojca
Norbert Preining
2014-01-07 23:02:47 UTC
Permalink
Post by Mojca Miklavec
everything looks like a nail"), but apparently pdfseparate & pdfunite
pdfjam is shipped in TeX Live, right? And it can do all of that, too?


Norbert

------------------------------------------------------------------------
PREINING, Norbert http://www.preining.info
JAIST, Japan TeX Live & Debian Developer
DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094
------------------------------------------------------------------------
Mojca Miklavec
2014-01-07 23:10:16 UTC
Permalink
Post by Norbert Preining
Post by Mojca Miklavec
everything looks like a nail"), but apparently pdfseparate & pdfunite
pdfjam is shipped in TeX Live, right? And it can do all of that, too?
Thanks. I failed to notice the existence of that one.

Mojca
Philip Taylor
2014-01-07 23:11:55 UTC
Permalink
Post by Norbert Preining
pdfjam is shipped in TeX Live, right?
Not in my copy. "No such file" in

D:\TeX\Live\2013\bin\win32

** Phil.
Norbert Preining
2014-01-07 23:27:39 UTC
Permalink
Post by Philip Taylor
D:\TeX\Live\2013\bin\win32
Indeed, not on Windows. All shell scripts. Pity.

Norbert

------------------------------------------------------------------------
PREINING, Norbert http://www.preining.info
JAIST, Japan TeX Live & Debian Developer
DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094
------------------------------------------------------------------------
Reinhard Kotucha
2014-01-08 02:01:29 UTC
Permalink
Post by Norbert Preining
Post by Philip Taylor
D:\TeX\Live\2013\bin\win32
Indeed, not on Windows. All shell scripts. Pity.
A pity indeed. Since we have texlua now, it's extremely easy to write
portable scripts. Not only portable among different architectures but
also among different TeX distributions. All you need is LuaTeX. And
this is ubiquitous nowadays.

In favor of portability I strongly recommend to consider texlua as a
scripting language. After all, Lua is a programming language which
makes fun. It's easy to learn but extremely powerful though.

...not to mention that texlua has the kpathsea library built-in while
other programming languages have to run external tools like kpsewhich
with different command-line arguments on Unix and Windows due to a
different command-line syntax.

Regards,
Reinhard
--
----------------------------------------------------------------------------
Reinhard Kotucha Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover mailto:reinhard.kotucha at web.de
----------------------------------------------------------------------------
Microsoft isn't the answer. Microsoft is the question, and the answer is NO.
----------------------------------------------------------------------------
Reinhard Kotucha
2014-01-08 00:42:03 UTC
Permalink
Post by Norbert Preining
Post by Mojca Miklavec
everything looks like a nail"), but apparently pdfseparate & pdfunite
pdfjam is shipped in TeX Live, right? And it can do all of that, too?
See also

texdoc pdfpages

pdfpages is probably even more powerful than pdfjam. Isn't pdfjam
just a wrapper?

Regards,
Reinhard
--
----------------------------------------------------------------------------
Reinhard Kotucha Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover mailto:reinhard.kotucha at web.de
----------------------------------------------------------------------------
Microsoft isn't the answer. Microsoft is the question, and the answer is NO.
----------------------------------------------------------------------------
Loading...