Archive for December, 2010
pdftk (PDF ToolKit) is a better solution – it keeps text and vector graphics. We just have to use this command:
pdftk *.pdf cat output result.pdf
However, there are drawbacks for both pdftk and PDF Shuffler:
- pdftk only supports ASCII filenames. So it’s a bit inconvenient for non-English users like me.
- PDF Shuffler is way too slow. I tried concatenating several files (approx. 1000 pages), and it kept running for more than 10 minutes before I hit Ctrl-C; pdftk finished the same task in just a few seconds.
GCC always appends one line to any assembler file (.s) file it generates:
Literally, it adds an empty section named
.note.GNU-stack to the object file, but it actually serves a hint to the linker* that code in this object file does not require an executable stack. GNU assembler also accepts command-line option “
--noexecstack”, which has the same effect.
If every object file contains a section of this name, the linker knows the whole program does not need an executable stack, and the resulting executable will run with a non-executable stack if the OS and underlying hardware support it (see also NX bit).
Why is this important? In practice, virtually no program needs an executable stack (hackers may sometimes use it, though), but buffer overflow attacks frequently insert and run code in stacks. A non-executable stack helps improve security without any overhead.
* GNU linker only.
convert a.pdf a.png
And we get as many PNG files as there are pages in the PDF. They converted files are named
We can also use it the other way around:
convert a.jpg b.png c.gif abc.pdf
This will combine the three images into one PDF file. Very flexible.