Internal PDF import ignores layer visibility

Following up on a discussion in #1213 (closed), I have generated a simple document in Adobe Illustrator 2020, to test how well Inkscape handles opening it. A separate issue for opening SVG exported by Illustrator is here.


Aside: Illustrator versions

Adobe Illustrator 2020 is the current version. AI has been a SAAS product since 2013. Since it does not run except with a current subscription, it is reasonable to presume that the vast majority of its current user base is on the latest (or nearly the latest) version.

I am not certain that there is much use in calling out a specific version number or set of version numbers for which version of AI is supported. AI version names change (generally speaking) more frequently than Inkscape releases.


Test file

The test file was created in AI. It contains several simple elements (a very small subset of potential AI or SVG elements) that should serve as good reference points for how well opening these files currently works:

  • It has a document size, which is 8.5 x 11 inches.
  • It contains some text laid out in Goudy Bookletter 1911, a font available under the SIL Open Font License (a FOSS-friendly license so that anyone testing the import can install it font on their computer.)
  • It contains both plain and flowed text.
  • It contains text converted to outlines.
  • It contains three squares, each 1 inch (2.54 cm) on a side, with a fill, stroke, and fill plus stroke.
  • It contains text placed in multiple layers and a sublayer
  • It contains layer that is hidden.

Screen_Shot_2020-01-24_at_5.16.07_PM

The screenshot above shows how the document appears in AI. Most of the text and graphical elements are in the layer called Layer 1. There is additional text in Layer 2, and in Layer 2A, which is a sublayer of Layer 2. There is also text in Layer 4 which is hidden and not visible in the document screenshot.

layers


Saving the file from AI

I saved the file with relatively standard options selected: saving

The original file is attached here for download.


Opening with Inkscape

I'm testing with Inkscape 1.0beta2 (2b71d25, 2019-12-03) on a Mac. I used the File > Open command.

Option: Poppler/Cairo import

Testing with the "Poppler/Cairo" option:

import_cairo

The resulting document looks like this:

imported_cairo

The SVG file itself is attached here

Some notes on the results, from "Poppler/Cairo":

  • File size 243 kB, much smaller than the 1.2 MB Illustrator document.
  • Document size is correct
  • The correct font is displayed
  • No letters are missing in the text
  • The text from the hidden layer is not visible
  • The text comes in as symbol objects (not text), as expected.
  • The squares are sized correctly
  • The fill and stroke look correct

This is pretty good.

Option: Internal import

Testing with the "internal import" option:

import_internal

The resulting document looks like this:

imported_internal

The SVG file itself is attached here.

Some notes on the results, from "Internal import":

  • It is very efficient, only 42 kB, from a 1.2 MB Illustrator document.
  • Document size is correct
  • The correct font is displayed
  • The squares are sized correctly
  • The fill and stroke look correct
  • 🔴 Some letters are missing in the text
  • 🔴 The text from the hidden layer is visible
  • 🔴 The text comes in as text, but it is not really editable. Editing the text creates text with unreadable spacing

Discussion

There are some issues with how the "internal" import currently functions with an AI document. The Poppler/Cairo import is quite good, but does not produce editable text. The original AI file and the resulting Inkscape documents are attached above for further analysis.

This is hardly a comprehensive test -- it tests only a few types of AI/SVG objects -- but is a good starting place.

Edited by Jonathan Neuhauser