Bug 703798 - OCMD Parsing Error
Summary: OCMD Parsing Error
Status: RESOLVED FIXED
Alias: None
Product: MuPDF
Classification: Unclassified
Component: mupdf (show other bugs)
Version: 1.18.0
Hardware: PC Windows 10
: P4 normal
Assignee: MuPDF bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-22 11:47 UTC by Jorj
Modified: 2022-11-30 14:32 UTC (History)
0 users

See Also:
Customer:
Word Size: ---


Attachments
line will be ignored by MuPDF viewer and mutool draw (1.11 KB, application/pdf)
2021-04-22 11:47 UTC, Jorj
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jorj 2021-04-22 11:47:59 UTC
Created attachment 20940 [details]
line will be ignored by MuPDF viewer and mutool draw

If the /OCGs key of an /OCMD object is a dictionary, and not an array, then the wrong OCMD state may be computed.
The attached example contains 1 OCG an 1 OCMD referencing the OCG as a dictionary.
The first textline is subject to the OCMD's visibility state.
Result:
The viewer MuPDF will not show that textline, and its text will neither be extracted via mutool draw.

If however changing the OCMD reference of the OCG to a (one-element) array, expected behaviour occurs.

According to PDF spec, the /OCGs key in OCMD objects may be either: an array or a dictionary.