Skip to content

Support SVG filters via targeted fallback rendering #32

@rowland

Description

@rowland

Problem

Some assets warn with svg: <filter>: unsupported element skipped. SVG filters cover a wide range of effects, and skipping them can materially change the appearance.

What implementation would require

  • Identify which filter primitives are actually present in the asset corpus instead of aiming for the whole SVG filter spec.
  • Decide on a pragmatic rendering strategy. Native PDF equivalents exist for very little of this, so localized rasterization is the most likely implementation path.
  • Add parser support for <filter> references and enough structure to know when a node needs fallback rendering.
  • Build a renderer path that isolates the filtered subtree, rasterizes it at a controlled resolution, and places it back into the PDF.
  • Add guardrails around output size and performance.

Workarounds

  • Pre-rasterize filtered assets to PNG.
  • Export SVG variants with filter effects expanded or removed.
  • Keep pure-vector SVG only for assets that do not depend on drop shadows, blurs, or similar effects.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions