IDML: Path geometry property is required (not optional) and fails for valid IDML files

Issue #935 resolved
Jim Hargrave (OLD) created an issue

The path geometry property is recommended but not required. By making it required we have seen several cases of failed imports. I am working to get a test file.

java.lang.IllegalStateException: Path geometry property does not exist
    at net.sf.okapi.filters.idml.PasteboardItem.fromTextualSpreadItemAndParentTransformations(PasteboardItem.java:46) ~[okapi-filter-idml-0.38.jar:na]
    at net.sf.okapi.filters.idml.OrderingIdioms.getOrderedPasteboardItems(OrderingIdioms.java:72) ~[okapi-filter-idml-0.38.jar:na]
    at net.sf.okapi.filters.idml.OrderingIdioms.getOrderedPasteboardItems(OrderingIdioms.java:46) ~[okapi-filter-idml-0.38.jar:na]
    at net.sf.okapi.filters.idml.Document.open(Document.java:106) ~[okapi-filter-idml-0.38.jar:na]
    at net.sf.okapi.filters.idml.IDMLFilter.openDocument(IDMLFilter.java:279) ~[okapi-filter-idml-0.38.jar:na]
    at net.sf.okapi.filters.idml.IDMLFilter.next(IDMLFilter.java:205) ~[okapi-filter-idml-0.38.jar:na]

Comments (7)

  1. Chase Tingley

    @Jim Hargrave (OLD) I agree, sounds like an easy fix. If you can get a test file, that would be great. cc @Denis Konovalyenko

  2. Denis Konovalyenko

    @Chase Tingley , I have taken a bit closer look at this and found out that a manually deleted path geometry from a textual spread item transforms it into something like a point with a collapsed text. For instance, below we can see the original UI:

    and the adjusted one:

    Attaching the original and the adjusted documents for further observations.

  3. Denis Konovalyenko

    @Chase Tingley , it looks like this is not going to be an easy fix, as there has to be adjusted not only Propertiesparsing but the ordering of pasteboard items as well. The latter one would be trickier as it is not obvious what kind of information could be used instead of absent anchor points… Some sort of additional investigation is needed at least.

    Ideally, the original and actual text units have to be matched:

    final List<ITextUnit> originalTextUnits = getTextUnits("/05-complex-ordering.idml");
    final List<ITextUnit> actualTextUnits = getTextUnits("/935-complex-ordering-without-anchor-points.idml");
    

  4. Log in to comment