41

Having trouble getting Inkscape to export PDFs cleanly and there don't seem to be many helpful resources out there. In particular, transparencies are difficult - sometimes the transparency will disappear and sometimes it'll be made into a solid block.

I've fiddled with the save-as-PDF settings in Inkscape and I've printed to a PDF using CutePDF without success. Is there some method of exporting or creating a file so that I can get predictable results?

  • Hopefully, @DA01 will chip in here. He's deeply familiar with Inkscape. – Alan Gilbertson Feb 9 '12 at 21:45
  • I wouldn't say deeply...but I am a fan of it. I don't know the answer but my guess would be that SVG and PDF are simply different file formats and support different parts of each specification. There's a lot you can do with SVG in terms of transparency, blur, blending and the like and I'm assuming PDF simply isn't supporting that yet. You may have to run the SVG through Adobe Illustrator first in hopes that AI will convert it to a format the PDF will be happy with. – DA01 Feb 9 '12 at 23:41
  • Inkscape has gone through a few updates since this question was asked. I'd be curious to know where this situation stands now, and if there are specific parts of the SVG to PDF conversion that are still problematic. – Scribblemacher Sep 2 '15 at 13:43

18 Answers 18

21

Inkscape (v.0.91) supports command-line options, and that is how I prefer to do it:

inkscape --file=mySVGinputFile.svg --export-area-drawing --without-gui --export-pdf=output.pdf

This is actually the command that LyX uses to prepare SVG images for use in LaTeX. I have used PlantUML to generate SVG, which then goes into PDF.

Here's a screenshot of the SVG in inkscape, which has pure vectorial representation (including fonts).

SVG in inkscape

Here's a screenshot of the PDF zoomed in, with a selection of the text "oo" from the word loop, showing that it's still text in the PDF:

PDF in Acrobat

  • 1
    This worked nicely. FYI, the Mac OS command-line tool is located at: /Applications/Inkscape.app/Contents/Resources/bin/inkscape - insert your --file=/My/File.svg etc. after that. – Demis Nov 21 '16 at 23:02
  • I tested it with a custom base64 font, but Inkscape (0.92) apparently does not support it. – xamid Dec 3 '18 at 21:30
8

Actually this has been asked and answered here for linux users.

You need to install librsvg2-bin. I'll just add that you will need to fit page to your svg otherwise it will be truncated. Within Inkscape: File -> Document properties -> Select your svg objects -> fit page to selection.

Then just run:

rsvg-convert -f pdf in.svg > out.pdf
  • This is, by far, the best answer: only one that worked! – Werner Feb 13 '16 at 3:39
  • This tool does not even keep the correct font size, let alone the correct font face. – xamid Dec 3 '18 at 21:28
6

From the main menu, choose:

File → Print... → Print to File

Here you can choose to save the file as PDF, PostScript or SVG.

5

Are you trying to export to .PDF to keep the editing capabilities? Otherwise, if you're trying to share an image with someone from Inkscape, save it as a .JPG or .PNG (if a translucent background is needed).

  • 1
    In the past, trying to save as a PNG/jpeg reduced the physical size and resolution of the image remarkably. Perhaps I'm just doing it wrong? – Zelbinian Feb 9 '12 at 20:47
  • Do you have the latest version of Inkscape downloaded? – kamalo Feb 9 '12 at 21:30
  • @Zelbinian, an SVG has no inherent size or resolution. It is only when you want to export as a PNG that Inkscape would ask for a size. Specify this to be as large as you want. – Abhranil Das Mar 18 '12 at 9:46
  • 7
    Changing a vector image to a raster image will definitely not maintain (other aspects of) the integrity of the image. – Sparhawk Feb 24 '14 at 5:38
3

On a Linux operating system, I export to PNG then use the convert tool to convert it to PDF.

  • 2
    +1 This isn't a bad answer...and is, in fact, a method I've used to get around Inkscape's flaws in masking shapes (that 'explode' when converted directly to PDF). For complex SVGs that Inkscape can't fully turn into a PDF, rasterizing is a viable workaround sometimes. – DA01 Jul 14 '13 at 16:26
3

I love using Inkscape to draw - it is much more intuitive than Illustrator and produces very professional results.

I used Inkscape to prepare figures for publication, however, and had significant difficulty exporting the figures with publication quality settings. Saving files as .eps did not properly embed my fonts and .pdf did not allow me to save with press quality. (I am using Windows XP and Inkscape Version 0.48.4.)

To get around this, I followed the directions for producing press quality figures found at this link.

These step by step instructions show you how to print to a PDF with embedded text and press quality settings.

