Inkscape: A Vector Drawing Tool

pdf export with cairo 1.10 defaults to version PDF-1.5

Reported by FHR on 2010-10-21
58
This bug affects 13 people
Affects Status Importance Assigned to Milestone
Inkscape
Medium
jazzynico
inkscape (Debian)
Fix Released
Unknown
inkscape (Ubuntu)
Low
Unassigned

Bug Description

I use inkscape 0.48 under Ubuntu 10.10.

When I export a file to pdf (file > save as > .pdf), the output file has format PDF-1.5, which wasn't the case in Ubuntu 10.04, where file were exported in pdf 1.4.

The only choice I have when exporting is pdf 1.4, but the output has format pdf 1.5 anyway. I tried to modify org.inkscape.output.pdf.cairorenderer.PDFversion in preferences.xml without success.

Attached is a screenshot showing the export process and the properties of the output file.

FHR (fhrouet) wrote :
~suv (suv-lp) wrote :

tested on OS X 10.5.8:
Not reproduced when using Inkscape 0.48+devel with cairo 1.8.10 (exports to PDF 1.4)
Reproduced when using Inkscape 0.48+devel with cairo 1.10.0 (exports to PDF 1.5)

There have been no changes in Inkscape with regard to PDF export: it seems that the most recent (stable) cairo version uses PDF 1.5 as default.

tags: added: cairo exporting pdf
Changed in inkscape:
status: New → Confirmed
~suv (suv-lp) wrote :

Cairo API - PDF Surfaces
 void cairo_pdf_surface_restrict_to_version
 enum cairo_pdf_version_t;
 void cairo_pdf_get_versions
 const char * cairo_pdf_version_to_string
<http://cairographics.org/manual/cairo-PDF-Surfaces.html#cairo-pdf-version-t>

Cairo API - Index of new symbols in Cairo 1.10
<http://cairographics.org/manual/index-1.10.html>

Changelog
PDF: Add cairo_pdf_surface_restrict_to_version API
<http://cgit.freedesktop.org/cairo/commit/?id=c4a57385fa2e69020f43519bea21b98182bf5fd7>

summary: - pdf export defaults to version PDF-1.5
+ pdf export with cairo 1.10 defaults to version PDF-1.5
~suv (suv-lp) wrote :

-> Add PDF language level(s) to 'PDF Export' options, depending on CAIRO_VERSION

Changed in inkscape:
importance: Undecided → Medium
jazzynico (jazzynico) on 2010-10-22
Changed in inkscape:
assignee: nobody → JazzyNico (jazzynico)
milestone: none → 0.49
status: Confirmed → In Progress
jazzynico (jazzynico) wrote :

Fix committed in the trunk, revision 9841.
Tested on Ubuntu 10.04 (cairo 1.8, no change) and Ubuntu 10.10 (the PDF version can be selected in the export dialog).

Changed in inkscape:
status: In Progress → Fix Committed
~suv (suv-lp) wrote :

Fix in r9841 confirmed with

a) local build on Mac OS X 10.5.8
Inkscape 0.48+devel r9841, cairo 1.8.10: exports PDF 1.4

b) development build from modevia for osx:
Inkscape 0.48+devel r9841, cairo 1.10.0: allows export to PDF 1.4 and PDF 1.5

