3
Copyright (c) 2006-2007, BBR Inc. All rights reserved.
5
Permission is hereby granted, free of charge, to any person obtaining
6
a copy of this software and associated documentation files (the
7
"Software"), to deal in the Software without restriction, including
8
without limitation the rights to use, copy, modify, merge, publish,
9
distribute, sublicense, and/or sell copies of the Software, and to
10
permit persons to whom the Software is furnished to do so, subject to
11
the following conditions:
13
The above copyright notice and this permission notice shall be included
14
in all copies or substantial portions of the Software.
16
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
20
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
33
#include "P2POutputStream.h"
36
#define PDFTOPDF_BORDERNONE 0 /* No border */
37
#define PDFTOPDF_BORDERHAIRLINE 1 /* hairline border */
38
#define PDFTOPDF_BORDERTHICK 2 /* thick border */
39
#define PDFTOPDF_BORDERDOUBLE 4 /* double line border */
41
#define PDFTOPDF_LAYOUT_LRBT 0 /* Left to right, bottom to top */
42
#define PDFTOPDF_LAYOUT_LRTB 1 /* Left to right, top to bottom */
43
#define PDFTOPDF_LAYOUT_RLBT 2 /* Right to left, bottom to top */
44
#define PDFTOPDF_LAYOUT_RLTB 3 /* Right to left, top to bottom */
45
#define PDFTOPDF_LAYOUT_BTLR 4 /* Bottom to top, left to right */
46
#define PDFTOPDF_LAYOUT_TBLR 5 /* Top to bottom, left to right */
47
#define PDFTOPDF_LAYOUT_BTRL 6 /* Bottom to top, right to left */
48
#define PDFTOPDF_LAYOUT_TBRL 7 /* Top to bottom, right to left */
50
#define PDFTOPDF_LAYOUT_NEGATEY 1 /* The bits for the layout */
51
#define PDFTOPDF_LAYOUT_NEGATEX 2 /* definitions above... */
52
#define PDFTOPDF_LAYOUT_VERTICAL 4
71
contentsCompress = gFalse;
72
fontEmbedding = gFalse;
73
fontEmbeddingWhole = gFalse;
74
fontCompress = gFalse;
77
fontEmbeddingPreLoad = gFalse;
88
const char *pageLabel;
89
const char *pageRanges;
93
GBool contentsCompress;
95
GBool fontEmbeddingWhole;
97
GBool fontEmbeddingPreLoad;
103
static Options options;
105
P2PDoc(PDFDoc *orgDocA);
108
void output(P2POutputStream *str, int deviceCopies = 0,
109
bool deviceCollate = false);
110
int nup(int n, PDFRectangle *box, unsigned int borderFlag,
111
unsigned int layout, int xpos, int ypos);
113
void fit(PDFRectangle *box, double zoom);
115
void rotate(int orientation);
116
void position(PDFRectangle *box, int xpos, int ypos);
117
void scale(double zoom);
118
void autoRotate(PDFRectangle *box);
119
void setMediaBox(PDFRectangle *mediaBoxA);
120
int getNumberOfPages();