git.asbjorn.biz
/
swftools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added --flashtype option to font2swf
[swftools.git]
/
src
/
gfx2gfx.c
diff --git
a/src/gfx2gfx.c
b/src/gfx2gfx.c
index
9ce3a13
..
67951a1
100644
(file)
--- a/
src/gfx2gfx.c
+++ b/
src/gfx2gfx.c
@@
-30,9
+30,11
@@
#include "../../swftools/lib/gfxsource.h"
#include "../../swftools/lib/gfxdevice.h"
#include "../../swftools/lib/gfxpoly.h"
#include "../../swftools/lib/gfxsource.h"
#include "../../swftools/lib/gfxdevice.h"
#include "../../swftools/lib/gfxpoly.h"
+#include "../../swftools/lib/devices/pdf.h"
#include "../../swftools/lib/devices/swf.h"
#include "../../swftools/lib/devices/text.h"
#include "../../swftools/lib/devices/render.h"
#include "../../swftools/lib/devices/swf.h"
#include "../../swftools/lib/devices/text.h"
#include "../../swftools/lib/devices/render.h"
+#include "../../swftools/lib/devices/file.h"
#include "../../swftools/lib/devices/bbox.h"
#ifdef HAVE_LRF
#include "../../swftools/lib/devices/lrf.h"
#include "../../swftools/lib/devices/bbox.h"
#ifdef HAVE_LRF
#include "../../swftools/lib/devices/lrf.h"
@@
-250,13
+252,21
@@
int main(int argn, char *argv[])
gfxdevice_t _out,*out=&_out;
if(!strcasecmp(format, "ocr")) {
gfxdevice_ocr_init(out);
gfxdevice_t _out,*out=&_out;
if(!strcasecmp(format, "ocr")) {
gfxdevice_ocr_init(out);
- } if(!strcasecmp(format, "swf")) {
+ } else if(!strcasecmp(format, "swf")) {
gfxdevice_swf_init(out);
gfxdevice_swf_init(out);
- } if(!strcasecmp(format, "img") || !strcasecmp(format, "png")) {
+ } else if(!strcasecmp(format, "img") || !strcasecmp(format, "png")) {
gfxdevice_render_init(out);
gfxdevice_render_init(out);
- } if(!strcasecmp(format, "txt")) {
+ out->setparameter(out, "antialize", "4");
+ } else if(!strcasecmp(format, "txt")) {
gfxdevice_text_init(out);
gfxdevice_text_init(out);
- }
+ } else if(!strcasecmp(format, "log")) {
+ gfxdevice_file_init(out, "/tmp/device.log");
+ } else if(!strcasecmp(format, "pdf")) {
+ gfxdevice_pdf_init(out);
+ } else {
+ msg("<error> Invalid output format: %s", format);
+ exit(1);
+ }
int pagenr;
for(pagenr = 1; pagenr <= doc->num_pages; pagenr++)
int pagenr;
for(pagenr = 1; pagenr <= doc->num_pages; pagenr++)