Skip to content
Newer
Older
100755 114 lines (104 sloc) 1.87 KB
bdb41b9 @tuncer Build placeholder PDF files if FOP is not found
tuncer authored Mar 29, 2010
1 #!/bin/sh
2 #
3 # Copyright Tuncer Ayaz 2010. All Rights Reserved.
4 #
5 # %CopyrightBegin%
6ba7c11 Merge branch 'ta/doc-fakefop' into dev
Erlang/OTP authored Apr 8, 2010
6 #
7 # Copyright Ericsson AB 2010. All Rights Reserved.
8 #
9 # The contents of this file are subject to the Erlang Public License,
10 # Version 1.1, (the "License"); you may not use this file except in
11 # compliance with the License. You should have received a copy of the
12 # Erlang Public License along with this software. If not, it can be
13 # retrieved online at http://www.erlang.org/.
14 #
15 # Software distributed under the License is distributed on an "AS IS"
16 # basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
17 # the License for the specific language governing rights and limitations
18 # under the License.
19 #
bdb41b9 @tuncer Build placeholder PDF files if FOP is not found
tuncer authored Mar 29, 2010
20 # %CopyrightEnd%
21 #
22 # Author: Tuncer Ayaz
23 #
24
25 if [ $# -lt 4 ]
26 then
27 echo "Usage: fakefop -fo IGNORED -pdf OUTFILE"
28 exit 1
29 fi
30
31 OUTFILE=$4
32 NAME=`basename $4 .pdf`
33
34 echo Write $OUTFILE
35 cat > $OUTFILE <<EndOfFile
36 %PDF-1.4
37 1 0 obj
38 << /Type /Catalog
39 /Outlines 2 0 R
40 /Pages 3 0 R
41 >>
42 endobj
43
44 2 0 obj
45 << /Type /Outlines
46 /Count 0
47 >>
48 endobj
49
50 3 0 obj
51 << /Type /Pages
52 /Kids [4 0 R]
53 /Count 1
54 >>
55 endobj
56
57 4 0 obj
58 << /Type /Page
59 /Parent 3 0 R
60 /MediaBox [0 0 612 492]
61 /Contents 5 0 R
62 /Resources << /ProcSet 6 0 R
63 /Font << /F1 7 0 R >>
64 >>
65 >>
66 endobj
67
68 5 0 obj
69 << /Length 73 >>
70 stream
71 BT
72 /F1 24 Tf
73 10 400 Td
74 ($NAME) Tj
75 ET
76 BT
77 /F1 24 Tf
78 10 350 Td
79 (\(placeholder PDF generated without FOP\)) Tj
80 ET
81 endstream
82 endobj
83
84 6 0 obj
85 [/PDF /Text]
86 endobj
87 7 0 obj
88 << /Type /Font
89 /Subtype /Type1
90 /Name /F1
91 /BaseFont /Helvetica
92 /Encoding /MacRomanEncoding
93 >>
94 endobj
95 xref
96 0 8
97 0000000000 65535 f
98 0000000009 00000 n
99 0000000074 00000 n
100 0000000120 00000 n
101 0000000179 00000 n
102 0000000364 00000 n
103 0000000466 00000 n
104 0000000496 00000 n
105
106 trailer
107 << /Size 8
108 /Root 1 0 R
109 >>
110 startxref
111 625
112 %%EOF
113 EndOfFile
Something went wrong with that request. Please try again.