storeallcharacters = 1;
}
+void pdfswf_enablezlib()
+{
+ enablezlib = 1;
+}
+
void pdfswf_jpegquality(int val)
{
if(val<0) val=0;
void pdfswf_init(char*filename, char*userPassword) ;
void pdfswf_setoutputfilename(char*filename);
void pdfswf_drawonlyshapes();
+void pdfswf_enablezlib();
void pdfswf_ignoredraworder();
void pdfswf_linksopennewwindow();
void pdfswf_jpegquality(int);
\fB\-v\fR, \fB\-\-verbose\fR
Be verbose. Use more than one -v for greater effect.
.TP
+\fB\-z\fR, \fB\-\-zlib\fR
+Use Flash 6 (MX) zlib compression.
+\fBThe resulting SWF will not be playable in browsers with Flash Plugins 5 and below!\fR
+.TP
\fB\-i\fR, \fB\-\-ignore\fR
Allows pdf2swf to change the draw order of the pdf. This may make the generated
SWF files a little bit smaller, but it may also cause the images in the pdf to look funny.
pdfswf_ignoredraworder();
return 0;
}
+ else if (!strcmp(name, "z"))
+ {
+ pdfswf_enablezlib();
+ return 0;
+ }
else if (!strcmp(name, "n"))
{
pdfswf_linksopennewwindow();
{{"o","output"},
{"V","version"},
{"i","ignore"},
+ {"z","zlib"},
{"s","shapes"},
{"j","jpegquality"},
{"p","pages"},
printf("-s --shapes Don't use SWF Fonts, but store everything as shape\n");
printf("-i --ignore Ignore draw order (makes the SWF file smaller, but may produce\n");
printf(" graphic errors)\n");
+ printf("-z --zlib Use Flash 6 (MX) zlib compression (Needs at least Flash 6 Plugin to play)\n");
printf("-j --jpegquality=quality Set quality of embedded jpeg pictures (default:85)\n");
printf("-v --verbose Be verbose. Use more than one -v for greater effect\n");
printf("-w --samewindow Don't open a new Browser Window for Links in the SWF\n");
int drawonlyshapes=0;
int jpegquality=85;
int storeallcharacters=0;
+int enablezlib=0;
static int flag_protected = 0;
typedef unsigned char u8;
tag = swf_InsertTag(tag,ST_END);
- if FAILED(swf_WriteSWF(fi,&swf))
- logf("<error> WriteSWF() failed.\n");
+ if(enablezlib) {
+ if FAILED(swf_WriteSWC(fi,&swf))
+ logf("<error> WriteSWC() failed.\n");
+ } else {
+ if FAILED(swf_WriteSWF(fi,&swf))
+ logf("<error> WriteSWF() failed.\n");
+ }
+
if(filename)
close(fi);
logf("<notice> SWF written\n");
#include "../lib/rfxswf.h"
}
+extern int enablezlib; //default:0
extern int opennewwindow; //default:0
extern int ignoredraworder; //default:0
extern int drawonlyshapes; //default:0