Deeper in PDF

First published at 2019-11-26

Portable Document Format (PDF)

is a file format developed by Adobe in 1992 to present documents, including text formatting and images, in a manner independent of application softwarehardware, and operating systems.[2][3] Based on the PostScript language, each PDF file encapsulates a complete description of a fixed-layout flat document, including the text, fontsvector graphicsraster images and other information needed to display it.

Further readings

参加本次分享你将获得什么?

  • 明白 pdf 的边界,知道 pdf 能做什么不能做什么
  • 参与 easy-jspdf 的开发,让它成为下一代的 pdf 生成工具
  • 感性地理解 PDF 这种格式,开启后续深入的大门

下载一个 ecad 的空白 pdf 文档先

数据结构

  • Boolean values, representing true or false
  • Real numbers
  • Integers
  • Strings, enclosed within parentheses ((...)) or represented as hexadecimal within single angle brackets (<...>). Strings may contain 8-bit characters.
  • Names, starting with a forward slash (/)
  • Arrays, ordered collections of objects enclosed within square brackets ([...])
  • Dictionaries, collections of objects indexed by names enclosed within double angle brackets (<<...>>)
  • Streams, usually containing large amounts of optionally compressed binary data, preceded by a dictionary and enclosed between the stream and endstream keywords.
  • The null object

了解 PDF 格式,就了解了计算机科学的半壁江山:

3D/数字签名/字体/图像/嵌入 js 脚本……

A toy with big ambitions

https://github.com/zengxiaoluan/easy-jspdf

https://stackblitz.com/edit/vitejs-vite-6wjhj31u

想做没有做成的:支持图片/文档设置密码……

也许会有第二期,把接力棒传下去,下一个是?🙋