Build: Prince 10.7
Environment: Windows 10 (10.0.14393 Build 14393)
Description:
PrinceXML bookmark metadata attribute "prince-bookmark-label" included in inline CSS becomes malformed when modifying inline style attribute using external Javascript via command line.
Steps To Reproduce (example files and .bat to run attached below):
1) Include element in HTML with inline style containing valid "prince-bookmark-label"
2) Use the --script flag to include a JS file that modifies the elements inline style (e.g. modifies fontSize property)
3) Run
Current result: Bookmarks in resulting PDF are missing their labels
Expected result: Bookmarks in PDF should have labels as specified in the attribute defined in prince-bookmark-label.
Possible cause: The included files will output the style attribute's value to the command line when ran, both before and after modification. You can see that prince is modifying the "style" attribute, causing the prince-bookmark-label property to be ignored when generating bookmarks.
e.g.
Before increase
id = bookmark
style = prince-bookmark-level: 1; prince-bookmark-label: attr(title);
title = Goodbye, World!
After increase
id = bookmark
style = prince-bookmark-level:1;prince-bookmark-label:attr(attr(name("title")));font-size:112pt
title = Goodbye, World!
Environment: Windows 10 (10.0.14393 Build 14393)
Description:
PrinceXML bookmark metadata attribute "prince-bookmark-label" included in inline CSS becomes malformed when modifying inline style attribute using external Javascript via command line.
Steps To Reproduce (example files and .bat to run attached below):
1) Include element in HTML with inline style containing valid "prince-bookmark-label"
2) Use the --script flag to include a JS file that modifies the elements inline style (e.g. modifies fontSize property)
3) Run
Current result: Bookmarks in resulting PDF are missing their labels
Expected result: Bookmarks in PDF should have labels as specified in the attribute defined in prince-bookmark-label.
Possible cause: The included files will output the style attribute's value to the command line when ran, both before and after modification. You can see that prince is modifying the "style" attribute, causing the prince-bookmark-label property to be ignored when generating bookmarks.
e.g.
Before increase
id = bookmark
style = prince-bookmark-level: 1; prince-bookmark-label: attr(title);
title = Goodbye, World!
After increase
id = bookmark
style = prince-bookmark-level:1;prince-bookmark-label:attr(attr(name("title")));font-size:112pt
title = Goodbye, World!
Edited by Dunnymeister