ovidiuch / aufond

A résumé for the modern age
76 stars 17 forks source link

Create exporting service (repost) #73

Closed ovidiuch closed 11 years ago

ovidiuch commented 11 years ago

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

ovidiuch commented 11 years ago

npm install pkgcloud in .meteor/local/build/server

ovidiuch commented 11 years ago

This

cd .meteor/local/build/server/
npm install cloudfiles
ovidiuch commented 11 years ago

Redirect plan, create PDF export

Correction: phantomjs

ovidiuch commented 11 years ago

About the fonts working in wkhtmltopdf: http://stackoverflow.com/questions/6721295/google-web-fonts-and-pdf-generation-from-html-with-wkhtmltopdf

ovidiuch commented 11 years ago

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

ovidiuch commented 11 years ago

Api of kthtmltopdf http://madalgo.au.dk/~jakobt/wkhtmltoxdoc/wkhtmltopdf-0.9.9-doc.html

ovidiuch commented 11 years ago

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

ovidiuch commented 11 years ago

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 :(

ovidiuch commented 11 years ago

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;
    }
  }
}
ovidiuch commented 11 years ago

Establishing requirements for exporting .pdf

ovidiuch commented 11 years ago

Subscribed to this thread https://github.com/ariya/phantomjs/issues/10592

ovidiuch commented 11 years ago

Current command with phantomjs

phantomjs server/.phantomjs-scripts/export-pdf.js "http://aufond.me/skidding/contact?_escaped_fragment_=" ~/Documents/resume.pdf

ovidiuch commented 11 years ago

Yey. it works with pdfs.

Order of business:

The merge put into staging this and create the interface!!!