I did have difficulty printing to pdf for some of my larger figures (only random portions of my figure would end up in the pdf, which was very frustrating!). To circumvent this problem I grouped all aspects of my Inkscape figure and shrank down the overall size. For some reason this worked really well and I obtained nice looking pdfs for these figures.

Another option is to cut the figure in half (if possible) and print two pdfs. These can be combined in Adobe Acrobat Professional (older versions are available for download at this link.

Click on "Create PDF", Choose "From Multiple Files" and select the pdfs you want to combine. These will show up as individual pages in the pdf document. To combine them to a single page go to File --> Print Under Page Handling change Page Scaling to Multiple pages per sheet.

Then you can customize how many pages you want per sheet. Click OK and your 2 PDFs will now be combined into a single page.

I hope this information is of help to those of you with strict requirements for publication quality figures.

1

I am using Inkscape and routinely store SVGs into PDF. Stay away from filters, and opaque settings as PDFs (or should I say InkScapes export to PDF) does not handle this feature very well.

I instead use color scales instead of opaque levels to soften colors directly on the palette and avoid the filters altogether. I know this is cumbersome and limits your abilities of what you can do. But exports looks fine if I follow these rules.

0

It’s been years since I had any problems with transparency of Inkscape-generated PDFs and if I had, those turned out to be a problem of the PDF viewer (or in one case: of an esoteric printer), not of Inkscape. Thus I would say that using a new version of Inkscape should fix such issues.

That being said, since Inkscape 0.47 (from 2009), there is the option Rasterise Filter Effects for PDF export, which should rasterise all those filters (for example blur) that are not supported by the PDF format and keep everything else vectorised.

0

It is very simple. Save your file/selection as pdf.

  • 1
    Which version? Has it changed? See answer of user 14047 and the comment of DA01 ... – Mensch Oct 1 '15 at 12:32
  • This answer doesn't address the question. The user's problem isn't that they don't know how to export a PDF from Inkscape, it's that the results are not satisfactory. – Scribblemacher Oct 1 '15 at 13:42
0
  1. Print
  2. Select Bitmap in the Rendering tab and choose the desired resolution.
  3. Select your PDF printer in the General tab.
  4. Print.

rendering tab

bitmap dpi and print

0

If you have FoxIt Reader installed, then you can just

  1. File -> Print (Ctrl+P)
  2. Choose "FoxIt Reader PDF Printer" to export file as a PDF.
0

If you are converting it for sharing purposes then export it as png. In the files tab there is a seperate option for exporting in as png. It will save you from a lot of trouble.

  • 3
    Can you elaborate what kind of trouble it will save and why? – WELZ Jan 9 at 1:13
0

If you have already set the page size on document properties (make sure your elements fit into the page) > go to print preview. Here you can save it as a pdf and also print it in the desired size without a loss of resolution.

0

I had this problem too, and none of the existing answers worked for me. I found my solution here: https://bugs.launchpad.net/inkscape/+bug/1004887

Add a filter to each image, and then save as pdf. Be sure to check "rasterize filter effects". I was dealing with greyscale images, so I applied a greyscale filter so that the images weren't visibly altered.

0

i had a incskape 0.92.4 trouble with save as pdf "*.pdf file could not be saved" just leave field "limit export with ID" empty (facepalm) enter link description here

  • 1
    Your image link is broken and your answer is not very clear... besides this is a very old question, are you sure you're adding useful information? Check How to Answer and then edit your answer to add more details / fix the broken image link. – Luciano Nov 4 at 10:43
-1

Try using the Snipping tool that comes with Windows 7. If it's not already pinned to your task bar you will find it under,All Programs,Accessories. Looks like a pair of scissors. That will save it as a jpeg, then open the jpeg and print with the cute PDF.

  • This probably isn't the solution Zelbinian is looking for; exporting to PDF would imply that vector objects are maintained. As the other answer pointed out, you could just export the file as a JPG anyway, taking a screenshot would be an inferior method in this case – JohnB Jan 28 '13 at 20:02
-1

I saved my document (including gradient layer over image and image with transparency) as JessyInk zipped PDF. Set the DPI and Save. In the Zip file you will find the PDF file as supposed to.

We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.

-1

I have been annoyed by this issue for a long time. As of 2019, the best approach I could find is to put an intermediate postscript step. Using the Make syntax:

rsvg-convert -f ps $^ | gs -sDEVICE=pdfwrite -sOutputFile=$@ -f -

where $^ is the source file and $@ is the target file.

It outputs PDF 1.7 by default with ghostscript 9.27. It solves all the issues I find with the inkscape (version 1.0 alpha) pdf saving engine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.