How to embed PDF file in Writer?

I have several PDF files that I would like to embed into Writer. I have seen the same principle in Microsoft Word. The Word document had many file-icons and clicking on the icon (inside Word document) PDF file was opened in PDF viewer program. I need to embed MANY PDF files into Writer on a icon like principle. For example: “If you would like to know about products details click on <pdf_file_icon_for_product>. If you would like to see prices, click on <pdf_file_icon_for_prices>.” Etc. Clicking on the PDF file icon in document should open PDF file in PDF viewer program.
How to embed PDF files in Writer?

To insert a link to PDF or any other file into document, use one of these two methods:

  1. InsertHyperlinkDocument, in Path field enter or search for file you want to link to. From “Form” field select Text or Button depending on how would you like the link to appear, and enter visible link description in the Text field, click Apply then Close. If you opted for Text, when you point to hyperlink, tip will show the key combination you need to press to open it (Ctrl + click). If you chose Button, then you first need to exit “Design Mode” by clicking on Design Mode On/Off icon in Form Controls or Form Design toolbar (ViewToolbars, check one of or both mentioned toolbars), and all you need to do to open the linked file is clicking on created button. In case you want button to appear as picture, right-click it, go to General tab and near the end of the list you will Graphics field, click on “…” next to it and navigate to picture. After that, if needed, resize the button to align with the picture.
  2. Other way for a link to file to appear as picture is importing the graphic first, InsertPictureFrom File, then right-click the picture, select Picture and in the Hyperlink tab click on Browse next to URL field to locate file which you want to link to. This will give you more control over your picture, you can resize it (righ-click on picture, select Picture, in Type tab check Keep Ratio and set Width or Height) for example which you couldn’t do with the one shown in the button. But the problem I encountered is that Ctrl-clicking on the picture didn’t open the linked file as expected and described in the balloon tip, which made this method useles, although it may work for somebody or in some other LibreOffice version (3.5.2 currently).

Note that this is not cross-platform, but you can use Insert|Object → OLE-Object for this.

Another way can be just by converting the pdf file to any image format.
if you are on some sort of ubuntu derivatives like i am, the default pdf reader has “print” function.
From Settings > select print > print to file > SVG format.

This is the easiest way you can convert it.
Note that - export one page at a time, else when you will be pasting it in the odt document, the images may overlap.

My problem was to embed complete pdf pages (not linked) inside the document produced by LibreOffice. These pages were produced by another program. I wanted to include index and page numbers in the output.

  • The workaround i used with pdftk:

  • Create the LibreOffice file with index. Insert blank pages where you
    want the external pdf files placed.

  • Write the desired index text at the top of the blank page. (h2, h3,… text)

  • Make that index text white. Now this text is invisible on white background. (Hoped there would be transparent colored text available, but no.)

  • Write out the pdf document. doc1.pdf.

  • Create another pdf document with writer. This contains exactly one empty page. doc2.pdf.

  • use pdftk to produce third document doc3.pdf. This document has as many pages as the doc1.pdf

  • This (doc3.pdf) document has the external pdf files on the empty pages.

For example. I have a 10 page document, doc1.pdf with empty pages # 2, 3 and 7 (actually these pages have the page number and white index text on them). I want to include external pages ext1.pdf, ext2.pdf and ext3.pdf into the final document.

Now I run

pdftk A=doc2.pdf B=ext1.pdf C=ext2.pdf D=ext3.pdf cat A B C A A A D A A A output ext-files.pdf

Then I run

pdftk doc1.pdf multistamp ext-files.pdf output Final-Output.pdf

Really hope someone made an add-on to include external pdf pages into the final pdf file.

1 Like

Hi,
your described problem and solution was also my thinking. So perhaps you will find this free project useful :slight_smile:

To Embed any object just follow below steps
Insert|Object → OLE-Object (select ‘Create new’ radio button & ‘Further objects’ as Object Type) Click ‘Ok’
→ In the ‘Insert Object’ pane

  • select ‘Create from File’ click
  • ‘Browse’ and select required file
  • select ‘Display As Icon’ check-box
    (use ‘Change Icon’ to rename the
    title of the Icon)