// Please enter a detailed description of the issue // Description of the issue:
SVG Images with transparencies, printing
// Please enter a list of steps required to reproduce the issue // Steps to reproduce:
I have markdown files that use a code like the following line to display an SVG image:
Opening and displaying such MD files screen is perfect, but when I print the document and e.g. select “Open in Preview” in the Print dialog, the resulting image is defective because the transparencies are ignored.
Questions:
Is is possible to support transpoarencies in printing at all? If yes, can you point me in a direction what changes I need?
Alternatively: can I provide two images, one for screen, one for printing? I tried e.g the following whithout much success:
// If applicable please attach a sample document that causes the issue for you.
// Configuration (do not edit) Marked 2 1067 (Mac App Store)
macOS Version: 15.3.1
additionalMathJaxConfig:
allowPageBreakInCode: YES
bookTxtIsLeanpub: NO
summaryMdIsGitBook: NO
codeIsPoetry: NO
codeCanWrap: YES
collapsibleHeadlines: NO
convertGithubCheckboxes: YES
convertGithubEmoji: YES
convertYAMLToMMD: NO
defaultMathJaxConfig: TeX-AMS-MML_HTMLorMML
defaultPreviewStyle: 3
defaultProcessor: Discount (GFM)
enableMiniMap: NO
excludeBlockQuotesFromCounts: NO
excludeFootnotesFromCounts: NO
excludeVerbatimFromCounts: NO
excludeCaptionsFromCounts: NO
folderPreviewExtensionsArray: md, markdown, txt, mdown, html, opml
githubNewlines: YES
h1IsPageBreak: NO
h2IsPageBreak: NO
hrIsPageBreak: NO
includeMathJax: YES
includeKatex: NO
limitTextWidth: NO
mathNumberEquations: NO
mathNumberEquationsSide: 0
mathNumberEquationsAMSOnly: NO
minimalJavaScript: NO
outlineModeExtensions:
permissionGranted: NO
printHeaderBottomLeft:
printHeaderBottomRight:
printHeaderFirstPage: NO
printFooterFirstPage: NO
printHeaderTopLeft:
printHeaderTopRight:
processHTMLFiles: YES
removeMetadataForPreview: NO
removeYAMLHeaders: NO
scrollToEdit: YES
shouldDetectCritic: YES
shouldHighlightMarkupErrors: NO
shouldLoadCritic: NO
syntaxHighlight: YES
syntaxHighlightOnlyLang: NO
useCustomMarkdownProcessor: NO
customMarkdownProcessor:
useCustomPreprocessor: NO
customPreprocessor:
useFirstH1AsPrintTitle: YES
Support Staff1
Posted by
Brett on 07 Mar, 2025 03:17 PM
Your images didn't come through in your post, so I'm not sure what you've tried. It should be possible with CSS to provide two different images, but I don't think I can do anything to improve transparency handling in SVGs. Marked uses a now-outdated version of WebKit and its related printing system, and it can't be updated due to features it uses that aren't available in the updated version of WebKit.
Support Staff 1 Posted by Brett on 07 Mar, 2025 03:17 PM
Your images didn't come through in your post, so I'm not sure what you've tried. It should be possible with CSS to provide two different images, but I don't think I can do anything to improve transparency handling in SVGs. Marked uses a now-outdated version of WebKit and its related printing system, and it can't be updated due to features it uses that aren't available in the updated version of WebKit.