PDF

PDF

Ref

  1. Introduction to PDF
  2. Fillable PDF

Intro

  • Portable Format Document
  • A format meant to be displayed identicaly in all platforms and media

Simple Example

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
%PDF-1.7

1 0 obj % entry point
<<
/Type /Catalog
/Pages 2 0 R
>>
endobj

2 0 obj
<<
/Type /Pages
/MediaBox [ 0 0 200 200 ]
/Count 1
/Kids [ 3 0 R ]
>>
endobj

3 0 obj
<<
/Type /Page
/Parent 2 0 R
/Resources <<
/Font <<
/F1 4 0 R
>>
>>
/Contents 5 0 R
>>
endobj

4 0 obj
<<
/Type /Font
/Subtype /Type1
/BaseFont /Times-Roman
>>
endobj

5 0 obj % page content
<<
/Length 44
>>
stream
BT
70 50 TD
/F1 12 Tf
(Hello, world!) Tj
ET
endstream
endobj

xref
0 6
0000000000 65535 f
0000000010 00000 n
0000000079 00000 n
0000000173 00000 n
0000000301 00000 n
0000000380 00000 n
trailer
<<
/Size 6
/Root 1 0 R
>>
startxref
492
%%EOF

Structure

Typically, a PDF contains 4 parts:

  1. The header, with PDF version(and an option line to specify if the PDF contains binary data)
1
%PDF-1.7
  1. The body, containing a series of objects
1
2
3
4
5
6
7
1 0 obj
...
endobj
2 0 obj
...
endobj
...
  1. A cross-reference table that specifies the position of the bojects
1
2
3
4
5
6
7
8
xref
0 6
0000000000 65535 f
0000000010 00000 n
0000000079 00000 n
0000000173 00000 n
0000000301 00000 n
0000000380 00000 n
  1. A trailer, with information about where the document starts
1
2
3
4
5
6
7
8
trailer
<<
/Size 6
/Root 1 0 R
>>
startxref
492
%%EOF

Digital Sign a PDF

Fill a PDF form

  • Ref

  • Paid function by Adobe.

Author

Chendongtian

Posted on

2022-11-24

Updated on

2023-08-04

Licensed under

Comments