1
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
2
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
3
<title>Ipelib: IpePdfWriter class Reference</title>
3
<title>Ipelib: IpePdfWriter Class Reference</title>
4
4
<link href="doxygen.css" rel="stylesheet" type="text/css">
6
<!-- Generated by Doxygen 1.3.6 -->
7
<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="functions.html">Class Members</a></div>
8
<h1>IpePdfWriter Class Reference</h1>Create PDF file.
6
<!-- Generated by Doxygen 1.4.4 -->
7
<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="functions.html">Class Members</a></div>
8
<h1>IpePdfWriter Class Reference</h1><!-- doxytag: class="IpePdfWriter" -->Create PDF file.
9
9
<a href="#_details">More...</a>
11
11
<a href="class_ipe_pdf_writer-members.html">List of all members.</a><h2>Public Member Functions</h2>
13
<li><a class="el" href="class_ipe_pdf_writer.html#a0">IpePdfWriter</a> (<a class="el" href="class_ipe_tell_stream.html">IpeTellStream</a> &stream, const <a class="el" href="class_ipe_document.html">IpeDocument</a> *doc, bool noShading, int compression)
13
<li><a class="el" href="class_ipe_pdf_writer.html#a0">IpePdfWriter</a> (<a class="el" href="class_ipe_tell_stream.html">IpeTellStream</a> &stream, const <a class="el" href="class_ipe_document.html">IpeDocument</a> *doc, bool noShading, bool lastView, int compression)
14
14
<li><a class="el" href="class_ipe_pdf_writer.html#a1">~IpePdfWriter</a> ()
15
15
<li>void <a class="el" href="class_ipe_pdf_writer.html#a2">EmbedFonts</a> (const <a class="el" href="class_ipe_font_pool.html">IpeFontPool</a> *pool)
16
<li>void <a class="el" href="class_ipe_pdf_writer.html#a3">CreatePages</a> (bool lastView)
16
<li>void <a class="el" href="class_ipe_pdf_writer.html#a3">CreatePages</a> ()
17
17
<li>void <a class="el" href="class_ipe_pdf_writer.html#a4">CreateBookmarks</a> ()
18
18
<li>void <a class="el" href="class_ipe_pdf_writer.html#a5">CreateXmlStream</a> (<a class="el" href="class_ipe_string.html">IpeString</a> xmldata, bool preCompressed)
19
19
<li>void <a class="el" href="class_ipe_pdf_writer.html#a6">CreateTrailer</a> (<a class="el" href="class_ipe_string.html">IpeString</a> creator)
21
21
<hr><a name="_details"></a><h2>Detailed Description</h2>
24
This class is responsible for the creation of a PDF file from the Ipe data. You have to create an IpePdfWriter first, providing a file that has been opened for (binary) writing and is empty. Then call <a class="el" href="class_ipe_pdf_writer.html#a2">EmbedFonts()</a> to embed the <a class="el" href="class_ipe_font_pool.html">IpeFontPool</a>, EmbedBitmaps() to embed the bitmaps, and <a class="el" href="class_ipe_pdf_writer.html#a3">CreatePages()</a> to embed the pages. <code>CreateXmlStream</code> embeds a stream with the XML representation of the Ipe document. Finally, call <code>CreateTrailer</code> to complete the PDF document, and close the file.<p>
24
This class is responsible for the creation of a PDF file from the Ipe data. You have to create an IpePdfWriter first, providing a file that has been opened for (binary) writing and is empty. Then call <a class="el" href="class_ipe_pdf_writer.html#a2">EmbedFonts()</a> to embed the <a class="el" href="class_ipe_font_pool.html">IpeFontPool</a> and <a class="el" href="class_ipe_pdf_writer.html#a3">CreatePages()</a> to embed the pages. <code>CreateXmlStream</code> embeds a stream with the XML representation of the Ipe document. Finally, call <code>CreateTrailer</code> to complete the PDF document, and close the file.<p>
25
25
Some reserved PDF object numbers:<p>
27
<li>0: Must be left empty (a PDF restriction).</li><li>1: Ipe XML stream.</li><li>2: Parent of all pages objects. </li></ul>
27
<li>0: Must be left empty (a PDF restriction).</li><li>1: Ipe XML stream.</li><li>2: Parent of all pages objects.</li></ul>
30
30
<hr><h2>Constructor & Destructor Documentation</h2>
31
<a class="anchor" name="a0" doxytag="IpePdfWriter::IpePdfWriter" ></a><p>
32
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
31
<a class="anchor" name="a0"></a><!-- doxytag: member="IpePdfWriter::IpePdfWriter" ref="a0" args="(IpeTellStream &stream, const IpeDocument *doc, bool noShading, bool lastView, int compression)" --><p>
32
<table class="mdTable" cellpadding="2" cellspacing="0">
35
35
<table cellpadding="0" cellspacing="0" border="0">
37
<td class="md" nowrap valign="top"> IpePdfWriter::IpePdfWriter </td>
37
<td class="md" nowrap valign="top">IpePdfWriter::IpePdfWriter </td>
38
38
<td class="md" valign="top">( </td>
39
39
<td class="md" nowrap valign="top"><a class="el" href="class_ipe_tell_stream.html">IpeTellStream</a> & </td>
40
40
<td class="mdname" nowrap> <em>stream</em>, </td>
43
43
<td class="md" nowrap align="right"></td>
45
45
<td class="md" nowrap>const <a class="el" href="class_ipe_document.html">IpeDocument</a> * </td>
46
46
<td class="mdname" nowrap> <em>doc</em>, </td>
49
49
<td class="md" nowrap align="right"></td>
51
51
<td class="md" nowrap>bool </td>
52
52
<td class="mdname" nowrap> <em>noShading</em>, </td>
55
55
<td class="md" nowrap align="right"></td>
57
<td class="md" nowrap>bool </td>
58
<td class="mdname" nowrap> <em>lastView</em>, </td>
61
<td class="md" nowrap align="right"></td>
57
63
<td class="md" nowrap>int </td>
58
64
<td class="mdname" nowrap> <em>compression</em></td>
62
68
<td class="md">) </td>
63
69
<td class="md" colspan="2"></td>
70
<table cellspacing=5 cellpadding=0 border=0>
75
<table cellspacing="5" cellpadding="0" border="0">
80
85
If <em>noShading</em> is <code>true</code>, no background shading will be applied to pages (if such a shading is defined in the document's style sheet. </td>
83
<a class="anchor" name="a1" doxytag="IpePdfWriter::~IpePdfWriter" ></a><p>
84
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
88
<a class="anchor" name="a1"></a><!-- doxytag: member="IpePdfWriter::~IpePdfWriter" ref="a1" args="()" --><p>
89
<table class="mdTable" cellpadding="2" cellspacing="0">
87
92
<table cellpadding="0" cellspacing="0" border="0">
89
<td class="md" nowrap valign="top"> IpePdfWriter::~<a class="el" href="class_ipe_pdf_writer.html">IpePdfWriter</a> </td>
94
<td class="md" nowrap valign="top">IpePdfWriter::~IpePdfWriter </td>
90
95
<td class="md" valign="top">( </td>
91
96
<td class="mdname1" valign="top" nowrap> </td>
92
97
<td class="md" valign="top"> ) </td>
93
98
<td class="md" nowrap></td>
100
<table cellspacing=5 cellpadding=0 border=0>
104
<table cellspacing="5" cellpadding="0" border="0">
113
117
<hr><h2>Member Function Documentation</h2>
114
<a class="anchor" name="a2" doxytag="IpePdfWriter::EmbedFonts" ></a><p>
115
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
118
<a class="anchor" name="a2"></a><!-- doxytag: member="IpePdfWriter::EmbedFonts" ref="a2" args="(const IpeFontPool *pool)" --><p>
119
<table class="mdTable" cellpadding="2" cellspacing="0">
117
121
<td class="mdRow">
118
122
<table cellpadding="0" cellspacing="0" border="0">
120
<td class="md" nowrap valign="top"> void IpePdfWriter::EmbedFonts </td>
124
<td class="md" nowrap valign="top">void IpePdfWriter::EmbedFonts </td>
121
125
<td class="md" valign="top">( </td>
122
126
<td class="md" nowrap valign="top">const <a class="el" href="class_ipe_font_pool.html">IpeFontPool</a> * </td>
123
127
<td class="mdname1" valign="top" nowrap> <em>pool</em> </td>
124
128
<td class="md" valign="top"> ) </td>
125
129
<td class="md" nowrap></td>
132
<table cellspacing=5 cellpadding=0 border=0>
135
<table cellspacing="5" cellpadding="0" border="0">
140
143
Write all fonts to the PDF file, and fill in their object numbers. Embeds no fonts if <code>pool</code> is 0, but must be called nevertheless. </td>
143
<a class="anchor" name="a3" doxytag="IpePdfWriter::CreatePages" ></a><p>
144
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
146
<a class="anchor" name="a3"></a><!-- doxytag: member="IpePdfWriter::CreatePages" ref="a3" args="()" --><p>
147
<table class="mdTable" cellpadding="2" cellspacing="0">
146
149
<td class="mdRow">
147
150
<table cellpadding="0" cellspacing="0" border="0">
149
<td class="md" nowrap valign="top"> void IpePdfWriter::CreatePages </td>
152
<td class="md" nowrap valign="top">void IpePdfWriter::CreatePages </td>
150
153
<td class="md" valign="top">( </td>
151
<td class="md" nowrap valign="top">bool </td>
152
<td class="mdname1" valign="top" nowrap> <em>lastView</em> </td>
154
<td class="mdname1" valign="top" nowrap> </td>
153
155
<td class="md" valign="top"> ) </td>
154
156
<td class="md" nowrap></td>
161
<table cellspacing=5 cellpadding=0 border=0>
162
<table cellspacing="5" cellpadding="0" border="0">
174
<a class="anchor" name="a4" doxytag="IpePdfWriter::CreateBookmarks" ></a><p>
175
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
175
<a class="anchor" name="a4"></a><!-- doxytag: member="IpePdfWriter::CreateBookmarks" ref="a4" args="()" --><p>
176
<table class="mdTable" cellpadding="2" cellspacing="0">
177
178
<td class="mdRow">
178
179
<table cellpadding="0" cellspacing="0" border="0">
180
<td class="md" nowrap valign="top"> void IpePdfWriter::CreateBookmarks </td>
181
<td class="md" nowrap valign="top">void IpePdfWriter::CreateBookmarks </td>
181
182
<td class="md" valign="top">( </td>
182
183
<td class="mdname1" valign="top" nowrap> </td>
183
184
<td class="md" valign="top"> ) </td>
184
185
<td class="md" nowrap></td>
191
<table cellspacing=5 cellpadding=0 border=0>
191
<table cellspacing="5" cellpadding="0" border="0">
204
<a class="anchor" name="a5" doxytag="IpePdfWriter::CreateXmlStream" ></a><p>
205
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
204
<a class="anchor" name="a5"></a><!-- doxytag: member="IpePdfWriter::CreateXmlStream" ref="a5" args="(IpeString xmldata, bool preCompressed)" --><p>
205
<table class="mdTable" cellpadding="2" cellspacing="0">
207
207
<td class="mdRow">
208
208
<table cellpadding="0" cellspacing="0" border="0">
210
<td class="md" nowrap valign="top"> void IpePdfWriter::CreateXmlStream </td>
210
<td class="md" nowrap valign="top">void IpePdfWriter::CreateXmlStream </td>
211
211
<td class="md" valign="top">( </td>
212
212
<td class="md" nowrap valign="top"><a class="el" href="class_ipe_string.html">IpeString</a> </td>
213
213
<td class="mdname" nowrap> <em>xmldata</em>, </td>
216
216
<td class="md" nowrap align="right"></td>
218
218
<td class="md" nowrap>bool </td>
219
219
<td class="mdname" nowrap> <em>preCompressed</em></td>
223
223
<td class="md">) </td>
224
224
<td class="md" colspan="2"></td>
231
<table cellspacing=5 cellpadding=0 border=0>
230
<table cellspacing="5" cellpadding="0" border="0">
244
<a class="anchor" name="a6" doxytag="IpePdfWriter::CreateTrailer" ></a><p>
245
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
243
<a class="anchor" name="a6"></a><!-- doxytag: member="IpePdfWriter::CreateTrailer" ref="a6" args="(IpeString creator)" --><p>
244
<table class="mdTable" cellpadding="2" cellspacing="0">
247
246
<td class="mdRow">
248
247
<table cellpadding="0" cellspacing="0" border="0">
250
<td class="md" nowrap valign="top"> void IpePdfWriter::CreateTrailer </td>
249
<td class="md" nowrap valign="top">void IpePdfWriter::CreateTrailer </td>
251
250
<td class="md" valign="top">( </td>
252
251
<td class="md" nowrap valign="top"><a class="el" href="class_ipe_string.html">IpeString</a> </td>
253
252
<td class="mdname1" valign="top" nowrap> <em>creator</em> </td>
254
253
<td class="md" valign="top"> ) </td>
255
254
<td class="md" nowrap></td>
262
<table cellspacing=5 cellpadding=0 border=0>
260
<table cellspacing="5" cellpadding="0" border="0">