11

I have a PDF file which I want to edit in LibreOffice Draw/Writer without corrupting it. Is there any way I can do it?

I have already installed the LibreOffice pdfimport plugin, yet the PDF file is getting corrupted with it. I just want to add an image in the PDF file after opening it with LibreOffice. I have been searching for how to do this for the last 4 hours and I am not able to find a way.

If it is not possible with Libreoffice, which software should I use in Ubuntu to add images in PDF files without losing their letter recognition capabilities?

Edit: I was trying to fill an application form, that's why I needed to edit the pdf file.

UJM
  • 224

3 Answers3

15

PDF is not designed to be an editable format.

  • Importing in LibreOffice Impress causes the PDF objects to be converted to LO objects that match as best as possible. This inevitably leads to changes because of incomplete mapping and conversion between the objects in these fundamentally different file formats. These changes may be less or more disrupting depending on the PDF.
  • Importing in Gimp caused the PDF to be rendered in bitmap format. The looks are exactly the same, but an exported PDF will contain bitmap information. If vector objects were present in the original PDF, these will be lost.

Perhaps Xournal++ will suit your needs. You can add text, annotations and images to an existing PDF. The added content will be included as an additional layer, without changing the initial PDF data in any way.

Another way to add objects to an existing PDF would be to use command line tools. For example, pdftk with its stamp option allows to superimpose one PDF on another, useful for example to add page numbers, or eventually a graphic.

It is preferred, however, where possible, to work with source documents in the appropriate format for editing, and export the final version to PDF.

vanadium
  • 97,564
4

which software should I use in Ubuntu to add images in PDF files?

Xournal

xournal screenshot

I've used it for years to sign documents using a transparent png and fill in fields. It's a little clunky, maybe, but it works very well. I think it was intended for use on tablets with a stylus to make drawings, but it supports "PDF Annotation" as well.

PDF Annotater is the category of software you want. There's probably other PDF Annotaters out there but Xournal works great! "PDF Editor" or how to edit PDFs will get you the sort of answers like "you shouldn't edit pdfs"

It's true that editing a PDF is kludgy and error prone, but its certainly not impossible. Usually, annotating is good enough. You can even mask areas with a white rectangle and provide different words or graphics. Just be aware that the original data is all still there, and often easily uncovered. It's fine though if you're the only one using the resultant PDFs.

3

If you asked your question today is it safe to assume that you installed LibreOffice 7?

In any case you can just open the LibreOffice main launcher (from which you can create a document, spreadsheet, Drawing, or whatever, or, open a file.

Forget any import plugins. Just open any pdf file and LibreOffice will open it in Draw. Your pdf file will open. You can change text, add images and crop and/or size the images, move stuff around with no problem.

I'm not sure what you mean about "corrupting" your file. I suggest that as soon as you open your pdf file with LibreOffice you do immediately a "File Save as" and add a suffix to the file name such as " rev 1" or today's date.

This functionality has been around in LibreOffice for many versions now.

Vanadium's suggestions of using Xournal++ or Gimp are good, however I have found Xournal++ is quite limited and, for example, can only open files of a certain size, last time I used it. Now Gimp, on the other hand, is a VERY powerful and sophisticated tool, and you may find it has a significant learning curve.

IMHO LibreOffice is the best middle-of-the-road choice as it's powerful and quite intuitive to use.

Now there are many pdf editing programs available for Linux, here's one list mentioning some of the items above:

13 Best PDF editors for Linux

I have purchased Master pdf Editor and have used it for several months now and it works very well including Digital Signature Certificates.

I'm considering purchasing Quoppa for better security.

N0rbert
  • 103,263
xian555
  • 75