Closed ovidiuch closed 11 years ago
npm install pkgcloud
in .meteor/local/build/server
This
cd .meteor/local/build/server/
npm install cloudfiles
Redirect plan, create PDF export
Correction: phantomjs
About the fonts working in wkhtmltopdf: http://stackoverflow.com/questions/6721295/google-web-fonts-and-pdf-generation-from-html-with-wkhtmltopdf
Example of pdf export with no margins:
wkhtmltopdf -T 0 -B 0 -L 0 -R 0 http://aufond.me/sivers/contact\?_escaped_fragment_\= ~/Documents/sivers.pdf
Api of kthtmltopdf http://madalgo.au.dk/~jakobt/wkhtmltoxdoc/wkhtmltopdf-0.9.9-doc.html
Enable links:
wkhtmltopdf --enable-internal-links --enable-external-links -T 0 -B 0 -L 0 -R 0 http://localhost:3000/skidding/contact\?_escaped_fragment_\= ~/Documents/skidding.pdf
Also trying phantomjs for .pdf export https://github.com/ariya/phantomjs/wiki/API-Reference-WebPage#wiki-webpage-settings. It works best so far but it doesn't support links :(
Fix to prevent page breaks inside entries for phantomjs/webkit:
@media print {
body.timeline {
.entry .head,
.entry.year {
// Because images are inline-block, and images have inline-block display,
// WebKit prevents images from breaking between pages by applying this
// rule to all inline-block elements. This is more effective than
// page-break-inside: avoid
// https://github.com/ariya/phantomjs/issues/10638#issuecomment-20186253
display: inline-block;
}
}
}
Establishing requirements for exporting .pdf
Subscribed to this thread https://github.com/ariya/phantomjs/issues/10592
Current command with phantomjs
phantomjs server/.phantomjs-scripts/export-pdf.js "http://aufond.me/skidding/contact?_escaped_fragment_=" ~/Documents/resume.pdf
Order of business:
The merge put into staging this and create the interface!!!
Makes request with ?_escapedfragment= in the back, extracts the css path, wgets it and replaces the tab with the entire content, so that the index doesn't depend on any external file. Then probably email it. Consider alternative delivering, like open in a new tab or send by email (check HN thread)
Also remove contents, images, and fetch avatar image and turn into data:image stuff
Parse export and fetch all external dependencies and put them inline