Legal contracts 2.0

2,310 views
2,239 views

Published on

At Seravia, we're building a web based legal service using ruby/rails. In this talk, we'll go over how we solve several problems around generating legal contracts, digitally signing them, and storing them.

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,310
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
33
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Legal contracts 2.0

  1. 1. LEGAL DOCUMENTS 2.0 LEGAL DOCUMENTS 2.0 by Peng Zuo by PENG ZUO SERAVIA.COM December 19, 2009 Beware of bugs in the above code; I have only proved it correct, not tried it. - Donald Knuth
  2. 2. LEGAL DOCUMENTS 2.0 by Peng Zuo THE LAWYER
  3. 3. LEGAL CONTRACTS LEGAL DOCUMENTS 2.0 by Peng Zuo http://seravia.com/research/company-setup/legal-contracts-2-0 Paper Digital
  4. 4. LaTeX & TeX Document markup language for the TeX typesetting program TeX created by Don Knuth High quality typesetting Standard for technical fields “ Cross-browser compatibility” TeX on version 3.1415926 Free LEGAL DOCUMENTS 2.0 by Peng Zuo
  5. 5. LaTeX PARTIALS Similar to HTML partials Lawyers create the partial templates System combines TeX files and evaluates all variables Generate pdf from final TeX file LEGAL DOCUMENTS 2.0 by Peng Zuo
  6. 6. LaTeX PARTIALS tex document: documentclass[12pt]{article} usepackage{amsmath} itle{LaTeX} date{} egin{document} maketitle [[partial1]] [[partial2]] end{document} partial1: LaTeX{} is a [[x]] for the TeX{} typesetting program. It offers programmable desktop publishing features and extensive facilities for automating most aspects of typesetting and desktop publishing, including numbering and cross-referencing, tables and figures, page layout, bibliographies, and much more. LaTeX{} was originally written in [[y]] by [[z]] and has become the dominant method for using TeX; few people write in plain TeX{} anymore. The current version is LaTeXe. partial2: egin{align} E &= mc^2 m &= frac{m_0}{sqrt{1-frac{v^2}{c^2}}} end{align} variables: x = "document preparation system" y = 1984 z = "Leslie Lamport" LEGAL DOCUMENTS 2.0 by Peng Zuo
  7. 7. RTeX http://rtex.rubyforge.org RTeX::Document.new(latex_content,{:preprocessor => 'pdflatex', :preprocess => true, :processor => 'pdflatex'} LEGAL DOCUMENTS 2.0 by Peng Zuo
  8. 8. DELAYED BackgroundRB Nanite Delayed Job LEGAL DOCUMENTS 2.0 by Peng Zuo
  9. 9. LEGAL DOCUMENTS 2.0 by Peng Zuo 然后 ?
  10. 10. DIGITAL SIGNATURES OpenSSL (openssl.org) Signer Authentication Document Authentication http://seravia.com/research/technology/digital-signatures LEGAL DOCUMENTS 2.0 by Peng Zuo The Problem
  11. 11. DIGITAL SIGNATURES LEGAL DOCUMENTS 2.0 by Peng Zuo
  12. 12. LEGAL DOCUMENTS 2.0 by Peng Zuo 有些时候 ...
  13. 13. LEGAL DOCUMENTS 2.0 by Peng Zuo
  14. 14. LEGAL DOCUMENTS 2.0 by Peng Zuo SEND HELP
  15. 15. iText Open source library for creating and manipulating pdf files Java LEGAL DOCUMENTS 2.0 by Peng Zuo
  16. 16. iText LEGAL DOCUMENTS 2.0 by Peng Zuo Before Filled After Filled
  17. 17. RJB – RUBY JAVA BRIDGE Ruby Java LEGAL DOCUMENTS 2.0 by Peng Zuo ?
  18. 18. RJB – RUBY JAVA BRIDGE Ruby Java LEGAL DOCUMENTS 2.0 by Peng Zuo 必须把所有代码运行在 JRuby 上
  19. 19. RJB – RUBY JAVA BRIDGE LEGAL DOCUMENTS 2.0 by Peng Zuo Ruby Java 在 Ruby 代码里直接调用 Java Library RJB
  20. 20. RJB – RUBY JAVA BRIDGE LEGAL DOCUMENTS 2.0 by Peng Zuo require 'rjb' str = Rjb::import('java.lang.String') instance = str.new "test" instance.toString #=> "test"
  21. 21. RJB – RUBY JAVA BRIDGE LEGAL DOCUMENTS 2.0 by Peng Zuo load_path = File.join(RAILS_ROOT,"iText-2.1.7.jar") Rjb::load load_path Rjb::import ... #import java package Have “fun” with iText!
  22. 22. LEGAL DOCUMENTS 2.0 by Peng Zuo STORAGE Simple Secure Speedy S3 Persistence is always a problem.
  23. 23. PAPERCLIP LEGAL DOCUMENTS 2.0 by Peng Zuo http://github.com/thoughtbot/paperclip PAPERCLIP
  24. 24. SUMMARY LEGAL DOCUMENTS 2.0 by Peng Zuo pdf (rtex, iText, rjb, paperclip, s3) Digital signatures (openSSL) delayed_job, fax TeX/LaTeX

×