Don't know if PDF 1.5 has additional or changed features that would need to be addressed on Inkscape's side as well (like for PS/EPS levels, e.g. bug #491590).

Changed in inkscape (Ubuntu):
status: New → Triaged
importance: Undecided → Low

~suv asked about PDF 1.4 vs 1.5.

I've found exporting as PDF 1.5 is a problem if you produce files for other people to open using Adobe Acrobat.

I produced a PDF for a client in Inkscape 0.48 that they couldn't open with Adobe Acrobat. FoxPro could import it fine.

I used Inkscape 0.47 to export the same file as a PDF 1.4 on another computer and Adobe Acrobat had no problems understanding this pdf file at all.

~suv (suv-lp) wrote :

@Dave Jeffery - your issue could be a known bug in cairo 1.10 when exporting objects with opaque gradients to PDF:
Bug #681512 “Opaque radial gradients cause PDFs to fail to open in Adobe Reader”
Bug #672686 “Some diagrams results in "Illegal character" in the generated pdf”

Using PDF 1.5 is unlikely to be causing issues with Adobe Acrobat. PDF is designed to be forward compatible. ie if the PDF file contains features that the reader does not know about, those features are ignored while the rest of the file displays correctly. The PDF 1.5 features that cairo supports are not used by Inkscape so even though the version in the file is 1.5 it is only using 1.4 features.

Only very old versions of Adobe Acrobat don't support PDF 1.5.
  Acrobat 5 (2001) -> PDF 1.4
  Acrobat 6 (2003) -> PDF 1.5
  Acrobat 7 (2005) -> PDF 1.6
  Acrobat 8 (2006) -> PDF 1.7
  Acrobat 9 (2008) -> PDF 1.7 + extensions

There are many other differences between 0.47 and 0.48 that could be the cause of your bug. Usually problems with opening PDF files are a cairo bug since cairo should never generate an invalid PDF file (unless cairo returns an error status).

~suv (suv-lp) wrote :

Proposing to backport since Windows and Mac OS X packages will ship with cairo > 1.10, too.

tags: added: backport-proposed
~suv (suv-lp) wrote :

Affects translated string, too.
@JazzyNico - are there any solutions to backport this nevertheless?

jazzynico (jazzynico) wrote :

@~suv - IIRC, the change is not too drastic. Thus it's possible to keep the old label, and as the new value is just the PDF version, we can keep it untranslated.

jazzynico (jazzynico) wrote :

Committed in the 0.48.x branch, revision 9796.
Option label changes (very minor) not backported.

Changed in inkscape:
milestone: 0.49 → 0.48.2
tags: removed: backport-proposed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package inkscape - 0.48.2-0ubuntu1

---------------
inkscape (0.48.2-0ubuntu1) oneiric; urgency=low

  * New upstream release (LP: #807912). Fixes several Ubuntu bugs:
    - [SVG Font Editor] Crash when kerning an empty pair (LP: #706506)
    - Connector tool crash Inkscake (orthogonal mode) (LP: #771738)
    - Errors printed to console if openclipart search fails (LP: #638844)
    - pdf export with cairo 1.10 defaults to version PDF-1.5 (LP: #664335)
    - Cairo rendering broken for "use" elements when scaling or a viewBox
      (LP: #705345)
    - gimp_xcf.py crashed with TypeError in effect() (LP: #565296)
    - Enable build against libwpg-0.2 (LP: #778951)
    - Please add supported filetypes into MimeType line of inkscape.desktop
      (LP: #278307)
    - Inkscape fails to build with gcc 4.6 (LP: #707205)
  * Drop 01-libwpg0.2.dpatch - Applied upstream
  * Drop 03-add-missing-mimetypes.dpatch - Applied upstream
  * Drop 04-fix-build-with-gcc4.6.dpatch - Applied upstream
  * Drop 05-add-missing-includes.dpatch - Applied upstream
  * Drop fix-fontforge-glyph-template.dpatch - Applied upstream
 -- Alex Valavanis <email address hidden> Sun, 10 Jul 2011 11:35:30 +0100

Changed in inkscape (Ubuntu):
status: Triaged → Fix Released
Changed in inkscape (Debian):
status: Unknown → Confirmed
Ted Gould (ted) on 2011-09-07
Changed in inkscape:
status: Fix Committed → Fix Released
Changed in inkscape (Debian):
status: Confirmed → Fix Released

How to select the version from command line with --export-pdf ?

bcrowell (launchpadcrowell07) wrote :

@Sergio Ĥlutĉin: I've opened a new bug report for the command-line issue: https://bugs.launchpad.net/inkscape/+bug/1110549

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.