-
-
Notifications
You must be signed in to change notification settings - Fork 226
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
PDF export #88
Comments
Google Code Info: |
Here's a draft patch (I was stymied by the types involved in Handler): diff --git a/Network/Gitit/Export.hs b/Network/Gitit/Export.hs module Network.Gitit.Export ( exportFormats ) defaultRespOptions :: WriterOptions +respondPDF :: String -> Pandoc -> Handler
Google Code Info: |
I got a little farther this time - to actual PDF downloads. But they're somehow diff --git a/Network/Gitit/Export.hs b/Network/Gitit/Export.hs defaultRespOptions :: WriterOptions -respond :: String
-respondX :: String -> String -> String -> (WriterOptions -> Pandoc -> String)
+respondPDF :: String -> Pandoc -> Handler
Note that I removed the specializing type signatures. I originally tried going 127.0.0.1 - [19/Jan/2010:01:49:34 +0000] "POST /Front+Page 1.1" 200 HTTP request ! I looked in happstack's simplehttp stuff, and that function's only caller is only Google Code Info: |
This is the wrong approach. You shouldn't be returning the PDF as a string. Google Code Info: |
Ah, I see. respondODT does work, although it took me quite a while to figure out the +respondPDF :: String -> Pandoc -> Handler
Google Code Info: |
PDF export (including caching!) is now in HEAD. Google Code Info: |
Resolves Issue jgm#88.
PDF is one of the most common formats around, and in particular, it is the
most likely to preserve all the wonderful formatting a gitit page can have.
For both of these reasons, it would be great if a Gitit page could be
exported as PDF - currently all the export options are very 'raw' formats
which just aren't very useful to someone who wants to read a page offline,
or send an article to another (perhaps the wiki in question is a personal
one). As it stands, the user must be fairly technically competent and
versed in document formats & Pandoc.
(It's also worth noting that 'export as PDF' is not unprecedented:
MediaWiki supports this (and it has proven exceptionally useful at
Wikibooks), and I'm sure many other wikis have this feature as well.)
Google Code Info:
Issue #: 64
Author: gwe...@gmail.com
Created On: 2009-09-18T15:03:35.000Z
Closed On: 2010-02-20T20:17:47.000Z
The text was updated successfully, but these errors were encountered: