2
// --------------------------------------------------------------------
4
// --------------------------------------------------------------------
7
This file is part of the extensible drawing editor Ipe.
8
Copyright (C) 1993-2004 Otfried Cheong
10
Ipe is free software; you can redistribute it and/or modify it
11
under the terms of the GNU General Public License as published by
12
the Free Software Foundation; either version 2 of the License, or
13
(at your option) any later version.
15
As a special exception, you have permission to link Ipe with the
16
CGAL library and distribute executables, as long as you follow the
17
requirements of the Gnu General Public License in regard to all of
18
the software in the executable aside from CGAL.
20
Ipe is distributed in the hope that it will be useful, but WITHOUT
21
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
22
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
23
License for more details.
25
You should have received a copy of the GNU General Public License
26
along with Ipe; if not, you can find it at
27
"http://www.gnu.org/copyleft/gpl.html", or write to the Free
28
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
32
#ifndef IPEPDFWRITER_H
33
#define IPEPDFWRITER_H
42
// --------------------------------------------------------------------
46
IpePdfWriter(IpeTellStream &stream, const IpeDocument *doc,
47
bool noShading, int compression);
50
void EmbedFonts(const IpeFontPool *pool);
51
void CreatePages(bool lastView);
52
void CreateBookmarks();
53
void CreateXmlStream(IpeString xmldata, bool preCompressed);
54
void CreateTrailer(IpeString creator);
57
void CreatePageView(int page, int view);
58
int StartObject(int objnum = -1);
59
void CreateStream(const char *data, int size, bool preCompressed);
60
void WriteString(IpeString text);
61
void EmbedBitmap(IpeBitmap bitmap);
62
IpeRect PaintView(IpeStream &stream, const IpePage *page, int view);
65
IpeTellStream &iStream;
66
const IpeDocument *iDoc;
67
//! Obj id of XML stream.
69
//! Obj id of font resource dictionary.
71
//! Obj id of shading dictionary.
73
//! Obj id of outline dictionary.
75
//! Compression level (0..9).
78
std::vector<IpeBitmap> iBitmaps;
79
//! Next unused PDF object number.
81
//! List of pages, expressed as Pdf object numbers.
82
std::vector<int> iPageObjectNumbers;
83
//! List of file locations, in object number order (starting with 0).
84
std::map<int, long> iXref;
87
// --------------------------------------------------------------------