git.asbjorn.biz
/
swftools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
SWFFont now also stores char widths. (a.k.a. advance values)
[swftools.git]
/
pdf2swf
/
SWFOutputDev.cc
diff --git
a/pdf2swf/SWFOutputDev.cc
b/pdf2swf/SWFOutputDev.cc
index
bffb3b5
..
c6ad24e
100644
(file)
--- a/
pdf2swf/SWFOutputDev.cc
+++ b/
pdf2swf/SWFOutputDev.cc
@@
-59,10
+59,6
@@
int pagepos = 0;
static void printInfoString(Dict *infoDict, char *key, char *fmt);
static void printInfoDate(Dict *infoDict, char *key, char *fmt);
static void printInfoString(Dict *infoDict, char *key, char *fmt);
static void printInfoDate(Dict *infoDict, char *key, char *fmt);
-static char userPassword[33] = "";
-static GBool printVersion = gFalse;
-static GBool printHelp = gFalse;
-
double fontsizes[] =
{
0.833,0.833,0.889,0.889,0.788,0.722,0.833,0.778,0.600,0.600,0.600,0.600,0.576,0.576,0.576,0.576
double fontsizes[] =
{
0.833,0.833,0.889,0.889,0.788,0.722,0.833,0.778,0.600,0.600,0.600,0.600,0.576,0.576,0.576,0.576
@@
-235,6
+231,8
@@
public:
int t1id;
int jpeginfo; // did we write "Page contains jpegs" yet?
int pbminfo; // did we write "Page contains jpegs" yet?
int t1id;
int jpeginfo; // did we write "Page contains jpegs" yet?
int pbminfo; // did we write "Page contains jpegs" yet?
+
+ GfxState *laststate;
};
char mybuf[1024];
};
char mybuf[1024];
@@
-619,6
+617,7
@@
void SWFOutputDev::endString(GfxState *state)
void SWFOutputDev::startPage(int pageNum, GfxState *state)
{
double x1,y1,x2,y2;
void SWFOutputDev::startPage(int pageNum, GfxState *state)
{
double x1,y1,x2,y2;
+ laststate = state;
logf("<debug> startPage %d\n", pageNum);
logf("<notice> processing page %d", pageNum);
logf("<debug> startPage %d\n", pageNum);
logf("<notice> processing page %d", pageNum);
@@
-645,16
+644,16
@@
void SWFOutputDev::drawLink(Link *link, Catalog *catalog)
rgb.r = 0;
rgb.g = 0;
rgb.b = 1;
rgb.r = 0;
rgb.g = 0;
rgb.b = 1;
- cvtu2d(this, x1, y1, &x, &y);
+ cvtUserToDev(x1, y1, &x, &y);
points[0].x = points[4].x = (int)x;
points[0].y = points[4].y = (int)y;
points[0].x = points[4].x = (int)x;
points[0].y = points[4].y = (int)y;
- cvtu2d(this, x2, y1, &x, &y);
+ cvtUserToDev(x2, y1, &x, &y);
points[1].x = (int)x;
points[1].y = (int)y;
points[1].x = (int)x;
points[1].y = (int)y;
- cvtu2d(this, x2, y2, &x, &y);
+ cvtUserToDev(x2, y2, &x, &y);
points[2].x = (int)x;
points[2].y = (int)y;
points[2].x = (int)x;
points[2].y = (int)y;
- cvtu2d(this, x1, y2, &x, &y);
+ cvtUserToDev(x1, y2, &x, &y);
points[3].x = (int)x;
points[3].y = (int)y;
points[3].x = (int)x;
points[3].y = (int)y;
@@
-759,7
+758,7
@@
void SWFOutputDev::drawLink(Link *link, Catalog *catalog)
{
swfoutput_linktourl(&output, url, points);
}
{
swfoutput_linktourl(&output, url, points);
}
- logf("<notice> \"%s\" link to \"%s\" (%d)\n", type, s, page);
+ logf("<verbose> \"%s\" link to \"%s\" (%d)\n", type, s, page);
}
}
}
}
@@
-809,6
+808,7
@@
int SWFOutputDev::setT1Font(char*name, FontEncoding*encoding)
return 0;
this->t1id = id;
return 0;
this->t1id = id;
+ return 1;
}
void SWFOutputDev::updateLineWidth(GfxState *state)
}
void SWFOutputDev::updateLineWidth(GfxState *state)
@@
-1317,6
+1317,11
@@
void pdfswf_linksopennewwindow()
opennewwindow = 1;
}
opennewwindow = 1;
}
+void pdfswf_storeallcharacters()
+{
+ storeallcharacters = 1;
+}
+
void pdfswf_jpegquality(int val)
{
if(val<0) val=0;
void pdfswf_jpegquality(int val)
{
if(val<0) val=0;