Code4Lib Journal PDFs

Revision as of 17:26, 24 March 2008 by Wickr (Talk | contribs) (Forgot to add the category tag last night)

Revision as of 17:26, 24 March 2008 by Wickr (Talk | contribs) (Forgot to add the category tag last night)

Goal: Make PDFs from the HTML from WordPress with the fewest changes possible.


Status

  • PDFs for an entire issue or for a single article can be created. Issue PDFs have a Table of Contents.
  • Most of the main formatting elements are working, but there are lots of things left to finalize and cleanup.

Detailed Info

  • Basic info (title, authors, issue #) - working
  • PDF Headers and Footers - working
  • Headings - working, but just h2 and h3
  • Paragraphs - working
  • Lists
    • Ordered - working
    • Unordered -
  • Tables -
  • Images - mostly working (more notes later)
  • Links
    • External - working, mostly done
    • Internal -
  • Code / Pre - working, needs cleanup
  • Other - more notes later


Big Issues

  • Unsure how to do syntax highlighting.


Process

  1. Each article is saved as a single HTML file.
  2. Images are saved locally, some file renaming needed.
  3. A new XML file is created for the issue. It has some basic info, but mostly just the article IDs, which is needed for the PDF for the entire issue.

Article HTML Conversion to XML

  • add closing slash to img tags
  • remove entities: &copy, &nbsp
  • strip doctype
  • remove namespace on <html>