[Tutorial]How do I view or edit a PDF file with OpenOffice?

Discuss the word processor
Post Reply
John_Ha
Volunteer
Posts: 9583
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

[Tutorial]How do I view or edit a PDF file with OpenOffice?

Post by John_Ha »

See [Tutorial] How do I view or edit a PDF file with OpenOffice? in the Tutorials where it is kept up to date.

We often get PDF questions so I will post this as a tutorial. Does anyone know any other ways of editing a PDF? or other free PDF editors?

You cannot view or edit a PDF file with AOO alone. It is best to view PDFs with a PDF Viewer like Adobe Reader or Foxit Reader.

If you want to do major edits to a PDF you need to

a) buy Adobe Acrobat or a similar PDF editor;
b) obtain a free PDF editor like PDFEscape; or
c) use a File Conversion site like http://www.zamzar.com to convert the PDF to an editable format like .odt, .doc or .docx. Edit the file and create a new PDF.

If you want to do minor, cosmetic edits to a PDF using OpenOffice Draw (not Writer), you can install Oracle PDF Import Extension (for OpenOffice 3.x). The extension is shipped with LO.

That being said, I have never found this extension to be that useful for me because it works in two ways:

1 The PDF is a "normal PDF" - as in the vast majority of cases

In this case, when you open the PDF with AOO (File > Open > navigate to the PDF), the PDF file is opened in Draw, not Writer. The text on the Draw page is split into many single line paragraphs and is all but impossible to edit it satisfactorily for other than the most minor edits like changing a date. The is no concept of a paragraph, nor of text flowing to the next line and sometimes even the same line is split into different fields making alignment tricky. After editing you save the file as a PDF.

2 The PDF is a "hybrid PDF" which contains a .odt file embedded in the PDF alongside the normal PDF content - this is VERY unusual!

Hybrid PDFs are extremely unusual ...

... but if you are fortunate enough to have such a PDF, when you open the PDF with AOO (File > Open > navigate to the PDF), the extension opens the .odt file embedded in the PDF using Writer and, not surprisingly, you can edit the .odt file with Writer.

Both AOO and LO can create hybrid PDFs. With a document open go File > Export as PDF > General ..., and tick Embed this document inside the PDF.

The add-on description says ...

Best results with 100% layout accuracy can be achieved with the "PDF/ODF hybrid file" format, which this extension also enables. A hybrid PDF/ODF file is a PDF file that contains an embedded ODF source file as well as the normal PDF content. Hybrid PDF/ODF files will be opened in OpenOffice Writer as an ODF file without any layout changes.

The PDF Import Extension also allows you to import and modify PDF documents for non hybrid PDF/ODF files. PDF documents are imported in Draw to preserve the layout and to allow basic editing. This is the perfect solution for changing dates, numbers or small portions of text with a minimum loss of formatting information for simple formatted documents.

Documents with more sophisticated layouts, such as those created with professional Desktop Publishing applications that use special fonts and complex vector graphics are not suitable for the PDF Import Extension.

Copying text and images from a PDF open in Adobe Reader - if the contents are copyable.

You can easily copy text from a PDF by highlighting it and ctrl+c ..., or Edit > Copy. Each line is copied as a single paragraph so you will have a lot of paragraph returns to delete.

You can copy an image by left-clicking the image > right-click the highlighted area > Copy image.

Adobe Reader's Take a snapshot is very useful. Edit > Take a snapshot. Now click the top-left corner of what you want to copy and drag the mouse to the bottom-right corner and release ..., and the area is copied to the clipboard. Paste it into a graphics editor and save the image. You can zoom the PDF so the copied area is larger than the screen - just drag so that the screen scrolls.

Note that some PDFs are set by the author so that copying text and/or images is prohibited. Similarly, some images are broken into many small parts to make copying difficult.
Last edited by John_Ha on Tue Feb 04, 2020 8:57 pm, edited 7 times in total.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
User avatar
Villeroy
Volunteer
Posts: 31264
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: [Tutorial]How do I edit a PDF file with OpenOffice?

Post by Villeroy »

http://www.mediafire.com/file/7glxki5vi ... hybrid.pdf is a ODT/PDF hybrid I have created from the English ODT version of the immensely helpful Writer tutorial http://openoffice-uni.org/
You can open the odt component with OpenOffice or LibreOffice for editing. The PDF component can be viewed with any PDF viewer.
The same trick works with spreadsheets, presentations and drawings as well if you have either OpenOffice + PDF extension or LibreOffice where the extension is shipped with the suite.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
John_Ha
Volunteer
Posts: 9583
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: [Tutorial]How do I view or edit a PDF file with OpenOffi

Post by John_Ha »

I have submitted the tutorial at [Tutorial]How do I view or edit a PDF file with OpenOffice? together with the description and link to Villeroy's file.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
Post Reply