Skip to content

Offline PDF export always renders annotations strokes as thick grey lines #20002

Closed

Description

@ransoing

Expected behaviour

Offline PDF export should render the plot as it looks on the webpage.

Actual behaviour

Annotation strokes are always rendered as thick grey lines in the PDF offline export.

Live demo with steps to reproduce

https://jsfiddle.net/k7q4ou6y/
Use the chart menu to export as PDF

Product version

Latest at the time of this ticket
v11.1.0 (2023-06-05)

Affected browser(s)

Chrome, Firefox, likely others

Activity

  1. karolkolodziej commented on Oct 26, 2023

    @karolkolodziej
    Member

    Hi @ransoing!

    I'm not sure if this should be classified as a bug. If you take a look at the console there are warnings about the attributes that are not allowed. When added, everything works as expected- demo.

  2. ransoing commented on Oct 26, 2023

    @ransoing
    Author

    @karolkolodziej thanks for the fix. I'm able to get my application working properly.

    This feels like a bug since all other exporting options work as expected when the AST statements are not present (server exporting for PNG, SVG, and PDF, as well as offline exporting for PNG and SVG).

    When clicking the link in the console warning, it says:

    This error occurs if HTML in the chart configuration contains unknown tag names or attributes.

    The tag names and attributes in question are added by highcharts code (or by libraries imported by highcharts), as triggered by expected values in the chart config. Would this be a valid reason to add them to the "allow lists" by default? The point of the warning is to stop potentially malicious behavior, but it's not malicious to build a simple chart config that conforms to the published documentation.

  3. karolkolodziej commented on Oct 27, 2023

    @karolkolodziej
    Member

    I'm glad that everything works now!

    Thank you for sharing this, you are actually right- this should be treated as a bug. 😉

  4. self-assigned this
    on Nov 8, 2023
  5. added 2 commits that reference this issue on Nov 9, 2023
    a39d9d2
    88f1c90
  6. added a commit that references this issue on Nov 10, 2023
    1d7a5c1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions