emacs-pdf

Emacs library to print buffer to PDF file.
Log | Files | Refs | README

README (2822B)


      1 emacs-pdf.el -- Emacs library to print buffer to PDF file.
      2 
      3 * Example configuration
      4 
      5    (require 'pdf)
      6 
      7 * Example usage
      8 
      9    M-x pdf-buffer
     10 
     11 or
     12 
     13    M-x pdf-region
     14 
     15 in example.txt will create example.txt.pdf file.
     16 
     17 Some variables can be customized in pdf and ps groups.
     18 
     19 * Download
     20 
     21    git clone https://logand.com/git/emacs-pdf.git
     22 
     23 * Atom Feed
     24 
     25 see https://logand.com/sw/emacs-pdf/atom.xml
     26 
     27 * Why?
     28 
     29 PDF have (unfortunatelly) become the standard format for exchanging
     30 documents.
     31 
     32 Emacs does not have a simple way of creating PDF documents yet.
     33 
     34 There are many ways to create PDF documents in Emacs currently but all
     35 of them require installation of huge external dependencies.
     36 
     37 Printing from Emacs also pretty much depends on unsafe, unportable and
     38 obsolete PostScript.
     39 
     40 * What
     41 
     42 emacs-pdf.el solves the above issues by creating PDF documents
     43 directly in Emacs without any external dependencies.
     44 
     45 The code is rather short but already takes it quite close towards the
     46 goal.  Pages are automatically broken and counted, page headers and
     47 footers are supported and a few things like font type or size can be
     48 customized.
     49 
     50 * TODO
     51 
     52 unicode support: The biggest missing piece is support for non-ASCII
     53 characters.  Emacs has already the best support for international
     54 input and output of any software I know.  It would be nice to extend
     55 that also to PDF generation.  I myself use several input methods and
     56 characters not supported by PDF out of the box.  This is complex but
     57 essential.
     58 
     59 per file customizations: Should this be stored in a separate file
     60 (instead of in-file syntax)?  I would really like to customize page
     61 headers and footers and font type and size per file.
     62 
     63 justification: It would be nice to justify paragraphs.  This would
     64 require understanding of font metrics and will bring quite a lot of
     65 complexity.
     66 
     67 box justification: Justify the whole box right but justify the text
     68 inside the box left.  Does it need special syntax or would a
     69 convention be enough?
     70 
     71 ruler: It would be nice to suport tab-stop-list or something like
     72 that.
     73 
     74 multiple columns: It would be nice to output text in more columns.  It
     75 should be possible to control where exactly to turn it on and off so
     76 maybe we need some kind of syntax for this?  If there is syntax for
     77 this kind of stuff, what about syntax for justification and ruler?
     78 
     79 colors: It would be nice to support color output.  What would be a
     80 good way to have Emacs in reverse video (screen with black background)
     81 but still support output to white paper without fiddling with faces
     82 too much?
     83 
     84 tables, pictures etc: Is there a reasonable subset for rich documents
     85 without inventing new document format and reinventing TeX, roff etc?
     86 Or just use abw or odt files directly?
     87 
     88 * Discussion
     89 
     90 see
     91 https://www.reddit.com/r/emacs/comments/guffg5/emacspdfel_emacs_library_to_print_buffer_to_pdf/