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

Option to export report into self contained file #39

Closed
vlsi opened this issue May 15, 2013 · 3 comments
Closed

Option to export report into self contained file #39

vlsi opened this issue May 15, 2013 · 3 comments

Comments

@vlsi
Copy link

vlsi commented May 15, 2013

It would be grate to export the report in a single HTML page, as it would enable easy sharing the results (e.g. email).

Quick&dirty attempt (pandoc --self-contained ...) revealed the following issues:

  1. fonts.css include lots of fonts (1.5MiB). I guess there is no much sense in that much bloat.
  2. included url('...?dsfsdf') are not properly parsed by pandoc (error is "file not found"). Should be an issue to pandoc, but a WA from pander would be great
  3. "hires" images do not work as pandoc does not convert <a href="..."> to base64. I suggest put <img style="display:none"> and enhance it via javascript. That should work properly with linked and data-uri encoded images.
  4. Pandoc converts stylesheets/javascripts to base64 for unknown reason. I have no idea if it is the root cause, but iPad email browser displayed the report with no stylesheets.
@daroczig
Copy link
Member

I have already played with --self-contained option before, but got rather buggy results, especially when the page also contained some math formulas. The problem is caused by the fact that the resulting file should work on localhost, hosted on HTTP and also with HTTPS protocol, so the linked JS/CSS should be available without any security issues. That was not straightforward to implement with some dirty JS hacks, but I did no dare to publish these yet :)

Anyway, thanks for the ticket, I will clean up those JS tweaks and will add a self-contained HTML option without hi-res images in the near future.

Update: the iPad issue is not a problem as I have already addressed that by adding the custom CSS/JS content after producing the HTML file with pandoc --self-contain

daroczig added a commit that referenced this issue Jun 5, 2013
@daroczig
Copy link
Member

@vlsi I would love to hear your feedback/experiences about the above commits.

@vlsi
Copy link
Author

vlsi commented Jun 18, 2013

@daroczig, I would definitely return with feedback. The current status is pander added a level up to the analysis, and now I am improving a testing part so it would gather more data to feed pander.

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

No branches or pull requests

2 participants