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

Render iframes as an image when exporting to PDF #4052

Open
0ffz opened this issue Dec 15, 2020 · 2 comments
Open

Render iframes as an image when exporting to PDF #4052

0ffz opened this issue Dec 15, 2020 · 2 comments

Comments

@0ffz
Copy link

0ffz commented Dec 15, 2020

I'm using some javascript libraries to make charts within my document right now, and I'm happy using iframes and pointing to a file as a sort of asset to generate them. It works perfectly fine within Typora or when exporting HTML, however for obvious reasons the iframe goes missing when exporting to PDF. I would like the iframe to be rendered and embedded into the PDF file in some way instead.

Some possible issues I can think of:

  • Should the iframe be cut off at its defined height when rendering, or should the entire scrollable portion be rendered.
  • Depending on the rendering method, if there are elements that move when scrolling, things may look wonky in the render (this isn't an issue if the frame is cut of off as described above.)
  • What to do when the iframe extends beyond the exported page height.

Apologies if there's an existing way of doing something similar that I don't know of. Thanks in advance!

@shoriwe
Copy link

shoriwe commented Jan 12, 2023

This will be extremely useful. I currently use Typora to make some reports using a custom monitoring system that render charts, this charts aren't dynamic but since they are rendered using CSR Apache Echarts Canvas I am unable to see when exporting to PDF, the only solution I see is by first making an image of the Iframe container and then inserting it to Typora. It will be useful to have this feature in Typora, hope this feature is planned at least

@LFWarsen
Copy link

LFWarsen commented May 1, 2023

I currently have a similar solution since Typora doesn't have another way of showing generated graphs of maths functions. I embed a desmos.com graph, but it's still not converting it to an image when exporting.

I would really like this, or the ability to generate maths functions within Typora itself. See #5714.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants