Hello,
I have added the possibility to link against poppler instead of xpdf.
Of course it doesn't work because there are many functions that are
private in the original xpdf and are public after applying
xpdf-changes.patch, and other API changes.
However, apart from that, I have done what I imagined should be done to
use poppler instead of xpdf.
So as soon as your changes in the API have made in xpdf and poppler, I
believe that it would become possible to use poppler, but of course this
would also need testing since it doesn't work currently.
I have also made a header file to translate the symbols that are
different in xpdf and poppler. I guess that they are different in
poppler to avoid clashing with other shared libraries.
The patch is merged with a rebased patch for external libart.
--
Pat
? aclocal.m4
? autom4te.cache
? config.h.in-autoheader
? config.h.in-autoheader2
? xpdf_to_poppler.h
? lib/xpdf-changes.patch
? lib/pdf/Makefile
? lib/pdf/xpdf-3.02
? lib/pdf/xpdf-3.02.tar.gz
? lib/readers/Makefile
? pdf2swf/fonts/Makefile
Index: config.h.in
===================================================================
RCS file: /cvsroot/swftools/swftools/config.h.in,v
retrieving revision 1.38
diff -u -3 -p -r1.38 config.h.in
--- config.h.in 11 Jul 2008 08:54:18 -0000 1.38
+++ config.h.in 13 Jul 2008 15:49:23 -0000
@@ -146,6 +146,15 @@
/* Define if OpenGL seems to work */
#undef HAVE_OPENGL
+/* Define if you use poppler */
+#undef HAVE_POPPLER
+
+/* Define to 1 if you have the `poppler' library (-lpoppler). */
+#undef HAVE_LIBPOPPLER
+
+/* Define to 1 if you have the <OutputDev.h> header file. */
+#undef HAVE_OUTPUTDEV_H
+
/* Define if you have the jpeg library (-ljpeg). */
/* Define if you have the jpeg library (-ljpeg). */
#undef HAVE_LIBJPEG
@@ -159,6 +168,15 @@
/* Define if you have the z library (-lz). */
#undef HAVE_LIBZ
+/* use internal libart library */
+#undef HAVE_LIBART
+
+/* Define to 1 if you have the `art_lgpl_2' library (-lart_lgpl_2). */
+#undef HAVE_LIBART_LGPL_2
+
+/* Define to 1 if you have the <libart_lgpl/libart.h> header file. */
+#undef HAVE_LIBART_LGPL_LIBART_H
+
/* Name of package */
#undef PACKAGE
@@ -229,5 +247,6 @@
#endif
#endif
+#include "xpdf_to_poppler.h"
#endif
Index: configure.in
===================================================================
RCS file: /cvsroot/swftools/swftools/configure.in,v
retrieving revision 1.129
diff -u -3 -p -r1.129 configure.in
--- configure.in 11 Jul 2008 08:54:29 -0000 1.129
+++ configure.in 13 Jul 2008 15:49:23 -0000
@@ -19,6 +19,10 @@ AC_ARG_ENABLE(optimizations,
[ --enable-optimizations turn on compiler optimizations (recommended for
avi2swf)], OPTIMIZE=true)
AC_ARG_ENABLE(lame,
[ --disable-lame don't compile any L.A.M.E. mp3 encoding code in],
DISABLE_LAME=true)
+AC_ARG_WITH([external-libart],
+[ --with-external-libart use external libart library (at your own risk)],
[EXTERNAL_LIBART=true])
+AC_ARG_WITH([poppler],
+[ --with-poppler use poppler instead of xpdf (at your own risk)],
[USE_POPPLER=true])
PACKAGE=swftools
VERSION=2008-06-23-2005
@@ -133,6 +137,8 @@ fi
AC_PROG_LN_S
AC_CHECK_PROGS(UNCOMPRESS, gzip uncompress compress, )
+PKG_PROG_PKG_CONFIG
+
dnl Checks for system services
OBJEXT="o"
AREXT=".a"
@@ -294,6 +300,47 @@ else
fi
AC_SUBST(lame_in_source)
+art_in_source='$(art_objects)'
+AC_DEFINE([HAVE_LIBART], [1], [use internal libart library])
+
+if test "x$EXTERNAL_LIBART" = "xtrue"; then
+ art_in_source=
+ PKG_CHECK_MODULES([LIBART],[libart-2.0],,[libart_pkgconfig_libart=no])
+ if test "x$libart_pkgconfig_libart" = "xno"; then
+ AC_CHECK_HEADERS([libart_lgpl/libart.h],[
+ AC_CHECK_LIB([art_lgpl_2],[art_new],,[])
+ ],[AC_MSG_ERROR([No libart library found. This library is required.])])
+ else
+ CPPFLAGS="$CPPFLAGS $LIBART_CFLAGS"
+ AC_DEFINE([HAVE_LIBART], [0])
+ LIBS="$LIBS $LIBART_LIBS"
+ fi
+fi
+AC_SUBST([art_in_source])
+
+xpdf_in_source='$(xpdf_objects)'
+splash_in_source='$(splash_objects)'
+
+if test "x$USE_POPPLER" = "xtrue"; then
+ xpdf_in_source=
+ splash_in_source=
+ AC_DEFINE([HAVE_POPPLER],[1],[use poppler])
+ PKG_CHECK_MODULES([POPPLER],[poppler
poppler-splash],,[poppler_pkgconfig=no])
+ if test "x$poppler_pkgconfig" = "xno"; then
+ AC_LANG_PUSH([C++])
+ AC_CHECK_HEADERS([OutputDev.h],[
+ AC_CHECK_LIB([poppler],[main],,[])
+ ],[AC_MSG_ERROR([No poppler library found. This library is
required.])])
+ AC_LANG_POP
+ else
+ CPPFLAGS="$CPPFLAGS $POPPLER_CFLAGS"
+ AC_DEFINE([HAVE_POPPLER], [1])
+ LIBS="$LIBS $POPPLER_LIBS"
+ fi
+fi
+AC_SUBST([xpdf_in_source])
+AC_SUBST([splash_in_source])
+
# ------------------------------------------------------------------
RFX_CHECK_AVI2SWF
@@ -486,6 +533,8 @@ AH_BOTTOM([
#endif
#endif
+#include "xpdf_to_poppler.h"
+
#endif // __config_h__
])
Index: lib/Makefile.in
===================================================================
RCS file: /cvsroot/swftools/swftools/lib/Makefile.in,v
retrieving revision 1.83
diff -u -3 -p -r1.83 Makefile.in
--- lib/Makefile.in 11 Jul 2008 08:52:41 -0000 1.83
+++ lib/Makefile.in 13 Jul 2008 15:49:23 -0000
@@ -12,11 +12,19 @@ lame_objects = lame/psymodel.$(O) lame/f
lame_in_source = @lame_in_source@
h263_objects = h.263/dct.$(O) h.263/h263tables.$(O) h.263/swfvideo.$(O)
+
+#actioncompiler_in_source = @actioncompiler_in_source@
+actioncompiler_in_source = $(actioncompiler_objects)
+
actioncompiler_objects = action/assembler.$(O) action/compile.$(O)
action/lex.swf4.$(O) action/lex.swf5.$(O) action/libming.$(O)
action/swf4compiler.tab.$(O) action/swf5compiler.tab.$(O)
action/actioncompiler.$(O)
+
rfxswf_modules = modules/swfbits.c modules/swfaction.c modules/swfdump.c
modules/swfcgi.c modules/swfbutton.c modules/swftext.c modules/swffont.c
modules/swftools.c modules/swfsound.c modules/swfshape.c modules/swfobject.c
modules/swfdraw.c modules/swffilter.c modules/swfrender.c h.263/swfvideo.c
base_objects=q.$(O) utf8.$(O) png.$(O) jpeg.$(O) wav.$(O) mp3.$(O) os.$(O)
bitio.$(O) log.$(O) mem.$(O)
gfx_objects=gfxtools.$(O) gfxfont.$(O) gfxpoly.$(O) devices/dummy.$(O)
devices/file.$(O) devices/render.$(O) devices/text.$(O) devices/record.$(O)
devices/ops.$(O) devices/polyops.$(O) devices/bbox.$(O) devices/rescale.$(O)
@DEVICE_OPENGL@
+
+art_in_source = @art_in_source@
+
art_objects=art/art_affine.$(O) art/art_alphagamma.$(O) art/art_bpath.$(O)
art/art_gray_svp.$(O) art/art_misc.$(O) art/art_pixbuf.$(O) art/art_rect.$(O)
art/art_rect_svp.$(O) art/art_rect_uta.$(O) art/art_render.$(O)
art/art_render_gradient.$(O) art/art_render_mask.$(O) art/art_render_svp.$(O)
art/art_rgb.$(O) art/art_rgb_a_affine.$(O) art/art_rgb_affine.$(O)
art/art_rgb_affine_private.$(O) art/art_rgb_bitmap_affine.$(O)
art/art_rgb_pixbuf_affine.$(O) art/art_rgb_rgba_affine.$(O)
art/art_rgb_svp.$(O) art/art_rgba.$(O) art/art_svp.$(O)
art/art_svp_intersect.$(O) art/art_svp_ops.$(O) art/art_svp_point.$(O)
art/art_svp_render_aa.$(O) art/art_svp_vpath.$(O) art/art_svp_vpath_stroke.$(O)
art/art_svp_wind.$(O) art/art_uta.$(O) art/art_uta_ops.$(O)
art/art_uta_rect.$(O) art/art_uta_svp.$(O) art/art_uta_vpath.$(O)
art/art_vpath.$(O) art/art_vpath_bpath.$(O) art/art_vpath_dash.$(O)
art/art_vpath_svp.$(O)
rfxswf_objects=modules/swfabc.$(O) modules/swfaction.$(O) modules/swfbits.$(O)
modules/swfbutton.$(O) modules/swfcgi.$(O) modules/swfdraw.$(O)
modules/swfdump.$(O) modules/swffilter.$(O) modules/swffont.$(O)
modules/swfobject.$(O) modules/swfrender.$(O) modules/swfshape.$(O)
modules/swfsound.$(O) modules/swftext.$(O) modules/swftools.$(O)
ocr_objects=gocr/box.$(O) gocr/database.$(O) gocr/detect.$(O) gocr/job.$(O)
gocr/lines.$(O) gocr/list.$(O) gocr/ocr0.$(O) gocr/ocr0n.$(O) gocr/ocr1.$(O)
gocr/otsu.$(O) gocr/output.$(O) gocr/pgm2asc.$(O) gocr/pixel.$(O)
gocr/progress.$(O) gocr/remove.$(O) gocr/unicode.$(O)
@@ -145,11 +153,11 @@ libbase$(A): $(base_objects) Makefile
libgfxswf$(A): devices/swf.$(O) readers/swf2.$(O) readers/image.$(O)
$(AR) r libgfxswf$(A) devices/swf.$(O) readers/swf2.$(O)
readers/image.$(O)
-libgfx$(A): $(gfx_objects) $(art_objects) Makefile
- $(AR) r libgfx$(A) $(gfx_objects) $(art_objects)
+libgfx$(A): $(gfx_objects) $(art_in_source) Makefile
+ $(AR) r libgfx$(A) $(gfx_objects) $(art_in_source)
-librfxswf$(A): Makefile $(rfxswf_objects) rfxswf.$(O) drawer.$(O) MD5.$(O)
$(lame_in_source) $(h263_objects) $(actioncompiler_objects) Makefile
- $(AR) r librfxswf$(A) $(rfxswf_objects) rfxswf.$(O) drawer.$(O)
MD5.$(O) $(lame_in_source) $(h263_objects) $(actioncompiler_objects)
+librfxswf$(A): Makefile $(rfxswf_objects) rfxswf.$(O) drawer.$(O) MD5.$(O)
$(lame_in_source) $(h263_objects) $(actioncompiler_in_source) Makefile
+ $(AR) r librfxswf$(A) $(rfxswf_objects) rfxswf.$(O) drawer.$(O)
MD5.$(O) $(lame_in_source) $(h263_objects) $(actioncompiler_in_source)
$(RANLIB) librfxswf$(A)
libpdf$(A): pdf/GFXOutputDev.cc pdf/GFXOutputDev.h pdf/pdf.cc pdf/pdf.h
Index: lib/gfxpoly.c
===================================================================
RCS file: /cvsroot/swftools/swftools/lib/gfxpoly.c,v
retrieving revision 1.9
diff -u -3 -p -r1.9 gfxpoly.c
--- lib/gfxpoly.c 24 May 2008 15:18:39 -0000 1.9
+++ lib/gfxpoly.c 13 Jul 2008 15:49:24 -0000
@@ -25,9 +25,15 @@
#include "gfxtools.h"
#include "gfxpoly.h"
#include "mem.h"
+#ifdef HAVE_LIBART
#include "art/libart.h"
#include "art/art_svp_intersect.h"
#include "art/art_svp_ops.h"
+#else
+#include <libart_lgpl/libart.h>
+#include <libart_lgpl/art_svp_intersect.h>
+#include <libart_lgpl/art_svp_ops.h>
+#endif
#include "log.h"
#include <assert.h>
#include <memory.h>
Index: lib/devices/swf.c
===================================================================
RCS file: /cvsroot/swftools/swftools/lib/devices/swf.c,v
retrieving revision 1.60
diff -u -3 -p -r1.60 swf.c
--- lib/devices/swf.c 19 Jun 2008 20:30:07 -0000 1.60
+++ lib/devices/swf.c 13 Jul 2008 15:49:24 -0000
@@ -40,7 +40,11 @@
#include "../rfxswf.h"
#include "../gfxdevice.h"
#include "../gfxtools.h"
+#ifdef HAVE_LIBART
#include "../art/libart.h"
+#else
+#include <libart_lgpl/libart.h>
+#endif
#include "swf.h"
#include "../gfxpoly.h"
#include "../png.h"
Index: lib/pdf/GFXOutputDev.cc
===================================================================
RCS file: /cvsroot/swftools/swftools/lib/pdf/GFXOutputDev.cc,v
retrieving revision 1.66
diff -u -3 -p -r1.66 GFXOutputDev.cc
--- lib/pdf/GFXOutputDev.cc 19 Jun 2008 20:30:33 -0000 1.66
+++ lib/pdf/GFXOutputDev.cc 13 Jul 2008 15:49:24 -0000
@@ -38,9 +38,13 @@
#endif
//xpdf header files
#include "config.h"
+#ifdef HAVE_POPPLER
+#include <goo/GooString.h>
+#include <goo/gfile.h>
+#else
#include "gfile.h"
#include "GString.h"
-#include "gmem.h"
+#endif
#include "Object.h"
#include "Stream.h"
#include "Array.h"
@@ -54,12 +58,8 @@
#include "OutputDev.h"
#include "GfxFont.h"
#include "GfxState.h"
-#include "CharCodeToUnicode.h"
#include "NameToUnicodeTable.h"
#include "GlobalParams.h"
-#include "FoFiType1C.h"
-#include "FoFiTrueType.h"
-#include "GHash.h"
#include "GFXOutputDev.h"
// swftools header files
@@ -123,6 +123,39 @@ struct fontentry {
{"Symbol", "s050000l", s050000l_afm, s050000l_afm_len,
s050000l_pfb, s050000l_pfb_len},
{"ZapfDingbats", "d050000l", d050000l_afm, d050000l_afm_len,
d050000l_pfb, d050000l_pfb_len}};
+#ifdef HAVE_POPLER
+char* mktmpname(char*ptr) {
+ static char tmpbuf[128];
+ char*dir = getTempDir();
+ int l = strlen(dir);
+ char*sep = "";
+ if(!ptr)
+ ptr = tmpbuf;
+ if(l && dir[l-1]!='/' && dir[l-1]!='\\') {
+#ifdef WIN32
+ sep = "\\";
+#else
+ sep = "/";
+#endif
+ }
+
+ // used to be mktemp. This does remove the warnings, but
+ // It's not exactly an improvement.
+#ifdef HAVE_LRAND48
+ sprintf(ptr, "%s%s%08x%08x",dir,sep,lrand48(),lrand48());
+#else
+# ifdef HAVE_RAND
+ sprintf(ptr, "%s%s%08x%08x",dir,sep,rand(),rand());
+# else
+ static int count = 1;
+ sprintf(ptr, "%s%s%08x%04x%04x",dir,sep,time(0),(unsigned
int)tmpbuf^((un
+signed int)tmpbuf)>>16,count);
+ count ++;
+# endif
+#endif
+ return ptr;
+}
+#endif
static int verbose = 0;
static int dbgindent = 0;
Index: lib/pdf/GFXOutputDev.h
===================================================================
RCS file: /cvsroot/swftools/swftools/lib/pdf/GFXOutputDev.h,v
retrieving revision 1.23
diff -u -3 -p -r1.23 GFXOutputDev.h
--- lib/pdf/GFXOutputDev.h 8 Jul 2008 09:26:48 -0000 1.23
+++ lib/pdf/GFXOutputDev.h 13 Jul 2008 15:49:24 -0000
@@ -207,7 +207,7 @@ public:
int width, int height,
GfxImageColorMap*colorMap, GBool invert,
GBool inlineImg, int mask, int *maskColors,
Stream *maskStr, int maskWidth, int
maskHeight, GBool maskInvert, GfxImageColorMap*maskColorMap);
- int setGfxFont(char*id, char*name, char*filename, double maxSize,
CharCodeToUnicode*ctu);
+// int setGfxFont(char*id, char*name, char*filename, double maxSize,
CharCodeToUnicode*ctu);
void strokeGfxline(GfxState *state, gfxline_t*line, int flags);
void clipToGfxLine(GfxState *state, gfxline_t*line);
void fillGfxLine(GfxState *state, gfxline_t*line);
Index: lib/pdf/InfoOutputDev.cc
===================================================================
RCS file: /cvsroot/swftools/swftools/lib/pdf/InfoOutputDev.cc,v
retrieving revision 1.12
diff -u -3 -p -r1.12 InfoOutputDev.cc
--- lib/pdf/InfoOutputDev.cc 8 Jul 2008 09:26:37 -0000 1.12
+++ lib/pdf/InfoOutputDev.cc 13 Jul 2008 15:49:24 -0000
@@ -1,9 +1,18 @@
+#include "config.h"
#include "Object.h"
-#include "SplashTypes.h"
+#include "InfoOutputDev.h"
#include "SplashOutputDev.h"
+#ifdef HAVE_POPPLER
+#include <splash/SplashTypes.h>
+#include <splash/SplashPath.h>
+#include <splash/SplashFont.h>
+#include <splash/SplashFontFile.h>
+#else
+#include "SplashTypes.h"
#include "SplashPath.h"
+#include "SplashFont.h"
#include "SplashFontFile.h"
-#include "InfoOutputDev.h"
+#endif
#include "GfxState.h"
#include "../log.h"
#include <math.h>
Index: lib/pdf/InfoOutputDev.h
===================================================================
RCS file: /cvsroot/swftools/swftools/lib/pdf/InfoOutputDev.h,v
retrieving revision 1.8
diff -u -3 -p -r1.8 InfoOutputDev.h
--- lib/pdf/InfoOutputDev.h 8 Jul 2008 09:26:25 -0000 1.8
+++ lib/pdf/InfoOutputDev.h 13 Jul 2008 15:49:24 -0000
@@ -23,11 +23,24 @@
#include "GfxFont.h"
#include "OutputDev.h"
-#include "SplashFont.h"
#include "SplashOutputDev.h"
+#ifdef HAVE_POPPLER
+#include <splash/SplashTypes.h>
+#include <splash/SplashPath.h>
+#include <splash/SplashFont.h>
+#include <splash/SplashFontFile.h>
+#else
+#include "SplashTypes.h"
#include "SplashPath.h"
+#include "SplashFont.h"
#include "SplashFontFile.h"
+#endif
+
+#ifdef HAVE_POPPLER
+#include <goo/GooHash.h>
+#else
#include "GHash.h"
+#endif
struct GlyphInfo
{
Index: lib/pdf/Makefile.in
===================================================================
RCS file: /cvsroot/swftools/swftools/lib/pdf/Makefile.in,v
retrieving revision 1.23
diff -u -3 -p -r1.23 Makefile.in
--- lib/pdf/Makefile.in 5 Apr 2008 07:24:20 -0000 1.23
+++ lib/pdf/Makefile.in 13 Jul 2008 15:49:24 -0000
@@ -1,7 +1,7 @@
# Generated automatically from Makefile.in by configure.
top_builddir = ../..
-srcdir = .
-top_srcdir = ../..
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
include ../../Makefile.common
all: ../libpdf$(A) pdf2swf$(E)
@@ -10,6 +10,8 @@ libpdf: ../libpdf$(A)
libpdf_objects = GFXOutputDev.$(O) InfoOutputDev.$(O) BitmapOutputDev.$(O)
FullBitmapOutputDev.$(O) pdf.$(O) fonts.$(O)
+xpdf_in_source = @xpdf_in_source@
+
xpdf_objects = xpdf/GHash.$(O) xpdf/GList.$(O) xpdf/GString.$(O)
xpdf/gmem.$(O) xpdf/gfile.$(O) \
xpdf/FoFiTrueType.$(O) xpdf/FoFiType1.$(O)
xpdf/FoFiType1C.$(O) xpdf/FoFiBase.$(O) xpdf/FoFiEncodings.$(O) \
xpdf/OutputDev.$(O) xpdf/PDFDoc.$(O) xpdf/Error.$(O)
xpdf/Stream.$(O) xpdf/Object.$(O) \
@@ -20,6 +22,8 @@ xpdf_objects = xpdf/GHash.$(O) xpdf/GLi
xpdf/PSTokenizer.$(O) xpdf/FontEncodingTables.$(O)
xpdf/BuiltinFont.$(O) xpdf/BuiltinFontTables.$(O) \
xpdf/GfxState.$(O) xpdf/Function.$(O) xpdf/Annot.$(O)
xpdf/NameToCharCode.$(O) xpdf/UnicodeMap.$(O) \
xpdf/SecurityHandler.$(O)
+
+splash_in_source = @splash_in_source@
splash_objects = xpdf/SplashOutputDev.$(O) xpdf/SplashFont.$(O)
xpdf/SplashState.$(O) xpdf/Splash.$(O) \
xpdf/SplashBitmap.$(O) xpdf/SplashClip.$(O)
xpdf/SplashPattern.$(O) \
xpdf/SplashFontEngine.$(O) xpdf/SplashFontFile.$(O)
xpdf/SplashFontFileID.$(O) \
@@ -27,7 +31,7 @@ splash_objects = xpdf/SplashOutputDev.$(
xpdf/SplashFTFontEngine.$(O) xpdf/SplashFTFontFile.$(O)
xpdf/SplashFTFont.$(O)
fonts.$(O): fonts.c
- $(C) -I ./ -I xpdf fonts.c -o $@
+ $(C) fonts.c -o $@
cmyk.$(O): cmyk.cc
$(CC) -I ./ -I xpdf cmyk.cc -o $@
GFXOutputDev.$(O): GFXOutputDev.cc GFXOutputDev.h CommonOutputDev.h
../gfxpoly.h
@@ -136,26 +140,26 @@ xpdf/%.$(O): xpdf/%.cc
$(CC) -I ./ -I xpdf $< -o $@
-../libpdf$(A): $(libpdf_objects) $(xpdf_objects) $(splash_objects)
- $(AR) r ../libpdf$(A) $(libpdf_objects) $(xpdf_objects)
$(splash_objects)
+../libpdf$(A): $(libpdf_objects) $(xpdf_in_source) $(splash_in_source)
+ $(AR) r ../libpdf$(A) $(libpdf_objects) $(xpdf_in_source)
$(splash_in_source)
$(RANLIB) ../libpdf$(A)
-xpdfapp_objects=xpdf/XPDF*.cc xpdf/PDFCore.cc xpdf/TextOutputDev.cc
xpdf/xpdf.cc xpdf/CoreOutputDev.cc xpdf/UnicodeTypeTable.cc xpdf/PSOutputDev.cc
-xxpdf$(E): $(xpdf_objects) xpdf/Splash*.cc
- $(LL) $(CPPFLAGS) -DXPDFEXE -g -I xpdf -I . $(xpdfapp_objects)
$(xpdf_objects) xpdf/Splash*.cc xpdf/parseargs.c -o xxpdf$(E) $(LIBS) -lXm -lX11
-
-pdftoppm$(E): $(xpdf_objects) xpdf/Splash*.cc
- $(LL) $(CPPFLAGS) -DXPDFEXE -g -I xpdf -I . xpdf/pdftoppm.cc
$(xpdf_objects) xpdf/Splash*.cc xpdf/parseargs.c -o pdftoppm$(E) $(LIBS)
-pdftotext$(E): $(xpdf_objects) $(splash_objects)
- $(LL) $(CPPFLAGS) -DXPDFEXE -g -I xpdf -I . xpdf/pdftotext.cc
$(xpdf_objects) xpdf/TextOutput*.cc xpdf/UnicodeType*.cc xpdf/parseargs.c -o
pdftotext$(E) $(LIBS)
+#xpdfapp_objects=xpdf/XPDF*.cc xpdf/PDFCore.cc xpdf/TextOutputDev.cc
xpdf/xpdf.cc xpdf/CoreOutputDev.cc xpdf/UnicodeTypeTable.cc xpdf/PSOutputDev.cc
+#xxpdf$(E): $(xpdf_objects) xpdf/Splash*.cc
+# $(LL) $(CPPFLAGS) -DXPDFEXE -g -I xpdf -I . $(xpdfapp_objects)
$(xpdf_objects) xpdf/Splash*.cc xpdf/parseargs.c -o xxpdf$(E) $(LIBS) -lXm -lX11
+
+#pdftoppm$(E): $(xpdf_objects) xpdf/Splash*.cc
+# $(LL) $(CPPFLAGS) -DXPDFEXE -g -I xpdf -I . xpdf/pdftoppm.cc
$(xpdf_objects) xpdf/Splash*.cc xpdf/parseargs.c -o pdftoppm$(E) $(LIBS)
+#pdftotext$(E): $(xpdf_objects) $(splash_objects)
+# $(LL) $(CPPFLAGS) -DXPDFEXE -g -I xpdf -I . xpdf/pdftotext.cc
$(xpdf_objects) xpdf/TextOutput*.cc xpdf/UnicodeType*.cc xpdf/parseargs.c -o
pdftotext$(E) $(LIBS)
gfx_objects = ../libgfxswf$(A) ../libgfx$(A) ../librfxswf$(A) ../libbase$(A)
gfx_objects2 = $(gfx_objects) ../devices/lrf.$(O) ../libocr$(A)
-pdf2swf$(E): ../../src/pdf2swf.c $(libpdf_objects) $(xpdf_objects)
$(splash_objects) $(gfx_objects)
- $(LL) $(CPPFLAGS) -g ../../src/pdf2swf.c $(libpdf_objects)
$(xpdf_objects) $(splash_objects) $(gfx_objects) -o pdf2swf$(E) $(LIBS)
-gfx2gfx$(E): ../../src/gfx2gfx.c $(libpdf_objects) $(xpdf_objects)
$(splash_objects) $(gfx_objects2)
- $(LL) $(CPPFLAGS) -g ../../src/gfx2gfx.c $(libpdf_objects)
$(xpdf_objects) $(splash_objects) $(gfx_objects2) -o gfx2gfx$(E) $(LIBS)
+pdf2swf$(E): ../../src/pdf2swf.c $(libpdf_objects) $(xpdf_in_source)
$(splash_in_source) $(gfx_objects)
+ $(LL) $(CPPFLAGS) -g ../../src/pdf2swf.c $(libpdf_objects)
$(xpdf_in_source) $(splash_in_source) $(gfx_objects) -o pdf2swf$(E) $(LIBS)
+gfx2gfx$(E): ../../src/gfx2gfx.c $(libpdf_objects) $(xpdf_in_source)
$(splash_in_source) $(gfx_objects2)
+ $(LL) $(CPPFLAGS) -g ../../src/gfx2gfx.c $(libpdf_objects)
$(xpdf_in_source) $(splash_in_source) $(gfx_objects2) -o gfx2gfx$(E) $(LIBS)
install:
uninstall:
#ifndef __xpdf_to_poppler_h__
#define __xpdf_to_poppler_h__
#ifdef HAVE_POPPLER
#define GString GooString
#define GHash GooHash
#endif
#endif