Can pdf files be edited with a script?

Is there a way to script the editing of a pdf file?  We have a billing system that would be very expensive to have invoice format changed in.  However, we need to remove a couple of sections in the generated PDF invoice (we don't track payments in this system, but in a different one, so need to remove previous balance type lines from the files).
Chuck BrownAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ben Personick (Previously QCubed)Lead Network EngineerCommented:
There are some 3rd party libraries that would allow you to extract the data from a PDF, but not change the existing PDF, if you need to change the existing PDF it might be doable by someone (not me) but it would likely be better to offer a gig.

If you simply need to get certain information scraped out of the PDF and the PDF is in a fairly set format, and have that data dumped into something like a CSV file then this question should be answerable for points.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
KimputerCommented:
Unless it's PDF format v1 (which I highly doubt), which was mostly text based, it's still better to change it at the source (in this case, the invoice generating procedure).
Commandline editing is possible, but only ADDING text (but that's how the invoice was generated already), as you only give the coordinates, and what to add. There's almost no way to delete something (how to tell the commandline that?).
0
Lee W, MVPTechnology and Business Process AdvisorCommented:
It's possible.  It's nightmarish, but it's possible.  I have a client that has to process custom documents for clients and a series of PHP scripts run on linux servers generate PDF content on a form.  Since the TEXT portion is just that, you should be able to edit to... but good luck.  You're time would be better spent elsewhere in my opinion - even replacing the entire system.
1
Joe Winograd, Fellow&MVEDeveloperCommented:
Hi Chuck,
I see that you posted a Gig for this, which I think is a very good idea, as it will likely take a fair amount of effort to develop a solution for you — well beyond what could reasonably be expected in a standard EE Q&A thread. I asked a number of questions at the Gig trying to clarify the specs, and I hope you'll be able to answer them soon. An easy way to lose your shirt is to provide a firm, fixed-price bid on a project where you don't really understand all of the requirements. :)  Regards, Joe
1
Joe Winograd, Fellow&MVEDeveloperCommented:
The answer to this question was to post a Gig, which the asker did, so I'm marking the first post suggesting a Gig as the Accepted Solution. There are other helpful posts in the thread, which I'm marking as Assisted Solutions. Splitting the points evenly among the participating experts.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Scripting Languages

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.