Comments (7)
It may be related to ariya/phantomjs#14194. Is the CSS file path relative?
from decktape.
In the HTML, there's this block:
<script>
var link = document.createElement( 'link' );
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = window.location.search.match( /print-pdf/gi ) ? 'conf1_files\reveal.js-3.2.0/css/print/pdf.css' : 'conf1_files\reveal.js-3.2.0/css/print/paper.css';
document.getElementsByTagName( 'head' )[0].appendChild( link );
</script>
I replaced (relative) paths to pdf.css with absolute paths (also replacing all backslashes with one forward slash):
<script>
var link = document.createElement( 'link' );
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = window.location.search.match( /print-pdf/gi ) ? /E:/Code/conf1_files/reveal.js-3.2.0/css/print/pdf.css' : 'E:/Code/conf1_files/reveal.js-3.2.0/css/print/pdf.css';
document.getElementsByTagName( 'head' )[0].appendChild( link );
</script>
I don't get any error message when I run decktape but the result is not pretty... The same slide is repeated on all the slides and is an overlap of a few slides, not centered (i.e. text is cut as if text was out of the slide).
Do you have any suggestions on what I should do next or if you think this is a bug?
PhantomJS version: 2.0.0 (installed from Win 64 binaries)
Windows 7 Enterprise
Thanks
from decktape.
The original issue is likely related to ariya/phantomjs#14194.
When you test with the absolute path, could you try adding the file://
prefix?
As you're using Reveal.js, one option is to run grunt serve
so that it's served on http://localhost:8000
and export it by using HTTP.
from decktape.
Ok thanks. And how would I export it using HTTP? With the Chrome PDF exporter plugin?
I tried creating the HTML (from markdown) with the self_contained = FALSE (I was using self_contained = TRUE). In the resulting HTML I get much more paths to reveal.js files but even after making the path modifications it doesn't work. In fact I get many more error messages (one for each of the paths its trying to access). Since when I use self_contained = TRUE I get only one error message (the one related to the <script> block mentioned previously, if I could find a way to "embed" what's in the "PDF export" <script> block as well would probably solve my problem but how to do it...
I will try it on my Linux machine at home see if I have more luck with using decktape.
from decktape.
Ok I got it to work by after I saw one of the pandoc options that was generated in R, when it converts a markdown document into HTML. I noticed this option --variable "revealjs-url=conf_1_files\reveal.js-3.2.0"
, that I replaced with an absolute path. I couldn't add file:///
without an error in the call to pandoc (maybe due to this bug: jgm/pandoc#1558. I will try updating my verson of pandoc, which is pretty old). I added file:///E:/Code/...
manually in the resulting HTML and decktape ran without error. And the PDF looks good!
from decktape.
Great!
I'll update DeckTape once ariya/phantomjs#14194 is fixed so that we can test your use case.
from decktape.
Should be fixed in version 2.0.1
that uses headless Chrome. Let me know if you still face this issue.
from decktape.
Related Issues (20)
- Audit warnings when installing decktape
- Add some e2e tests HOT 1
- Would you be open to financial contributions? HOT 2
- Reveal remove transition HOT 1
- Table layouts are not preserved, text boxes get combined in odd ways HOT 6
- Dependencies are not hoisted HOT 3
- Docker image error HOT 8
- Crashes with "Unable to write GSUB: script latn has no default language system" HOT 3
- Add a 2D navigation support to generic plugin
- puppeteer_dev_chrome_profile-x HOT 2
- Emojis are missing from bold text and headings in PDF HOT 1
- Images not shown in PDF output (but are correct in PNG and browser) HOT 1
- How I was able to do a multi-architecture container image build (to support ARM ... M1 macbooks) HOT 2
- Remark custom styles not applied on PDF HOT 2
- Unable to transform reveal slides usign reveal.js-menu with docker HOT 2
- Updating to decktape 3.11 caused panic HOT 3
- Converting a jupyterlab_rise presentation
- homebrew package
- Text overlaps with border on Mermaid.js diagrams in a Reveal.js presentation HOT 1
- DeckTape Container Font Bug HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from decktape.