Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Criação de PDFs com Ruby

Criação de PDFs com Ruby

Avatar for Tomas Coelho

Tomas Coelho

July 22, 2023

Other Decks in Technology

Transcript

  1. Tomás Coêlho • Trabalho com Ruby desde 2019 • Atualmente

    na DocSales • Quase terminando 😅 Engenharia de Computação na UFC • Telegram: @tomascco • Linkedin: in/tomascco • Twitter: @tomasccoelho
  2. Portable Document Format: O padrão de várias indústrias Document management

    — Portable document format — Part 1: PDF 1.7, 2008. Pág vii.
  3. Portable Document Format: Objetivo: “Permitir a troca de documentos digitais

    de maneira fácil e robusta, independente do ambiente em que esses documentos foram criados ou do ambiente em que serão exibidos ou impressos.” Document management — Portable document format — Part 1: PDF 1.7, 2008. Pág vii.
  4. Portable Document Format: Formato Header Body Cross-reference Table Trailer Document

    management — Portable document format — Part 1: PDF 1.7, 2008. Pág 39, seção 7.5.1
  5. Portable Document Format: Booleanos • true • false Document management

    — Portable document format — Part 1: PDF 1.7, 2008. Seção 7.3.2
  6. Portable Document Format: Numéricos • 123 • +17 • -18

    • +12.5 • -20.4 • -.2 Document management — Portable document format — Part 1: PDF 1.7, 2008. Seção 7.3.3
  7. Portable Document Format: Strings • (Hello World) • <48656C6C6F20776F726C64> Document

    management — Portable document format — Part 1: PDF 1.7, 2008. Seção 7.3.4
  8. Portable Document Format: Name (símbolos) • /Type • /Page •

    /F13 Document management — Portable document format — Part 1: PDF 1.7, 2008. Seção 7.3.5
  9. Portable Document Format: Array • [30 /Type (String) true] Document

    management — Portable document format — Part 1: PDF 1.7, 2008. Pág 14, seção 7.3.6
  10. Portable Document Format: Dictionary • << /Type /Page /Length 304

    /ItemComTexto (texto aqui) /SubDicionario << /Item1 50.4 >> >> Document management — Portable document format — Part 1: PDF 1.7, 2008. Pág 14, seção 7.3.7
  11. Portable Document Format: Stream • << /Length 56 >> stream

    1.0 0.0 0.0 RG 0.5 0.75 1.0 rg 97.72 220.84 400 400 re B endstream Document management — Portable document format — Part 1: PDF 1.7, 2008. Pág 14, seção 7.3.8
  12. “Fazer um programa capaz de gerar um arquivo PDF. A

    entrada desse programa deve ser alguma representação dos objetos PDF que o arquivo final deverá conter.”