Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exported PDF card does not match preview or exported image #16

Open
rodelle opened this issue Aug 13, 2020 · 3 comments
Open

Exported PDF card does not match preview or exported image #16

rodelle opened this issue Aug 13, 2020 · 3 comments
Labels
bug Something isn't working

Comments

@rodelle
Copy link

rodelle commented Aug 13, 2020

Version 1.4

This is a template generated on Windows with quite a bit of custom javascript. I also used the trick to generate a csv from an external program and overwrite the cards.csv inside the ccst file. In the exported image, the top left rectangle of the Hyper-Toxicity card is an oval. In the exported PDF, the top left rectangle of the Hyper-Toxicity card is not an oval. The exported image is correct, and matches the preview inside of the program.

CCST File (added to zip file)
cards-ccst.zip

Image created from File > Export Card Images. The 6-F designator is inside an oval (correct).
card_001

PDF created from File > Export to PDF. The 6-F designator is inside a rectangle (incorrect)
print.pdf
capture

@sffc
Copy link
Owner

sffc commented Aug 13, 2020

Thanks for the report. It's most likely another Skia bug. Can you try the alternative export options under File -> Advanced and see if any of them fix the problem for you?

@rodelle
Copy link
Author

rodelle commented Aug 14, 2020

Export to PDF with Firefox (error)
image

Export to PDF with Electron (image is stretched, and the oval still does not show up)
image

Export to PDF with Canvas v1 (same as standard export to pdf, shows rectangle instead of oval)
image

@sffc sffc added the bug Something isn't working label Nov 30, 2020
@BigPhilGunner
Copy link

I am also having this issue. For me it is elements with filters applied that fail. Specifically linear gradients and outer glows.

I have tried the other output options with similar results (firefox errors, electron errors lots and canvas is the same as default).

2021-10-29 15_41_36-Window

2021-10-29 15_41_43-Window
`defs

  • var team_colour = {"Death Guard":"#169103", "Hive Fleet":"#fcc323", "Tomb World":"#00ff00", "Veteran Guard":"#02bac7", "Space Marines":"#0000ff", "Kommandos":"#ff0000", "Grey Knights":"#cccccc"}[faction]

    filter(id="glow")
    fegaussianblur(stdDeviation='3' result='coloredBlur')
    femerge
    femergenode(in='coloredBlur')
    femergenode(in='SourceGraphic')

    filter#sofGlowW(height='300%' width='300%' x='-75%' y='-75%')
    // Thicken out the original shape
    femorphology(operator='dilate' radius='2' in='SourceAlpha' result='thicken')
    // Use a gaussian blur to create the soft blurriness of the glow
    fegaussianblur(in='thicken' stdDeviation='1' result='blurred')
    // Change the colour
    feflood(flood-color='rgb(255,255,255)' result='glowColor')
    // Color in the glows
    fecomposite(in='glowColor' in2='blurred' operator='in' result='softGlow_colored')
    // Layer the effects together
    femerge
    femergenode(in='softGlow_colored')
    femergenode(in='SourceGraphic')

    lineargradient#grad1(x1='0%' y1='0%' x2='100%' y2='0%')
    stop(offset='0%' style='stop-color:rgb(0,0,0);stop-opacity:0')
    stop(offset='100%' style='stop-color:rgb(0,0,0);stop-opacity:1')

+imageFill(assets.bg1, 0, 0, 116, 180)
rect(x=0, y=16,width=100,height=35, fill=team_colour)
rect(x=0, y=16,width=100,height=35, fill="url(#grad1)")

+textWrap(body)(font-family="body", font-size=8, line-height=8, x=5, y=63, width=106, fill="#000000" filter="url(#sofGlowW)")

+text(cost)(align="center", font-family="stencil", font-size=32, fill="#ffffff", stroke="#000000", x=105, y=32)
+text(class_)(align="center", font-family="stencil", font-size=32, fill="#ffffff", stroke="#000000" x=105, y=56)
+text(faction)(align="center", font-family="stencil", font-size=12, x=58, y=177, filter="url(#sofGlowW)" fill=team_colour)
+text(Unique)(align="center", font-family="stencil", font-size=12, x=110, y=177, filter="url(#sofGlowW)" fill=team_colour)
+textWrap(title)(font-family="stencil", font-size=16, line-height=15, x=3, y=30, width=106, fill="#ffffff")`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants