LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 09-03-2015, 09:39 AM   #1
Pscylo
Member
 
Registered: Mar 2008
Distribution: Slackware 13.37 64bit & 32bit
Posts: 48

Rep: Reputation: 2
Editing PDFs - a slight revelation including some questions about sed


Hi,

I have fairly regular requirements to edit PDFs, though more often than not it's just the page geometry I'm messing with (impostion for printing - bursting printers' pairs apart,that kind of thing). As you might expect I work in a branch of printing. On Windows the professional version of Acrobat had some capabilities which I found hard to replicate on Linux but I did find a few options that fulfilled (so far) all of my needs.

So, as mentioned, it's normally geometry I mess with, so Media, Bleed, Crop, Trim and Art box parameters are my main focus. I did find PDFedit did a few useful things, but it wasn't so helpful with multipage files.

So then I used Vim with the pdftk plugin installed, and that worked fairly nicely, and would alter the X number(sometimes over 100) instances of the various box parameters that I need to alter; but it was sloooow. Very slow.

Then the revelation, since we're altering lines, why not try sed. Well it works and it's really quite fast the only problem is that I wind up with a PDf that it's thereafter difficult to maniulate, I presume because the "Xref table" is messed up? Not too sure about the vagaries of postscript, so I'm just guessing here.

I can fix the problem using pdftk (which takes a while - just nothing like as long as using Vim), but if possible I'm keen to avoid this delay, as if nothing else, I could script most of the processes and remove a lot of tedious tasks involved. Wite error it inserts it's not ideal to script since I need to check at each stage.

So to the (linux)question:

What is it that sed is doing that's likely causing the problem?

&

How can I avoid it?

Like I say I can live with it, would just prefer not to.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] sed strange behaviour with line including backslash. sstavdal Programming 11 07-02-2010 02:10 AM
sed including ± symbol Alkass Programming 4 04-22-2010 02:59 AM
Video editing program wanted including fading from one clip to another Pantherman Linux - General 4 04-15-2009 04:12 AM
[SOLVED] LINUX: Editing PDFs and Photos MBA Whore Linux - Software 5 06-13-2006 07:25 AM
Editing PDFs General Linux - Software 1 02-22-2006 08:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:39 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration