Writer - Merging PDFs

I've got 3 or so separate PDF files.

I'd like to merge them all into one PDF file in Writer in Office 3.6.2.2

Each page of each PDF file has a lot of empty space around the graphic image.

Ex. 2 inches above and below the graphic on each page and a good 3
inches on each side of each graphic is white, empty space.

Is there a way to eliminate all the empty space around each graphic in
in each page in each PDF or once all the PDFs are merged into one
larger PDF?

Thanks so much,

Charles.

Hi Charles,

I'm not aware of any way to merge multiple pdf files using LO. There are others on the list more knowledgeable than I, so maybe it can be done. There is a free, open source program that I've used to merge multiple PDF files into one file called PDFsam. It is available for Linux, Windows, and Mac. In Ubuntu there is an older version in the software center. That is what I've used. It has always worked well.

Don

Hi Charles,

I'm not aware of any way to merge multiple pdf files using LO.

The only way I know to merge pdf files with with pdftk.
http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/
Works great.

tony

There are

Another way to manipulate PDFs is with PDFBox.
https://pdfbox.apache.org/index.html

If you're on a Mac, you can just use Preview.

However, these things are not designed to modify the layout of pages. PDF is a page definition format; it defines the layout of pages. There are only very limited changes you can make.

Changing layouts means going back to sources and re-creating the PDFs.

LibreOffice Writer is not a PDF manipulator.

Since you want to manipulate the content In addition to merging​​ the
files, you can try to open it with Draw. If your PDF contains images, it
should allow you to manipulate them, and output it again as another PDF.

Note that opening PDF from Draw is a relatively recent development, and
might not be supported by the 3.6 line.

From

http://www.linux.com/news/software/applications/8229-putting-together-pdf-files

gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=out.pdf
file1.pdf file2.pdf

I've got 3 or so separate PDF files.

I'd like to merge them all into one PDF file in Writer in Office
3.6.2.2

Each page of each PDF file has a lot of empty space around the
graphic image.

Ex. 2 inches above and below the graphic on each page and a good 3
inches on each side of each graphic is white, empty space.

Is there a way to eliminate all the empty space around each graphic in
in each page in each PDF or once all the PDFs are merged into one
larger PDF?

On Linux, you can open a pdf file with a pdf viewer, as example with
evince, select what you want to copy, do a right click and select copy.
Then in writer you can copy it. Only the text will be copied, and you
will loose most of the page layout and things like links. Also, it will
not work if the pdf is copy protected.

For the pictures, the viewer comes with a set of console tools like
pdfimages that can extract the raw pictures, or pdftoppm that can
extract the whole pdf as a set of pictures. Be aware that images into a
pdf can be a real mess, because they can be rotated, mirrored, or
split into small pieces. In the 2 first cases, convert can be used to
rotate and mirror back the pictures, in the last case, only pdftoppm
can let you extract the pictures.

Dominique

I've got 3 or so separate PDF files.

I'd like to merge them all into one PDF file in Writer in Office
3.6.2.2

Each page of each PDF file has a lot of empty space around the
graphic image.

Ex. 2 inches above and below the graphic on each page and a good 3
inches on each side of each graphic is white, empty space.

Is there a way to eliminate all the empty space around each graphic in
in each page in each PDF or once all the PDFs are merged into one
larger PDF?

On Linux, you can open a pdf file with a pdf viewer, as example with
evince, select what you want to copy, do a right click and select copy.
Then in writer you can copy it. Only the text will be copied, and you
will loose most of the page layout and things like links. Also, it will
not work if the pdf is copy protected.

If the pdf is selectable/copyable text, you can also export it directly to a plain text file with pdftotext (on linux).

For the pictures, the viewer comes with a set of console tools like
pdfimages that can extract the raw pictures, or pdftoppm that can
extract the whole pdf as a set of pictures. Be aware that images into a
pdf can be a real mess, because they can be rotated, mirrored, or
split into small pieces. In the 2 first cases, convert can be used to
rotate and mirror back the pictures, in the last case, only pdftoppm
can let you extract the pictures.

When clients send me pdf files full of images to be translated,
I often just snap a screenshot of them and manage the images in GIMP.
In such cases, I am reconstructing their document in LO (in English,
whereas the originals come to me in any of French, Portuguese or Spanish), so then I just insert the images into the document in LO.

Of course, I could probably just import the whole PDF into GIMP (pages as images, not layers), and then grab the images I need by cropping the pages for them.

Tony

Just a quick "offtopic" remark: you can directly open PDF in GIMP​​ in the
resolution of your choice. This way you might be able to get better picture
quality (if the picture in the PDF is also high quality of course). I tend
to be on the cautious side and choose 300dpi, because sometime there's a
picture in there that's actually very high definition and I don't want to
notch it down with a simple screenshot :slight_smile:

Draw can also be useful in your process, as you can directly select images.
Assuming they didn't get chopped in multiple pieces, you can directly
copy/paste images from Draw to Writer :wink:

