Carbon: Image export with over 500 lines of code, shows everything after 200 lines as plain background.

Created on 9 Apr 2019  ·  4Comments  ·  Source: carbon-app/carbon

Describe the bug
When creating longer sheets with over 200 lines of code the export to PNG shows no code after the 200th line.

To Reproduce
Steps to reproduce the behavior:

  1. Add 200+ lines of code
  2. In my case select Material + Coffeescript
  3. Click on 'Export'
  4. Export as 4x PNG
  5. Preview image.
  6. Everything after 200 lines of code stays plain, but does have the correct background color.

Info

  • macOS Mojave Version 10.14.3
  • Browser: Chrome Version 73.0.3683.86 (Official Build) (64-bit)


Screenshot

bug

All 4 comments

@mfix22 I have looked into this issue. Looks like dom-to-image doesn't support toPng with a height greater than 18K-20K pixels.

@manishsundriyal that is great to know! In that case, I'm not _too_ concerned, since images that long will probably have other issues when using Carbon.

Do you think it would be feasible to, for example, stitch multiple PNGs together? Might be more work than it is worth…

@mfix22 Yes, it's not worth enough. I have made a lot of content through carbon for almost all kinds of use, but I never came across a situation where I need a snippet of such large height.

A major future update could be something like using some other package than dom-to-image (If something better is available)

@manishsundriyal if you know of dom-to-image alternatives, I would definitely be open to trying them.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jgierer12 picture jgierer12  ·  5Comments

hamedmoody picture hamedmoody  ·  4Comments

vmitchell85 picture vmitchell85  ·  3Comments

LGTMXD picture LGTMXD  ·  4Comments

shaonkabir8 picture shaonkabir8  ·  5Comments