Author Topic: How to edit PDFs on linux  (Read 2288 times)

0 Members and 1 Guest are viewing this topic.

Offline m0l0ko

  • Peasant
  • *
  • Posts: 129
  • Cookies: -4
    • View Profile
How to edit PDFs on linux
« on: May 30, 2012, 08:17:51 pm »
I bought a scientific article and I intend on performing a service to humanity by uploading it so others can download it for free. One problem is every page of the PDF file says "Downloaded by John Doe on 30th of May, 2012" etc. I didn't use my real name or anything but out of principle, I want to get rid of any crap the site added to the PDF before I upload it. I installed a program called pdfedit which is pretty good. I deleted the first page of the PDF then I covered the "Downloaded by so and so" line with a white rectangle on every page. I uploaded the PDF to scribd.com but I noticed that when the PDF is loading, the white rectangles load after everything else has loaded so for a few seconds, you can still see the "Downloaded by so and so" line. Adding a white rectangle obviously isn't the way to go about this. Also it would be a lot easier if I could automatically erase the line on every page rather than having to do each page individually. Can anyone recommend a program that will let me erase a line of text that appears on every page of a PDF?

Offline p_2001

  • Royal Highness
  • ****
  • Posts: 684
  • Cookies: -64
    • View Profile
Re: How to edit PDFs on linux
« Reply #1 on: May 30, 2012, 09:03:36 pm »
hmm I have an idea....

copy all text of the pdf to a txt file... use a txt editor to remove all instances of "downloaded by john doe"... then copy the text and create new pdf... it is easy to remove duplicate text.... dunno if you can copy the text of the pdf... try copy paste and see if it works...
"Always have a plan"

Offline flowjob

  • Knight
  • **
  • Posts: 327
  • Cookies: 46
  • Pastafarian
    • View Profile
Re: How to edit PDFs on linux
« Reply #2 on: May 30, 2012, 09:13:06 pm »
I doubt it will work. I've never seen a pdf that didn't block copy and paste. You always can select something,and try to copy,but it will most likly be some empty lines...

But you could try to crack the password of the pdf,so you can edit the configuration,to allow copy and paste.Then you should be able to continue like p_2001 suggested.
Quote
<phil> I'm gonna DDOS the washing machine with clothes packets.
<deviant_sheep> dont use too much soap or youll cause a bubble overflow

Offline Kulverstukas

  • Administrator
  • Zeus
  • *
  • Posts: 6627
  • Cookies: 542
  • Fascist dictator
    • View Profile
    • My blog
Re: How to edit PDFs on linux
« Reply #3 on: May 30, 2012, 09:15:11 pm »
I'm not sure about editing the existing PDF, but you could try creating a new PDF with same content. OpenOffice has the capability to export shizzle to PDF. If you don't want to copy text, then make screenshots.

On a sidenote, this PDF viewing tool is free, light and effin nice. Fuck adobe! also it has a free OCR tool that can recognize much of the text of a lot of languages.

I doubt it will work. I've never seen a pdf that didn't block copy and paste. You always can select something,and try to copy,but it will most likly be some empty lines...
You cannot do that if the PDF contains scanned images and not plain text.
« Last Edit: May 30, 2012, 09:16:02 pm by Kulverstukas »

Offline p_2001

  • Royal Highness
  • ****
  • Posts: 684
  • Cookies: -64
    • View Profile
Re: How to edit PDFs on linux
« Reply #4 on: May 31, 2012, 02:09:09 pm »
^^^^^^^^


the OP paid and bought the book.. I haven't bought many but those I did always have text rather than images... dunno if they actually sell imaged pdfs...

the idea of ocr is appealing though..
"Always have a plan"

Offline m0l0ko

  • Peasant
  • *
  • Posts: 129
  • Cookies: -4
    • View Profile
Re: How to edit PDFs on linux
« Reply #5 on: June 02, 2012, 10:19:39 pm »
hmm I have an idea....

copy all text of the pdf to a txt file... use a txt editor to remove all instances of "downloaded by john doe"... then copy the text and create new pdf... it is easy to remove duplicate text.... dunno if you can copy the text of the pdf... try copy paste and see if it works...

Yeah that'd work but it'd be a pain in the ass cuz you'd have to format it yourself to make it look like the original document. You can copy text off most PDFs, only exception is when the pages where scanned from a hardcopy of the book. I've actually seen scanned PDFs that I was able to select text from though, I don't know how that works, it must be OCR (optical character recognition) software. I've been trying to use OCR software on linux to work but no luck so far.

EDIT: Shit, it won't let me select the text on the PDF so I can't copy and paste it. I can convert every page of the PDF into images, then edit each image and import them into OpenOffice then export the openoffice file as a PDF but this is a lot of work, I was hoping to find a quick and easy solution to this problem.
« Last Edit: June 02, 2012, 10:40:22 pm by m0l0ko »

Offline m0l0ko

  • Peasant
  • *
  • Posts: 129
  • Cookies: -4
    • View Profile
Re: How to edit PDFs on linux
« Reply #6 on: June 02, 2012, 10:40:33 pm »
I found a quick and easy solution. pdfedit lets you crop pages. It lets you automatically crop every page in the PDF so this is a brilliant solution.

Also, I read that PDFs can contain "metadata". I don't know what that is but I'm guessing they can put IDs into the metadata. A simple way to remove the metadata is to use print to PDF on the file.

Offline p_2001

  • Royal Highness
  • ****
  • Posts: 684
  • Cookies: -64
    • View Profile
Re: How to edit PDFs on linux
« Reply #7 on: June 03, 2012, 05:58:15 am »
another idea... get a capture software... that captures the data sent to the printer and creates documents out of it... that way I do not think any watermarks will remain.

I did see one on the net and thought about this post.
"Always have a plan"

Offline d3vil

  • /dev/null
  • *
  • Posts: 5
  • Cookies: -1
  • I am D.evil
    • View Profile
Re: How to edit PDFs on linux
« Reply #8 on: June 24, 2012, 04:11:35 pm »
Y not converting the PDF into a word document using many converting software available on the net.... Edit it then convert it back to PDF... Although this works only for non secured PDF....  :)