>
>> I've got 3 or so separate PDF files.
>>
>> I'd like to merge them all into one PDF file in Writer in Office
>> 3.6.2.2
>>
>> Each page of each PDF file has a lot of empty space around the
>> graphic image.
>>
>> Ex. 2 inches above and below the graphic on each page and a good 3
>> inches on each side of each graphic is white, empty space.
>>
>> Is there a way to eliminate all the empty space around each
>> graphic in in each page in each PDF or once all the PDFs are
>> merged into one larger PDF?
>
> On Linux, you can open a pdf file with a pdf viewer, as example with
> evince, select what you want to copy, do a right click and select
> copy. Then in writer you can copy it. Only the text will be copied,
> and you will loose most of the page layout and things like links.
> Also, it will not work if the pdf is copy protected.

If the pdf is selectable/copyable text, you can also export it
directly to a plain text file with pdftotext (on linux).

>
> For the pictures, the viewer comes with a set of console tools like
> pdfimages that can extract the raw pictures, or pdftoppm that can
> extract the whole pdf as a set of pictures. Be aware that images
> into a pdf can be a real mess, because they can be rotated,
> mirrored, or split into small pieces. In the 2 first cases, convert
> can be used to rotate and mirror back the pictures, in the last
> case, only pdftoppm can let you extract the pictures.

When clients send me pdf files full of images to be translated,
I often just snap a screenshot of them and manage the images in GIMP.
In such cases, I am reconstructing their document in LO (in English,
whereas the originals come to me in any of French, Portuguese or
Spanish), so then I just insert the images into the document in LO.

Of course, I could probably just import the whole PDF into GIMP
(pages as images, not layers), and then grab the images I need by
cropping the pages for them.

I made a bash script that use pdfimages, pdftoppm and convert. In most
cases (when the images are not split into small pieces), it is faster
than working with gimp.

Dominique

** Reply to message from Peter West <lists@pbw.id.au> on Wed, 29 Jan 2014
23:04:39 +1000

Peter,

Could you explain off list how to do it with Preview? I've looked it over and
there is no obvious way I can see to do it. Thanks.

Cliff

Yes you can. LibreOffice is great pdf mabipulator.

Open Draw and select file - open.
Select each pdf file one by one.
This will open the files in indiviual windows.
In the left panel you can select single or multible pages and copy.
Paste the pages into the left panel of another Draw window.
Continue as you need...
When done you can just export to pdf as usual.

Cheers
Leif Lodahl

When clients send me pdf files full of images to be translated,
  I often just snap a screenshot of them and manage the images in GIMP.
In such cases, I am reconstructing their document in LO (in English,
whereas the originals come to me in any of French, Portuguese or Spanish),
so then I just insert the images into the document in LO.

Just a quick "offtopic" remark: you can directly open PDF in GIMP​​ in the
resolution of your choice. This way you might be able to get better picture
quality (if the picture in the PDF is also high quality of course). I tend
to be on the cautious side and choose 300dpi, because sometime there's a
picture in there that's actually very high definition and I don't want to
notch it down with a simple screenshot :slight_smile:

I did mention that possibility.
Most of those where I use screenshots are pdfs of scanned/photocopied documents, in black/white, and already in pretty poor quality.

Draw can also be useful in your process, as you can directly select images.
Assuming they didn't get chopped in multiple pieces, you can directly
copy/paste images from Draw to Writer :wink:

Wow! I had no idea this was possible!
Awesome!

Tony

It's a bit fiddly. You need to experiment a bit, because there are certain quirks in the process, and I don't remember them all off the top of my head. For example, you may find that you can only insert a page in front of an existing page, in which case, you will have to work from the last document, backwards. I'll assume here that you can insert after an existing page.

Copy the first document you want to merge, and open it in Preview. Open the thumbnails sidebar. Now open the next document, and open its thumbnails panel. The safest but slowest way to do this is to select one page at a time from the thumbnails of the second document, and drag that thumbnail into the thumbnail panel of the first document. Save your resulting document.

You have to be careful with the positioning of the inserted page, because you can end up with multiple documents within the target pdf. You might be Ok with that. This outcome seems to be more likely when you select multiple pages from the source document. Try it out. Make sure that, as you complete the merge of one document, you make a separate copy of the merged result, so that if things subsequently go wrong, you don't have to start from the beginning.

Let me know how you go.

** Reply to message from Peter West <lists@pbw.id.au> on Thu, 30 Jan 2014
11:53:32 +1000

Thanks Peter. It works as you described. The quirk to watch out for is to
drag the page to be inserted after the existing page and NOT below the cutoff
line on the thumbnail list. If you put it below the line then when you save,
what is below the line is not saved. If above the line then it is all as
advertised. I selected all the pages I wanted to copy at once since they were
going to be at the end of the initial document. Worked slick.

Cliff

I've used Inkscape to break up PDFs.
However, I prefer to have everything in Writer natural rather than as an image.
It's a mix of deleting oversized areas (objects), cut and paste (text) and export.

Hope it helps