Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I have several thousand 2-page PDF-files where the second page is rotated 180 degrees relative to the first. I would like to rotate the upside down page so that I have a nice straight forward document. I am able to do this using several Imagemagic commands per document:
If it is the second document always, you can use a loop and a counter, and only change those documents (pdfs) who are even numbered (based on the counter).
In pseudo code:
Code:
counter = 0
for doc in directory; do
counter++
if counter is even; then
rotate doc
else
continue
fi
done
@HMW: The OP wants to rotate *pages* in a document, not documents.
PDFTK has options to rotate single pages.
From the man-page:
Quote:
rotate [<page ranges>]
Takes a single input PDF and rotates just the specified pages. All other pages remain unchanged.
The page order remains unchaged. Specify the pages to rotate using the same notation as you would
with cat, except you omit the pages that you aren't rotating:
The qualifier can be even or odd, and the page rotation can be north, south, east, west, left,
right, or down.
Each option sets the page rotation as follows (in degrees): north: 0, east: 90, south: 180, west:
270, left: -90, right: +90, down: +180. left, right, and down make relative adjustments to a page's
rotation.
The given order of the pages doesn't change the page order in the output.
As regards graphical user-interfaces, PDF Mod lets you rotate single pages. I ignore if pdfchain (the GUI for pdftk) offers the option. You should opt for pdftk and automate the process for all your documents in a loop.
Edit: Okay, PDF Chain is cool, too. It lets you work on several documents simultaneously, select pages and manipulate only selected pages. Rotation is easy.
Last edited by Michael Uplawski; 04-27-2016 at 08:44 AM.
Thank you for your answers and recomendation of PDFtk. I already looked into it and I'm quite sure it will do the job. But since Fedora 23, with KDE, do not have this in its standard repositories I found it a bit more of a hassle to install it. Besides I'm also curious as to how to work with multi page documents (PDF or TIFF) in Imagemagic.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.