Sep 03, 2019 Creating A Multi Page PDF with inkscape. In order to create a multi page PDF with Inkscape you must design each page individually and save it as its own individual PDF document. Then you can merge them all together using any one of a variety of tools. Here are some that I’ve used personally and would recommend 1.) PDFsam. This is what I currently use and would recommend to. Easy to install, simple to use. Works as a hack (truly an extension) over Inkscape. Add page switching capability. Just enough before a full integration. Printing is not so trivial (needs PDF conversion) but works perfectly. It is much easier to use this extension than learning a new software or tool for DTP.
Two ways of editing existing PDF documents: one with LaTeX for automation's sake, another one with Inkscape for visualisation's sake. This post describes how.
Googling for pdf editor linux will take you to discussions such as Which programs can I use to edit PDF files? or How to Edit PDFs? which will refer to tools such as flpsed, PDFedit, even LibreOffice Draw. I quite like using LATEX myself or Inkscape, depending on the needs.
This approach doesn’t allow you to change the PDF per se, so much as it lets you add contents on top of an existing PDF file and generate a new PDF. The LATEX
graphicx
package supports PDF perfectly and TikZ is a rather good solution for placing text and adding drawings. The idea is to make an overlaid tikzpicture
for each page and place e.g. text nodes. This part is relatively easy and can be automated on the fly with any good text editor.This approach being non-graphical, the difficulty lies in actually finding the right position for those nodes. This will involve repeatedly changing coordinates and checking the result. You’ll soon want to use all the shortcuts you can wield to make this bearably fast. For instance, I find it convenient to use Vim’s CTRL-X and CTRL-A commands to respectively decrease and increase values as with a slider and
:w | !latexmk -pdf
short-cut to @:
to save and compile the file quickly. Unlike Inkscape, you can’t use snapping at all, so the positioning precision can only be perceptual.![Manual Manual](/uploads/1/2/5/8/125880789/961862510.png)
Your file will look like this:
Inkscape is a superb vector graphics editor which supports a variety of formats. Since version 0.91 and thanks to poppler, it’s become rather good at supporting PDF files which you can open and save. Imported PDF documents are organised in groups of objects which you can all edit graphically, i.e. remove, duplicate, change their colours, shape – anything you fancy, really. What’s more, you can use snapping to position objects with the best possible precision.
To edit a PDF file in Inkscape, simply create a new Inkscape document, then open menu File → Import and choose the original PDF file. Inkscape can unfortunately only import one page at a time, which you need to select in the PDF Import Settings dialogue that will appear while importing the file. I never found any of the Clip to options to do anything useful, so don’t bother with them. However, do tick the import via Poppler setting to ensure the best possible PDF support. I normally leave the other options to their default values.
One annoying problem is that the page clipping will be cropped to the contents, so importing an A4 document will always result in an object smaller than A4 if the content of the page is smaller than the page itself. LATEX to the rescue: you can draw a rectangle the size of each page with this snippet of code – just change the loop condition according to the number of pages and the path to the original PDF file.
![Inkscape pdf editor free Inkscape pdf editor free](https://a.fsdn.com/con/app/proj/inkscape-pages/screenshots/306835.jpg/245/183/1)
The page will be imported as a single group of object groups which you can repeatedly ungroup with menu Object → Ungroup to be able to edit them. If you’ve added a clipping rectangle, you can easily remove it at this point.
Once you’re satisfied, you can use menu File → Save to directly save a new PDF file. Again, Inkscape doesn’t understand multiple pages so you’ll need to save a PDF file for each one of them. I use
pdfjoin
to join all pages to a single PDF file again:This will create a single PDF file called
lipsum-2-joined.pdf
with all the pages joined. You’ll find that the resulting file will be much heavier than the original one – Inkscape isn’t too good at keeping PDF files optimised.Support for Multiple Pages | Clipping | Graphical Editing | Automation | Positioning Precision | Resulting PDF Size | |
---|---|---|---|---|---|---|
L | Yes | Correct | No | Easy | Only perceptual | Light |
Inkscape | No | Incorrect | Yes | Difficult | Exact with snapping | Heavy |
If you've ever needed to edit a PDF document containing one or more pages you've probably found it to be rather daunting unless you have some expensive software. I have found two solutions for editing PDFs with open source software; the first (flpsed) allows quick and easy simple edit functionality, while the second (GIMP) allows you to do most anything with a PDF.
Simple Editing with flpsed
I have recently found the flpsed app which works well for entering plain text and tags within a pdf document. flpsed is rather basic, it does not allow adding images (for example: an image of your signature), but it is very convenient for filling out a pdf document with simple text input.
To Install
$ sudo apt-get install --no-install-recommends flpsed |
To Use
$ flpsed myDocument.pdf |
Editing with GIMP and pdftk
GIMP supports importing PDF documents. Once imported, you can do anything with the PDF that you can do to a traditional image in GIMP.
To Install
$ sudo apt-get install --no-install-recommends gimp pdftk |
note: if your version of gimp does not support exporting as .pdf you can use the convert application which is contained in the imagemagick package
To Use
- Open the pdf document you wish to edit in GIMP
note: if your PDF contains multiple pages, GIMP will notify you and allow you to open each page as layer or an image. I use a image as I want each page as its own image (I 'glue' them back together in a later step). - Alter the pdf page(s) as needed and Export To... a '.pdf'
note: previous versions of GIMP did not allow Exporting to .pdf format, if this is your case, save it as a png and use convert (located in the imagemagick package) to convert from a .png to .pdf (e.g. $ convert myDocument.png myDocument.pdf) - Use pdftk to concat ('glue') the separated pdfs back into one pdf document
$ pdftk myDocument_p1.pdf myDocument_p2.pdf myDocument_p3.pdf cat output myDocument-combined.pdf
where myDocument_p1.pdf, myDocument_p2.pdf, myDocument_p3.pdf are the individual pdf files and myDocument-combined.pdf is the single pdf document that contains all of the individual pdf files
note: you can shorten/simplify the above using brace expansion (in bash) to be as follows:simplified with brace expansion $ pdftk mydocument_p{1,2,3}.pdf cat output myDocument-combined.pdf
Summary
flpsed allows quick and easy editing while GIMP/pdftk provide a robust suite for nearly all PDF editing needs. Both approaches provide an alternative to printing documents, signing them, and faxing/emailing back.
If you know of a better approach please share!