pdf2json 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.markdown +9 -0
- data/bin/.gitkeep +0 -0
- data/ext/extconf.rb +30 -0
- data/lib/pdf2json.rb +8 -0
- data/pdf2json-0.52-source/AUTHORS +24 -0
- data/pdf2json-0.52-source/CHANGES +11 -0
- data/pdf2json-0.52-source/Makefile +84 -0
- data/pdf2json-0.52-source/Makefile.in +84 -0
- data/pdf2json-0.52-source/aclocal.m4 +274 -0
- data/pdf2json-0.52-source/aconf-win32.h +86 -0
- data/pdf2json-0.52-source/aconf.h +42 -0
- data/pdf2json-0.52-source/aconf.h.in +41 -0
- data/pdf2json-0.52-source/autom4te.cache/output.0 +6908 -0
- data/pdf2json-0.52-source/autom4te.cache/requests +76 -0
- data/pdf2json-0.52-source/autom4te.cache/traces.0 +466 -0
- data/pdf2json-0.52-source/config.log +1259 -0
- data/pdf2json-0.52-source/config.status +1050 -0
- data/pdf2json-0.52-source/configure +6908 -0
- data/pdf2json-0.52-source/configure.ac +93 -0
- data/pdf2json-0.52-source/doc/pdffonts.1 +130 -0
- data/pdf2json-0.52-source/doc/pdffonts.cat +107 -0
- data/pdf2json-0.52-source/doc/pdffonts.hlp +117 -0
- data/pdf2json-0.52-source/doc/pdfimages.1 +102 -0
- data/pdf2json-0.52-source/doc/pdfimages.cat +92 -0
- data/pdf2json-0.52-source/doc/pdfimages.hlp +101 -0
- data/pdf2json-0.52-source/doc/pdfinfo.1 +158 -0
- data/pdf2json-0.52-source/doc/pdfinfo.cat +119 -0
- data/pdf2json-0.52-source/doc/pdfinfo.hlp +129 -0
- data/pdf2json-0.52-source/doc/pdftoppm.1 +115 -0
- data/pdf2json-0.52-source/doc/pdftoppm.cat +105 -0
- data/pdf2json-0.52-source/doc/pdftoppm.hlp +114 -0
- data/pdf2json-0.52-source/doc/pdftops.1 +229 -0
- data/pdf2json-0.52-source/doc/pdftops.cat +221 -0
- data/pdf2json-0.52-source/doc/pdftops.hlp +231 -0
- data/pdf2json-0.52-source/doc/pdftotext.1 +137 -0
- data/pdf2json-0.52-source/doc/pdftotext.cat +120 -0
- data/pdf2json-0.52-source/doc/pdftotext.hlp +133 -0
- data/pdf2json-0.52-source/doc/sample-xpdfrc +91 -0
- data/pdf2json-0.52-source/doc/xpdf.1 +513 -0
- data/pdf2json-0.52-source/doc/xpdf.cat +476 -0
- data/pdf2json-0.52-source/doc/xpdf.hlp +489 -0
- data/pdf2json-0.52-source/doc/xpdfrc.5 +480 -0
- data/pdf2json-0.52-source/doc/xpdfrc.cat +474 -0
- data/pdf2json-0.52-source/doc/xpdfrc.hlp +479 -0
- data/pdf2json-0.52-source/fofi/.DS_Store +0 -0
- data/pdf2json-0.52-source/fofi/FoFiBase.cc +156 -0
- data/pdf2json-0.52-source/fofi/FoFiBase.h +57 -0
- data/pdf2json-0.52-source/fofi/FoFiBase.o +0 -0
- data/pdf2json-0.52-source/fofi/FoFiEncodings.cc +994 -0
- data/pdf2json-0.52-source/fofi/FoFiEncodings.h +36 -0
- data/pdf2json-0.52-source/fofi/FoFiEncodings.o +0 -0
- data/pdf2json-0.52-source/fofi/FoFiTrueType.cc +2027 -0
- data/pdf2json-0.52-source/fofi/FoFiTrueType.h +174 -0
- data/pdf2json-0.52-source/fofi/FoFiTrueType.o +0 -0
- data/pdf2json-0.52-source/fofi/FoFiType1.cc +252 -0
- data/pdf2json-0.52-source/fofi/FoFiType1.h +59 -0
- data/pdf2json-0.52-source/fofi/FoFiType1.o +0 -0
- data/pdf2json-0.52-source/fofi/FoFiType1C.cc +2603 -0
- data/pdf2json-0.52-source/fofi/FoFiType1C.h +233 -0
- data/pdf2json-0.52-source/fofi/FoFiType1C.o +0 -0
- data/pdf2json-0.52-source/fofi/Makefile +70 -0
- data/pdf2json-0.52-source/fofi/Makefile.dep +0 -0
- data/pdf2json-0.52-source/fofi/Makefile.in +70 -0
- data/pdf2json-0.52-source/fofi/libfofi.a +0 -0
- data/pdf2json-0.52-source/fofi/vms_make.com +0 -0
- data/pdf2json-0.52-source/freetype.win32/.DS_Store +0 -0
- data/pdf2json-0.52-source/freetype.win32/include/.DS_Store +0 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/config/ftconfig.h +528 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/config/ftheader.h +780 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/config/ftmodule.h +32 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/config/ftoption.h +733 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/config/ftstdlib.h +173 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/freetype.h +3919 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/ftadvanc.h +179 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/ftbbox.h +94 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/ftbdf.h +209 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/ftbitmap.h +227 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/ftcache.h +1128 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/ftchapters.h +103 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/ftcid.h +166 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/fterrdef.h +244 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/fterrors.h +206 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/ftgasp.h +120 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/ftglyph.h +613 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/ftgxval.h +358 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/ftgzip.h +102 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/ftimage.h +1313 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/ftincrem.h +353 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/ftlcdfil.h +213 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/ftlist.h +277 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/ftlzw.h +99 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/ftmac.h +274 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/ftmm.h +378 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/ftmodapi.h +483 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/ftmoderr.h +155 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/ftotval.h +203 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/ftoutln.h +537 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/ftpfr.h +172 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/ftrender.h +230 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/ftsizes.h +159 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/ftsnames.h +200 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/ftstroke.h +716 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/ftsynth.h +80 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/ftsystem.h +347 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/fttrigon.h +350 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/fttypes.h +588 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/ftwinfnt.h +274 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/ftxf86.h +83 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/autohint.h +231 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/ftcalc.h +179 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/ftdebug.h +250 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/ftdriver.h +422 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/ftgloadr.h +168 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/ftmemory.h +380 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/ftobjs.h +1428 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/ftpic.h +67 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/ftrfork.h +196 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/ftserv.h +620 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/ftstream.h +539 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/fttrace.h +139 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/ftvalid.h +150 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/internal.h +51 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/pcftypes.h +56 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/psaux.h +873 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/pshints.h +712 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/services/svbdf.h +77 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/services/svcid.h +83 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/services/svgldict.h +82 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/services/svgxval.h +72 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/services/svkern.h +51 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/services/svmm.h +104 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/services/svotval.h +55 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/services/svpfr.h +66 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/services/svpostnm.h +79 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/services/svpscmap.h +164 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/services/svpsinfo.h +92 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/services/svsfnt.h +102 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/services/svttcmap.h +106 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/services/svtteng.h +53 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/services/svttglyf.h +67 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/services/svwinfnt.h +50 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/services/svxf86nm.h +55 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/sfnt.h +897 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/t1types.h +270 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/tttypes.h +1543 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/t1tables.h +504 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/ttnameid.h +1247 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/tttables.h +759 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/tttags.h +107 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/ttunpat.h +59 -0
- data/pdf2json-0.52-source/freetype.win32/include/ft2build.h +39 -0
- data/pdf2json-0.52-source/freetype.win32/lib/freetype_a.lib +0 -0
- data/pdf2json-0.52-source/goo/.DS_Store +0 -0
- data/pdf2json-0.52-source/goo/FixedPoint.cc +118 -0
- data/pdf2json-0.52-source/goo/FixedPoint.h +155 -0
- data/pdf2json-0.52-source/goo/FixedPoint.o +0 -0
- data/pdf2json-0.52-source/goo/GHash.cc +380 -0
- data/pdf2json-0.52-source/goo/GHash.h +78 -0
- data/pdf2json-0.52-source/goo/GHash.o +0 -0
- data/pdf2json-0.52-source/goo/GList.cc +97 -0
- data/pdf2json-0.52-source/goo/GList.h +96 -0
- data/pdf2json-0.52-source/goo/GList.o +0 -0
- data/pdf2json-0.52-source/goo/GMutex.h +49 -0
- data/pdf2json-0.52-source/goo/GString.cc +724 -0
- data/pdf2json-0.52-source/goo/GString.cc.fixed +718 -0
- data/pdf2json-0.52-source/goo/GString.h +136 -0
- data/pdf2json-0.52-source/goo/GString.o +0 -0
- data/pdf2json-0.52-source/goo/ImgWriter.o +0 -0
- data/pdf2json-0.52-source/goo/JpegWriter.o +0 -0
- data/pdf2json-0.52-source/goo/Makefile +72 -0
- data/pdf2json-0.52-source/goo/Makefile.dep +0 -0
- data/pdf2json-0.52-source/goo/Makefile.in +72 -0
- data/pdf2json-0.52-source/goo/PNGWriter.o +0 -0
- data/pdf2json-0.52-source/goo/gfile.cc +731 -0
- data/pdf2json-0.52-source/goo/gfile.h +138 -0
- data/pdf2json-0.52-source/goo/gfile.o +0 -0
- data/pdf2json-0.52-source/goo/gmem.cc +264 -0
- data/pdf2json-0.52-source/goo/gmem.h +79 -0
- data/pdf2json-0.52-source/goo/gmem.o +0 -0
- data/pdf2json-0.52-source/goo/gmempp.cc +32 -0
- data/pdf2json-0.52-source/goo/gmempp.o +0 -0
- data/pdf2json-0.52-source/goo/gtypes.h +29 -0
- data/pdf2json-0.52-source/goo/libGoo.a +0 -0
- data/pdf2json-0.52-source/goo/parseargs.c +190 -0
- data/pdf2json-0.52-source/goo/parseargs.h +71 -0
- data/pdf2json-0.52-source/goo/parseargs.o +0 -0
- data/pdf2json-0.52-source/goo/vms_directory.c +214 -0
- data/pdf2json-0.52-source/goo/vms_dirent.h +67 -0
- data/pdf2json-0.52-source/goo/vms_make.com +82 -0
- data/pdf2json-0.52-source/goo/vms_sys_dirent.h +54 -0
- data/pdf2json-0.52-source/goo/vms_unix_time.h +102 -0
- data/pdf2json-0.52-source/goo/vms_unix_times.c +42 -0
- data/pdf2json-0.52-source/goo/vms_unlink.c +22 -0
- data/pdf2json-0.52-source/ms_make.bat +199 -0
- data/pdf2json-0.52-source/splash/.DS_Store +0 -0
- data/pdf2json-0.52-source/splash/Makefile +103 -0
- data/pdf2json-0.52-source/splash/Makefile.dep +0 -0
- data/pdf2json-0.52-source/splash/Makefile.in +103 -0
- data/pdf2json-0.52-source/splash/Splash.cc +3310 -0
- data/pdf2json-0.52-source/splash/Splash.h +293 -0
- data/pdf2json-0.52-source/splash/Splash.o +0 -0
- data/pdf2json-0.52-source/splash/SplashBitmap.cc +188 -0
- data/pdf2json-0.52-source/splash/SplashBitmap.h +64 -0
- data/pdf2json-0.52-source/splash/SplashBitmap.o +0 -0
- data/pdf2json-0.52-source/splash/SplashClip.cc +382 -0
- data/pdf2json-0.52-source/splash/SplashClip.h +107 -0
- data/pdf2json-0.52-source/splash/SplashClip.o +0 -0
- data/pdf2json-0.52-source/splash/SplashErrorCodes.h +32 -0
- data/pdf2json-0.52-source/splash/SplashFTFont.cc +357 -0
- data/pdf2json-0.52-source/splash/SplashFTFont.h +58 -0
- data/pdf2json-0.52-source/splash/SplashFTFont.o +0 -0
- data/pdf2json-0.52-source/splash/SplashFTFontEngine.cc +179 -0
- data/pdf2json-0.52-source/splash/SplashFTFontEngine.h +65 -0
- data/pdf2json-0.52-source/splash/SplashFTFontEngine.o +0 -0
- data/pdf2json-0.52-source/splash/SplashFTFontFile.cc +114 -0
- data/pdf2json-0.52-source/splash/SplashFTFontFile.h +73 -0
- data/pdf2json-0.52-source/splash/SplashFTFontFile.o +0 -0
- data/pdf2json-0.52-source/splash/SplashFont.cc +176 -0
- data/pdf2json-0.52-source/splash/SplashFont.h +104 -0
- data/pdf2json-0.52-source/splash/SplashFont.o +0 -0
- data/pdf2json-0.52-source/splash/SplashFontEngine.cc +317 -0
- data/pdf2json-0.52-source/splash/SplashFontEngine.h +91 -0
- data/pdf2json-0.52-source/splash/SplashFontEngine.o +0 -0
- data/pdf2json-0.52-source/splash/SplashFontFile.cc +55 -0
- data/pdf2json-0.52-source/splash/SplashFontFile.h +60 -0
- data/pdf2json-0.52-source/splash/SplashFontFile.o +0 -0
- data/pdf2json-0.52-source/splash/SplashFontFileID.cc +23 -0
- data/pdf2json-0.52-source/splash/SplashFontFileID.h +30 -0
- data/pdf2json-0.52-source/splash/SplashFontFileID.o +0 -0
- data/pdf2json-0.52-source/splash/SplashGlyphBitmap.h +26 -0
- data/pdf2json-0.52-source/splash/SplashMath.h +89 -0
- data/pdf2json-0.52-source/splash/SplashPath.cc +184 -0
- data/pdf2json-0.52-source/splash/SplashPath.h +121 -0
- data/pdf2json-0.52-source/splash/SplashPath.o +0 -0
- data/pdf2json-0.52-source/splash/SplashPattern.cc +40 -0
- data/pdf2json-0.52-source/splash/SplashPattern.h +65 -0
- data/pdf2json-0.52-source/splash/SplashPattern.o +0 -0
- data/pdf2json-0.52-source/splash/SplashScreen.cc +383 -0
- data/pdf2json-0.52-source/splash/SplashScreen.h +56 -0
- data/pdf2json-0.52-source/splash/SplashScreen.o +0 -0
- data/pdf2json-0.52-source/splash/SplashState.cc +165 -0
- data/pdf2json-0.52-source/splash/SplashState.h +103 -0
- data/pdf2json-0.52-source/splash/SplashState.o +0 -0
- data/pdf2json-0.52-source/splash/SplashT1Font.cc +287 -0
- data/pdf2json-0.52-source/splash/SplashT1Font.h +57 -0
- data/pdf2json-0.52-source/splash/SplashT1Font.o +0 -0
- data/pdf2json-0.52-source/splash/SplashT1FontEngine.cc +124 -0
- data/pdf2json-0.52-source/splash/SplashT1FontEngine.h +53 -0
- data/pdf2json-0.52-source/splash/SplashT1FontEngine.o +0 -0
- data/pdf2json-0.52-source/splash/SplashT1FontFile.cc +97 -0
- data/pdf2json-0.52-source/splash/SplashT1FontFile.h +58 -0
- data/pdf2json-0.52-source/splash/SplashT1FontFile.o +0 -0
- data/pdf2json-0.52-source/splash/SplashTypes.h +132 -0
- data/pdf2json-0.52-source/splash/SplashXPath.cc +438 -0
- data/pdf2json-0.52-source/splash/SplashXPath.h +100 -0
- data/pdf2json-0.52-source/splash/SplashXPath.o +0 -0
- data/pdf2json-0.52-source/splash/SplashXPathScanner.cc +428 -0
- data/pdf2json-0.52-source/splash/SplashXPathScanner.h +87 -0
- data/pdf2json-0.52-source/splash/SplashXPathScanner.o +0 -0
- data/pdf2json-0.52-source/splash/libsplash.a +0 -0
- data/pdf2json-0.52-source/splash/vms_make.com +0 -0
- data/pdf2json-0.52-source/src/.DS_Store +0 -0
- data/pdf2json-0.52-source/src/GVector.h +101 -0
- data/pdf2json-0.52-source/src/ImgOutputDev.cc +1243 -0
- data/pdf2json-0.52-source/src/ImgOutputDev.h +307 -0
- data/pdf2json-0.52-source/src/ImgOutputDev.o +0 -0
- data/pdf2json-0.52-source/src/Makefile +68 -0
- data/pdf2json-0.52-source/src/Makefile.in +68 -0
- data/pdf2json-0.52-source/src/XmlFonts.cc +367 -0
- data/pdf2json-0.52-source/src/XmlFonts.h +91 -0
- data/pdf2json-0.52-source/src/XmlFonts.o +0 -0
- data/pdf2json-0.52-source/src/XmlLinks.cc +101 -0
- data/pdf2json-0.52-source/src/XmlLinks.h +54 -0
- data/pdf2json-0.52-source/src/XmlLinks.o +0 -0
- data/pdf2json-0.52-source/src/pdf2json +0 -0
- data/pdf2json-0.52-source/src/pdf2json.cc +343 -0
- data/pdf2json-0.52-source/src/pdf2json.o +0 -0
- data/pdf2json-0.52-source/src/pdf2xml.dtd +22 -0
- data/pdf2json-0.52-source/src/pdf2xmljson.dtd +9 -0
- data/pdf2json-0.52-source/xpdf/.DS_Store +0 -0
- data/pdf2json-0.52-source/xpdf/Annot.cc +1556 -0
- data/pdf2json-0.52-source/xpdf/Annot.h +142 -0
- data/pdf2json-0.52-source/xpdf/Annot.o +0 -0
- data/pdf2json-0.52-source/xpdf/Array.cc +73 -0
- data/pdf2json-0.52-source/xpdf/Array.h +58 -0
- data/pdf2json-0.52-source/xpdf/Array.o +0 -0
- data/pdf2json-0.52-source/xpdf/BuiltinFont.cc +65 -0
- data/pdf2json-0.52-source/xpdf/BuiltinFont.h +57 -0
- data/pdf2json-0.52-source/xpdf/BuiltinFont.o +0 -0
- data/pdf2json-0.52-source/xpdf/BuiltinFontTables.cc +4284 -0
- data/pdf2json-0.52-source/xpdf/BuiltinFontTables.h +23 -0
- data/pdf2json-0.52-source/xpdf/BuiltinFontTables.o +0 -0
- data/pdf2json-0.52-source/xpdf/CMap.cc +408 -0
- data/pdf2json-0.52-source/xpdf/CMap.h +102 -0
- data/pdf2json-0.52-source/xpdf/CMap.o +0 -0
- data/pdf2json-0.52-source/xpdf/Catalog.cc +374 -0
- data/pdf2json-0.52-source/xpdf/Catalog.h +97 -0
- data/pdf2json-0.52-source/xpdf/Catalog.o +0 -0
- data/pdf2json-0.52-source/xpdf/CharCodeToUnicode.cc +540 -0
- data/pdf2json-0.52-source/xpdf/CharCodeToUnicode.h +117 -0
- data/pdf2json-0.52-source/xpdf/CharCodeToUnicode.o +0 -0
- data/pdf2json-0.52-source/xpdf/CharTypes.h +24 -0
- data/pdf2json-0.52-source/xpdf/CompactFontTables.h +464 -0
- data/pdf2json-0.52-source/xpdf/CoreOutputDev.cc +61 -0
- data/pdf2json-0.52-source/xpdf/CoreOutputDev.h +61 -0
- data/pdf2json-0.52-source/xpdf/Decrypt.cc +776 -0
- data/pdf2json-0.52-source/xpdf/Decrypt.h +95 -0
- data/pdf2json-0.52-source/xpdf/Decrypt.o +0 -0
- data/pdf2json-0.52-source/xpdf/Dict.cc +95 -0
- data/pdf2json-0.52-source/xpdf/Dict.h +77 -0
- data/pdf2json-0.52-source/xpdf/Dict.o +0 -0
- data/pdf2json-0.52-source/xpdf/Error.cc +38 -0
- data/pdf2json-0.52-source/xpdf/Error.h +23 -0
- data/pdf2json-0.52-source/xpdf/Error.o +0 -0
- data/pdf2json-0.52-source/xpdf/ErrorCodes.h +36 -0
- data/pdf2json-0.52-source/xpdf/FontEncodingTables.cc +1824 -0
- data/pdf2json-0.52-source/xpdf/FontEncodingTables.h +20 -0
- data/pdf2json-0.52-source/xpdf/FontEncodingTables.o +0 -0
- data/pdf2json-0.52-source/xpdf/Function.cc +1573 -0
- data/pdf2json-0.52-source/xpdf/Function.h +229 -0
- data/pdf2json-0.52-source/xpdf/Function.o +0 -0
- data/pdf2json-0.52-source/xpdf/Gfx.cc +4187 -0
- data/pdf2json-0.52-source/xpdf/Gfx.h +312 -0
- data/pdf2json-0.52-source/xpdf/Gfx.o +0 -0
- data/pdf2json-0.52-source/xpdf/GfxFont.cc +1568 -0
- data/pdf2json-0.52-source/xpdf/GfxFont.h +320 -0
- data/pdf2json-0.52-source/xpdf/GfxFont.o +0 -0
- data/pdf2json-0.52-source/xpdf/GfxState.cc +4137 -0
- data/pdf2json-0.52-source/xpdf/GfxState.h +1244 -0
- data/pdf2json-0.52-source/xpdf/GfxState.o +0 -0
- data/pdf2json-0.52-source/xpdf/GlobalParams.cc +2924 -0
- data/pdf2json-0.52-source/xpdf/GlobalParams.cc.old +2908 -0
- data/pdf2json-0.52-source/xpdf/GlobalParams.h +466 -0
- data/pdf2json-0.52-source/xpdf/GlobalParams.h.old +463 -0
- data/pdf2json-0.52-source/xpdf/GlobalParams.o +0 -0
- data/pdf2json-0.52-source/xpdf/ImageOutputDev.cc +195 -0
- data/pdf2json-0.52-source/xpdf/ImageOutputDev.h +76 -0
- data/pdf2json-0.52-source/xpdf/ImageOutputDev.o +0 -0
- data/pdf2json-0.52-source/xpdf/JArithmeticDecoder.cc +322 -0
- data/pdf2json-0.52-source/xpdf/JArithmeticDecoder.h +109 -0
- data/pdf2json-0.52-source/xpdf/JArithmeticDecoder.o +0 -0
- data/pdf2json-0.52-source/xpdf/JBIG2Stream.cc +3413 -0
- data/pdf2json-0.52-source/xpdf/JBIG2Stream.h +145 -0
- data/pdf2json-0.52-source/xpdf/JBIG2Stream.o +0 -0
- data/pdf2json-0.52-source/xpdf/JPXStream.cc +3144 -0
- data/pdf2json-0.52-source/xpdf/JPXStream.h +351 -0
- data/pdf2json-0.52-source/xpdf/JPXStream.o +0 -0
- data/pdf2json-0.52-source/xpdf/Lexer.cc +485 -0
- data/pdf2json-0.52-source/xpdf/Lexer.h +80 -0
- data/pdf2json-0.52-source/xpdf/Lexer.o +0 -0
- data/pdf2json-0.52-source/xpdf/Link.cc +806 -0
- data/pdf2json-0.52-source/xpdf/Link.cc.old +784 -0
- data/pdf2json-0.52-source/xpdf/Link.h +415 -0
- data/pdf2json-0.52-source/xpdf/Link.h.old +369 -0
- data/pdf2json-0.52-source/xpdf/Link.o +0 -0
- data/pdf2json-0.52-source/xpdf/Makefile +232 -0
- data/pdf2json-0.52-source/xpdf/Makefile.dep +0 -0
- data/pdf2json-0.52-source/xpdf/Makefile.in +232 -0
- data/pdf2json-0.52-source/xpdf/NameToCharCode.cc +116 -0
- data/pdf2json-0.52-source/xpdf/NameToCharCode.h +42 -0
- data/pdf2json-0.52-source/xpdf/NameToCharCode.o +0 -0
- data/pdf2json-0.52-source/xpdf/NameToUnicodeTable.h +1097 -0
- data/pdf2json-0.52-source/xpdf/Object.cc +231 -0
- data/pdf2json-0.52-source/xpdf/Object.h +303 -0
- data/pdf2json-0.52-source/xpdf/Object.o +0 -0
- data/pdf2json-0.52-source/xpdf/Outline.cc +151 -0
- data/pdf2json-0.52-source/xpdf/Outline.h +76 -0
- data/pdf2json-0.52-source/xpdf/Outline.o +0 -0
- data/pdf2json-0.52-source/xpdf/OutputDev.cc +131 -0
- data/pdf2json-0.52-source/xpdf/OutputDev.h +253 -0
- data/pdf2json-0.52-source/xpdf/OutputDev.o +0 -0
- data/pdf2json-0.52-source/xpdf/PDFCore.cc +2044 -0
- data/pdf2json-0.52-source/xpdf/PDFCore.h +321 -0
- data/pdf2json-0.52-source/xpdf/PDFDoc.cc +404 -0
- data/pdf2json-0.52-source/xpdf/PDFDoc.h +183 -0
- data/pdf2json-0.52-source/xpdf/PDFDoc.o +0 -0
- data/pdf2json-0.52-source/xpdf/PDFDocEncoding.cc +44 -0
- data/pdf2json-0.52-source/xpdf/PDFDocEncoding.h +16 -0
- data/pdf2json-0.52-source/xpdf/PDFDocEncoding.o +0 -0
- data/pdf2json-0.52-source/xpdf/PSOutputDev.cc +6224 -0
- data/pdf2json-0.52-source/xpdf/PSOutputDev.h +395 -0
- data/pdf2json-0.52-source/xpdf/PSOutputDev.o +0 -0
- data/pdf2json-0.52-source/xpdf/PSTokenizer.cc +135 -0
- data/pdf2json-0.52-source/xpdf/PSTokenizer.h +41 -0
- data/pdf2json-0.52-source/xpdf/PSTokenizer.o +0 -0
- data/pdf2json-0.52-source/xpdf/Page.cc +454 -0
- data/pdf2json-0.52-source/xpdf/Page.h +187 -0
- data/pdf2json-0.52-source/xpdf/Page.o +0 -0
- data/pdf2json-0.52-source/xpdf/Parser.cc +227 -0
- data/pdf2json-0.52-source/xpdf/Parser.h +59 -0
- data/pdf2json-0.52-source/xpdf/Parser.o +0 -0
- data/pdf2json-0.52-source/xpdf/PreScanOutputDev.cc +257 -0
- data/pdf2json-0.52-source/xpdf/PreScanOutputDev.h +130 -0
- data/pdf2json-0.52-source/xpdf/PreScanOutputDev.o +0 -0
- data/pdf2json-0.52-source/xpdf/SecurityHandler.cc +390 -0
- data/pdf2json-0.52-source/xpdf/SecurityHandler.h +160 -0
- data/pdf2json-0.52-source/xpdf/SecurityHandler.o +0 -0
- data/pdf2json-0.52-source/xpdf/SplashOutputDev.cc +2845 -0
- data/pdf2json-0.52-source/xpdf/SplashOutputDev.h +247 -0
- data/pdf2json-0.52-source/xpdf/SplashOutputDev.o +0 -0
- data/pdf2json-0.52-source/xpdf/Stream-CCITT.h +459 -0
- data/pdf2json-0.52-source/xpdf/Stream.cc +4627 -0
- data/pdf2json-0.52-source/xpdf/Stream.h +858 -0
- data/pdf2json-0.52-source/xpdf/Stream.o +0 -0
- data/pdf2json-0.52-source/xpdf/TextOutputDev.cc +4090 -0
- data/pdf2json-0.52-source/xpdf/TextOutputDev.h +661 -0
- data/pdf2json-0.52-source/xpdf/TextOutputDev.o +0 -0
- data/pdf2json-0.52-source/xpdf/UTF8.h +56 -0
- data/pdf2json-0.52-source/xpdf/UnicodeMap.cc +302 -0
- data/pdf2json-0.52-source/xpdf/UnicodeMap.cc.old +293 -0
- data/pdf2json-0.52-source/xpdf/UnicodeMap.h +135 -0
- data/pdf2json-0.52-source/xpdf/UnicodeMap.h.old +123 -0
- data/pdf2json-0.52-source/xpdf/UnicodeMap.o +0 -0
- data/pdf2json-0.52-source/xpdf/UnicodeMapTables.h +361 -0
- data/pdf2json-0.52-source/xpdf/UnicodeTypeTable.cc +949 -0
- data/pdf2json-0.52-source/xpdf/UnicodeTypeTable.h +20 -0
- data/pdf2json-0.52-source/xpdf/UnicodeTypeTable.o +0 -0
- data/pdf2json-0.52-source/xpdf/XPDFApp.cc +447 -0
- data/pdf2json-0.52-source/xpdf/XPDFApp.h +114 -0
- data/pdf2json-0.52-source/xpdf/XPDFCore.cc +1655 -0
- data/pdf2json-0.52-source/xpdf/XPDFCore.h +251 -0
- data/pdf2json-0.52-source/xpdf/XPDFTree.cc +931 -0
- data/pdf2json-0.52-source/xpdf/XPDFTree.h +45 -0
- data/pdf2json-0.52-source/xpdf/XPDFTreeP.h +87 -0
- data/pdf2json-0.52-source/xpdf/XPDFViewer.cc +3488 -0
- data/pdf2json-0.52-source/xpdf/XPDFViewer.h +352 -0
- data/pdf2json-0.52-source/xpdf/XRef.cc +896 -0
- data/pdf2json-0.52-source/xpdf/XRef.h +133 -0
- data/pdf2json-0.52-source/xpdf/XRef.o +0 -0
- data/pdf2json-0.52-source/xpdf/XpdfPluginAPI.cc +262 -0
- data/pdf2json-0.52-source/xpdf/XpdfPluginAPI.h +341 -0
- data/pdf2json-0.52-source/xpdf/XpdfPluginAPI.o +0 -0
- data/pdf2json-0.52-source/xpdf/about-text.h +48 -0
- data/pdf2json-0.52-source/xpdf/about.xbm +6 -0
- data/pdf2json-0.52-source/xpdf/backArrow.xbm +6 -0
- data/pdf2json-0.52-source/xpdf/backArrowDis.xbm +6 -0
- data/pdf2json-0.52-source/xpdf/config.h +112 -0
- data/pdf2json-0.52-source/xpdf/dblLeftArrow.xbm +6 -0
- data/pdf2json-0.52-source/xpdf/dblLeftArrowDis.xbm +6 -0
- data/pdf2json-0.52-source/xpdf/dblRightArrow.xbm +6 -0
- data/pdf2json-0.52-source/xpdf/dblRightArrowDis.xbm +6 -0
- data/pdf2json-0.52-source/xpdf/find.xbm +6 -0
- data/pdf2json-0.52-source/xpdf/findDis.xbm +6 -0
- data/pdf2json-0.52-source/xpdf/forwardArrow.xbm +6 -0
- data/pdf2json-0.52-source/xpdf/forwardArrowDis.xbm +6 -0
- data/pdf2json-0.52-source/xpdf/leftArrow.xbm +5 -0
- data/pdf2json-0.52-source/xpdf/leftArrowDis.xbm +5 -0
- data/pdf2json-0.52-source/xpdf/libXpdf.a +0 -0
- data/pdf2json-0.52-source/xpdf/pdffonts +0 -0
- data/pdf2json-0.52-source/xpdf/pdffonts.cc +298 -0
- data/pdf2json-0.52-source/xpdf/pdffonts.o +0 -0
- data/pdf2json-0.52-source/xpdf/pdfimages +0 -0
- data/pdf2json-0.52-source/xpdf/pdfimages.cc +155 -0
- data/pdf2json-0.52-source/xpdf/pdfimages.o +0 -0
- data/pdf2json-0.52-source/xpdf/pdfinfo +0 -0
- data/pdf2json-0.52-source/xpdf/pdfinfo.cc +387 -0
- data/pdf2json-0.52-source/xpdf/pdfinfo.o +0 -0
- data/pdf2json-0.52-source/xpdf/pdftoppm.cc +203 -0
- data/pdf2json-0.52-source/xpdf/pdftops +0 -0
- data/pdf2json-0.52-source/xpdf/pdftops.cc +344 -0
- data/pdf2json-0.52-source/xpdf/pdftops.o +0 -0
- data/pdf2json-0.52-source/xpdf/pdftotext +0 -0
- data/pdf2json-0.52-source/xpdf/pdftotext.cc +333 -0
- data/pdf2json-0.52-source/xpdf/pdftotext.o +0 -0
- data/pdf2json-0.52-source/xpdf/print.xbm +6 -0
- data/pdf2json-0.52-source/xpdf/printDis.xbm +6 -0
- data/pdf2json-0.52-source/xpdf/rightArrow.xbm +5 -0
- data/pdf2json-0.52-source/xpdf/rightArrowDis.xbm +5 -0
- data/pdf2json-0.52-source/xpdf/vms_make.com +129 -0
- data/pdf2json-0.52-source/xpdf/xpdf.cc +344 -0
- data/pdf2json-0.52-source/xpdf/xpdfIcon.xpm +62 -0
- data/pdf2json.gemspec +29 -0
- metadata +518 -0
@@ -0,0 +1,395 @@
|
|
1
|
+
//========================================================================
|
2
|
+
//
|
3
|
+
// PSOutputDev.h
|
4
|
+
//
|
5
|
+
// Copyright 1996-2003 Glyph & Cog, LLC
|
6
|
+
//
|
7
|
+
//========================================================================
|
8
|
+
|
9
|
+
#ifndef PSOUTPUTDEV_H
|
10
|
+
#define PSOUTPUTDEV_H
|
11
|
+
|
12
|
+
#include <aconf.h>
|
13
|
+
|
14
|
+
#ifdef USE_GCC_PRAGMAS
|
15
|
+
#pragma interface
|
16
|
+
#endif
|
17
|
+
|
18
|
+
#include <stddef.h>
|
19
|
+
#include "config.h"
|
20
|
+
#include "Object.h"
|
21
|
+
#include "GlobalParams.h"
|
22
|
+
#include "OutputDev.h"
|
23
|
+
|
24
|
+
class Function;
|
25
|
+
class GfxPath;
|
26
|
+
class GfxFont;
|
27
|
+
class GfxColorSpace;
|
28
|
+
class GfxSeparationColorSpace;
|
29
|
+
class PDFRectangle;
|
30
|
+
struct PSFont8Info;
|
31
|
+
struct PSFont16Enc;
|
32
|
+
class PSOutCustomColor;
|
33
|
+
|
34
|
+
//------------------------------------------------------------------------
|
35
|
+
// PSOutputDev
|
36
|
+
//------------------------------------------------------------------------
|
37
|
+
|
38
|
+
enum PSOutMode {
|
39
|
+
psModePS,
|
40
|
+
psModeEPS,
|
41
|
+
psModeForm
|
42
|
+
};
|
43
|
+
|
44
|
+
enum PSFileType {
|
45
|
+
psFile, // write to file
|
46
|
+
psPipe, // write to pipe
|
47
|
+
psStdout, // write to stdout
|
48
|
+
psGeneric // write to a generic stream
|
49
|
+
};
|
50
|
+
|
51
|
+
typedef void (*PSOutputFunc)(void *stream, char *data, int len);
|
52
|
+
|
53
|
+
class PSOutputDev: public OutputDev {
|
54
|
+
public:
|
55
|
+
|
56
|
+
// Open a PostScript output file, and write the prolog.
|
57
|
+
PSOutputDev(char *fileName, XRef *xrefA, Catalog *catalog,
|
58
|
+
int firstPage, int lastPage, PSOutMode modeA,
|
59
|
+
int imgLLXA = 0, int imgLLYA = 0,
|
60
|
+
int imgURXA = 0, int imgURYA = 0,
|
61
|
+
GBool manualCtrlA = gFalse);
|
62
|
+
|
63
|
+
// Open a PSOutputDev that will write to a generic stream.
|
64
|
+
PSOutputDev(PSOutputFunc outputFuncA, void *outputStreamA,
|
65
|
+
XRef *xrefA, Catalog *catalog,
|
66
|
+
int firstPage, int lastPage, PSOutMode modeA,
|
67
|
+
int imgLLXA = 0, int imgLLYA = 0,
|
68
|
+
int imgURXA = 0, int imgURYA = 0,
|
69
|
+
GBool manualCtrlA = gFalse);
|
70
|
+
|
71
|
+
// Destructor -- writes the trailer and closes the file.
|
72
|
+
virtual ~PSOutputDev();
|
73
|
+
|
74
|
+
// Check if file was successfully created.
|
75
|
+
virtual GBool isOk() { return ok; }
|
76
|
+
|
77
|
+
//---- get info about output device
|
78
|
+
|
79
|
+
// Does this device use upside-down coordinates?
|
80
|
+
// (Upside-down means (0,0) is the top left corner of the page.)
|
81
|
+
virtual GBool upsideDown() { return gFalse; }
|
82
|
+
|
83
|
+
// Does this device use drawChar() or drawString()?
|
84
|
+
virtual GBool useDrawChar() { return gFalse; }
|
85
|
+
|
86
|
+
// Does this device use tilingPatternFill()? If this returns false,
|
87
|
+
// tiling pattern fills will be reduced to a series of other drawing
|
88
|
+
// operations.
|
89
|
+
virtual GBool useTilingPatternFill() { return gTrue; }
|
90
|
+
|
91
|
+
// Does this device use functionShadedFill(), axialShadedFill(), and
|
92
|
+
// radialShadedFill()? If this returns false, these shaded fills
|
93
|
+
// will be reduced to a series of other drawing operations.
|
94
|
+
virtual GBool useShadedFills()
|
95
|
+
{ return level >= psLevel2; }
|
96
|
+
|
97
|
+
// Does this device use drawForm()? If this returns false,
|
98
|
+
// form-type XObjects will be interpreted (i.e., unrolled).
|
99
|
+
virtual GBool useDrawForm() { return preload; }
|
100
|
+
|
101
|
+
// Does this device use beginType3Char/endType3Char? Otherwise,
|
102
|
+
// text in Type 3 fonts will be drawn with drawChar/drawString.
|
103
|
+
virtual GBool interpretType3Chars() { return gFalse; }
|
104
|
+
|
105
|
+
//----- header/trailer (used only if manualCtrl is true)
|
106
|
+
|
107
|
+
// Write the document-level header.
|
108
|
+
void writeHeader(int firstPage, int lastPage,
|
109
|
+
PDFRectangle *mediaBox, PDFRectangle *cropBox,
|
110
|
+
int pageRotate);
|
111
|
+
|
112
|
+
// Write the Xpdf procset.
|
113
|
+
void writeXpdfProcset();
|
114
|
+
|
115
|
+
// Write the document-level setup.
|
116
|
+
void writeDocSetup(Catalog *catalog, int firstPage, int lastPage);
|
117
|
+
|
118
|
+
// Write the trailer for the current page.
|
119
|
+
void writePageTrailer();
|
120
|
+
|
121
|
+
// Write the document trailer.
|
122
|
+
void writeTrailer();
|
123
|
+
|
124
|
+
//----- initialization and control
|
125
|
+
|
126
|
+
// Check to see if a page slice should be displayed. If this
|
127
|
+
// returns false, the page display is aborted. Typically, an
|
128
|
+
// OutputDev will use some alternate means to display the page
|
129
|
+
// before returning false.
|
130
|
+
virtual GBool checkPageSlice(Page *page, double hDPI, double vDPI,
|
131
|
+
int rotate, GBool useMediaBox, GBool crop,
|
132
|
+
int sliceX, int sliceY, int sliceW, int sliceH,
|
133
|
+
GBool printing, Catalog *catalog,
|
134
|
+
GBool (*abortCheckCbk)(void *data) = NULL,
|
135
|
+
void *abortCheckCbkData = NULL);
|
136
|
+
|
137
|
+
// Start a page.
|
138
|
+
virtual void startPage(int pageNum, GfxState *state);
|
139
|
+
|
140
|
+
// End a page.
|
141
|
+
virtual void endPage();
|
142
|
+
|
143
|
+
//----- save/restore graphics state
|
144
|
+
virtual void saveState(GfxState *state);
|
145
|
+
virtual void restoreState(GfxState *state);
|
146
|
+
|
147
|
+
//----- update graphics state
|
148
|
+
virtual void updateCTM(GfxState *state, double m11, double m12,
|
149
|
+
double m21, double m22, double m31, double m32);
|
150
|
+
virtual void updateLineDash(GfxState *state);
|
151
|
+
virtual void updateFlatness(GfxState *state);
|
152
|
+
virtual void updateLineJoin(GfxState *state);
|
153
|
+
virtual void updateLineCap(GfxState *state);
|
154
|
+
virtual void updateMiterLimit(GfxState *state);
|
155
|
+
virtual void updateLineWidth(GfxState *state);
|
156
|
+
virtual void updateFillColorSpace(GfxState *state);
|
157
|
+
virtual void updateStrokeColorSpace(GfxState *state);
|
158
|
+
virtual void updateFillColor(GfxState *state);
|
159
|
+
virtual void updateStrokeColor(GfxState *state);
|
160
|
+
virtual void updateFillOverprint(GfxState *state);
|
161
|
+
virtual void updateStrokeOverprint(GfxState *state);
|
162
|
+
virtual void updateTransfer(GfxState *state);
|
163
|
+
|
164
|
+
//----- update text state
|
165
|
+
virtual void updateFont(GfxState *state);
|
166
|
+
virtual void updateTextMat(GfxState *state);
|
167
|
+
virtual void updateCharSpace(GfxState *state);
|
168
|
+
virtual void updateRender(GfxState *state);
|
169
|
+
virtual void updateRise(GfxState *state);
|
170
|
+
virtual void updateWordSpace(GfxState *state);
|
171
|
+
virtual void updateHorizScaling(GfxState *state);
|
172
|
+
virtual void updateTextPos(GfxState *state);
|
173
|
+
virtual void updateTextShift(GfxState *state, double shift);
|
174
|
+
|
175
|
+
//----- path painting
|
176
|
+
virtual void stroke(GfxState *state);
|
177
|
+
virtual void fill(GfxState *state);
|
178
|
+
virtual void eoFill(GfxState *state);
|
179
|
+
virtual void tilingPatternFill(GfxState *state, Object *str,
|
180
|
+
int paintType, Dict *resDict,
|
181
|
+
double *mat, double *bbox,
|
182
|
+
int x0, int y0, int x1, int y1,
|
183
|
+
double xStep, double yStep);
|
184
|
+
virtual GBool functionShadedFill(GfxState *state,
|
185
|
+
GfxFunctionShading *shading);
|
186
|
+
virtual GBool axialShadedFill(GfxState *state, GfxAxialShading *shading);
|
187
|
+
virtual GBool radialShadedFill(GfxState *state, GfxRadialShading *shading);
|
188
|
+
|
189
|
+
//----- path clipping
|
190
|
+
virtual void clip(GfxState *state);
|
191
|
+
virtual void eoClip(GfxState *state);
|
192
|
+
virtual void clipToStrokePath(GfxState *state);
|
193
|
+
|
194
|
+
//----- text drawing
|
195
|
+
virtual void drawString(GfxState *state, GString *s);
|
196
|
+
virtual void endTextObject(GfxState *state);
|
197
|
+
|
198
|
+
//----- image drawing
|
199
|
+
virtual void drawImageMask(GfxState *state, Object *ref, Stream *str,
|
200
|
+
int width, int height, GBool invert,
|
201
|
+
GBool inlineImg);
|
202
|
+
virtual void drawImage(GfxState *state, Object *ref, Stream *str,
|
203
|
+
int width, int height, GfxImageColorMap *colorMap,
|
204
|
+
int *maskColors, GBool inlineImg);
|
205
|
+
virtual void drawMaskedImage(GfxState *state, Object *ref, Stream *str,
|
206
|
+
int width, int height,
|
207
|
+
GfxImageColorMap *colorMap,
|
208
|
+
Stream *maskStr, int maskWidth, int maskHeight,
|
209
|
+
GBool maskInvert);
|
210
|
+
|
211
|
+
#if OPI_SUPPORT
|
212
|
+
//----- OPI functions
|
213
|
+
virtual void opiBegin(GfxState *state, Dict *opiDict);
|
214
|
+
virtual void opiEnd(GfxState *state, Dict *opiDict);
|
215
|
+
#endif
|
216
|
+
|
217
|
+
//----- Type 3 font operators
|
218
|
+
virtual void type3D0(GfxState *state, double wx, double wy);
|
219
|
+
virtual void type3D1(GfxState *state, double wx, double wy,
|
220
|
+
double llx, double lly, double urx, double ury);
|
221
|
+
|
222
|
+
//----- form XObjects
|
223
|
+
virtual void drawForm(Ref ref);
|
224
|
+
|
225
|
+
//----- PostScript XObjects
|
226
|
+
virtual void psXObject(Stream *psStream, Stream *level1Stream);
|
227
|
+
|
228
|
+
//----- miscellaneous
|
229
|
+
void setOffset(double x, double y)
|
230
|
+
{ tx0 = x; ty0 = y; }
|
231
|
+
void setScale(double x, double y)
|
232
|
+
{ xScale0 = x; yScale0 = y; }
|
233
|
+
void setRotate(int rotateA)
|
234
|
+
{ rotate0 = rotateA; }
|
235
|
+
void setClip(double llx, double lly, double urx, double ury)
|
236
|
+
{ clipLLX0 = llx; clipLLY0 = lly; clipURX0 = urx; clipURY0 = ury; }
|
237
|
+
void setUnderlayCbk(void (*cbk)(PSOutputDev *psOut, void *data),
|
238
|
+
void *data)
|
239
|
+
{ underlayCbk = cbk; underlayCbkData = data; }
|
240
|
+
void setOverlayCbk(void (*cbk)(PSOutputDev *psOut, void *data),
|
241
|
+
void *data)
|
242
|
+
{ overlayCbk = cbk; overlayCbkData = data; }
|
243
|
+
|
244
|
+
private:
|
245
|
+
|
246
|
+
void init(PSOutputFunc outputFuncA, void *outputStreamA,
|
247
|
+
PSFileType fileTypeA, XRef *xrefA, Catalog *catalog,
|
248
|
+
int firstPage, int lastPage, PSOutMode modeA,
|
249
|
+
int imgLLXA, int imgLLYA, int imgURXA, int imgURYA,
|
250
|
+
GBool manualCtrlA);
|
251
|
+
void setupResources(Dict *resDict);
|
252
|
+
void setupFonts(Dict *resDict);
|
253
|
+
void setupFont(GfxFont *font, Dict *parentResDict);
|
254
|
+
void setupEmbeddedType1Font(Ref *id, GString *psName);
|
255
|
+
void setupExternalType1Font(GString *fileName, GString *psName);
|
256
|
+
void setupEmbeddedType1CFont(GfxFont *font, Ref *id, GString *psName);
|
257
|
+
void setupEmbeddedOpenTypeT1CFont(GfxFont *font, Ref *id, GString *psName);
|
258
|
+
void setupEmbeddedTrueTypeFont(GfxFont *font, Ref *id, GString *psName);
|
259
|
+
void setupExternalTrueTypeFont(GfxFont *font, GString *psName);
|
260
|
+
void setupEmbeddedCIDType0Font(GfxFont *font, Ref *id, GString *psName);
|
261
|
+
void setupEmbeddedCIDTrueTypeFont(GfxFont *font, Ref *id, GString *psName,
|
262
|
+
GBool needVerticalMetrics);
|
263
|
+
void setupEmbeddedOpenTypeCFFFont(GfxFont *font, Ref *id, GString *psName);
|
264
|
+
void setupType3Font(GfxFont *font, GString *psName, Dict *parentResDict);
|
265
|
+
void setupImages(Dict *resDict);
|
266
|
+
void setupImage(Ref id, Stream *str);
|
267
|
+
void setupForms(Dict *resDict);
|
268
|
+
void setupForm(Ref id, Object *strObj);
|
269
|
+
void addProcessColor(double c, double m, double y, double k);
|
270
|
+
void addCustomColor(GfxSeparationColorSpace *sepCS);
|
271
|
+
void doPath(GfxPath *path);
|
272
|
+
void doImageL1(Object *ref, GfxImageColorMap *colorMap,
|
273
|
+
GBool invert, GBool inlineImg,
|
274
|
+
Stream *str, int width, int height, int len);
|
275
|
+
void doImageL1Sep(GfxImageColorMap *colorMap,
|
276
|
+
GBool invert, GBool inlineImg,
|
277
|
+
Stream *str, int width, int height, int len);
|
278
|
+
void doImageL2(Object *ref, GfxImageColorMap *colorMap,
|
279
|
+
GBool invert, GBool inlineImg,
|
280
|
+
Stream *str, int width, int height, int len,
|
281
|
+
int *maskColors, Stream *maskStr,
|
282
|
+
int maskWidth, int maskHeight, GBool maskInvert);
|
283
|
+
void doImageL3(Object *ref, GfxImageColorMap *colorMap,
|
284
|
+
GBool invert, GBool inlineImg,
|
285
|
+
Stream *str, int width, int height, int len,
|
286
|
+
int *maskColors, Stream *maskStr,
|
287
|
+
int maskWidth, int maskHeight, GBool maskInvert);
|
288
|
+
void dumpColorSpaceL2(GfxColorSpace *colorSpace,
|
289
|
+
GBool genXform, GBool updateColors,
|
290
|
+
GBool map01);
|
291
|
+
#if OPI_SUPPORT
|
292
|
+
void opiBegin20(GfxState *state, Dict *dict);
|
293
|
+
void opiBegin13(GfxState *state, Dict *dict);
|
294
|
+
void opiTransform(GfxState *state, double x0, double y0,
|
295
|
+
double *x1, double *y1);
|
296
|
+
GBool getFileSpec(Object *fileSpec, Object *fileName);
|
297
|
+
#endif
|
298
|
+
void cvtFunction(Function *func);
|
299
|
+
void writePSChar(char c);
|
300
|
+
void writePS(char *s);
|
301
|
+
void writePSFmt(const char *fmt, ...);
|
302
|
+
void writePSString(GString *s);
|
303
|
+
void writePSName(char *s);
|
304
|
+
GString *filterPSName(GString *name);
|
305
|
+
void writePSTextLine(GString *s);
|
306
|
+
|
307
|
+
PSLevel level; // PostScript level (1, 2, separation)
|
308
|
+
PSOutMode mode; // PostScript mode (PS, EPS, form)
|
309
|
+
int paperWidth; // width of paper, in pts
|
310
|
+
int paperHeight; // height of paper, in pts
|
311
|
+
int imgLLX, imgLLY, // imageable area, in pts
|
312
|
+
imgURX, imgURY;
|
313
|
+
GBool preload; // load all images into memory, and
|
314
|
+
// predefine forms
|
315
|
+
|
316
|
+
PSOutputFunc outputFunc;
|
317
|
+
void *outputStream;
|
318
|
+
PSFileType fileType; // file / pipe / stdout
|
319
|
+
GBool manualCtrl;
|
320
|
+
int seqPage; // current sequential page number
|
321
|
+
void (*underlayCbk)(PSOutputDev *psOut, void *data);
|
322
|
+
void *underlayCbkData;
|
323
|
+
void (*overlayCbk)(PSOutputDev *psOut, void *data);
|
324
|
+
void *overlayCbkData;
|
325
|
+
|
326
|
+
XRef *xref; // the xref table for this PDF file
|
327
|
+
|
328
|
+
Ref *fontIDs; // list of object IDs of all used fonts
|
329
|
+
int fontIDLen; // number of entries in fontIDs array
|
330
|
+
int fontIDSize; // size of fontIDs array
|
331
|
+
Ref *fontFileIDs; // list of object IDs of all embedded fonts
|
332
|
+
int fontFileIDLen; // number of entries in fontFileIDs array
|
333
|
+
int fontFileIDSize; // size of fontFileIDs array
|
334
|
+
GString **fontFileNames; // list of names of all embedded external fonts
|
335
|
+
int fontFileNameLen; // number of entries in fontFileNames array
|
336
|
+
int fontFileNameSize; // size of fontFileNames array
|
337
|
+
int nextTrueTypeNum; // next unique number to append to a TrueType
|
338
|
+
// font name
|
339
|
+
PSFont8Info *font8Info; // info for 8-bit fonts
|
340
|
+
int font8InfoLen; // number of entries in font8Info array
|
341
|
+
int font8InfoSize; // size of font8Info array
|
342
|
+
PSFont16Enc *font16Enc; // encodings for substitute 16-bit fonts
|
343
|
+
int font16EncLen; // number of entries in font16Enc array
|
344
|
+
int font16EncSize; // size of font16Enc array
|
345
|
+
Ref *imgIDs; // list of image IDs for in-memory images
|
346
|
+
int imgIDLen; // number of entries in imgIDs array
|
347
|
+
int imgIDSize; // size of imgIDs array
|
348
|
+
Ref *formIDs; // list of IDs for predefined forms
|
349
|
+
int formIDLen; // number of entries in formIDs array
|
350
|
+
int formIDSize; // size of formIDs array
|
351
|
+
GList *xobjStack; // stack of XObject dicts currently being
|
352
|
+
// processed
|
353
|
+
int numSaves; // current number of gsaves
|
354
|
+
int numTilingPatterns; // current number of nested tiling patterns
|
355
|
+
int nextFunc; // next unique number to use for a function
|
356
|
+
|
357
|
+
double tx0, ty0; // global translation
|
358
|
+
double xScale0, yScale0; // global scaling
|
359
|
+
int rotate0; // rotation angle (0, 90, 180, 270)
|
360
|
+
double clipLLX0, clipLLY0,
|
361
|
+
clipURX0, clipURY0;
|
362
|
+
double tx, ty; // global translation for current page
|
363
|
+
double xScale, yScale; // global scaling for current page
|
364
|
+
int rotate; // rotation angle for current page
|
365
|
+
double epsX1, epsY1, // EPS bounding box (unrotated)
|
366
|
+
epsX2, epsY2;
|
367
|
+
|
368
|
+
GString *embFontList; // resource comments for embedded fonts
|
369
|
+
|
370
|
+
int processColors; // used process colors
|
371
|
+
PSOutCustomColor // used custom colors
|
372
|
+
*customColors;
|
373
|
+
|
374
|
+
GBool haveTextClip; // set if text has been drawn with a
|
375
|
+
// clipping render mode
|
376
|
+
|
377
|
+
GBool inType3Char; // inside a Type 3 CharProc
|
378
|
+
GString *t3String; // Type 3 content string
|
379
|
+
double t3WX, t3WY, // Type 3 character parameters
|
380
|
+
t3LLX, t3LLY, t3URX, t3URY;
|
381
|
+
GBool t3Cacheable; // cleared if char is not cacheable
|
382
|
+
GBool t3NeedsRestore; // set if a 'q' operator was issued
|
383
|
+
|
384
|
+
#if OPI_SUPPORT
|
385
|
+
int opi13Nest; // nesting level of OPI 1.3 objects
|
386
|
+
int opi20Nest; // nesting level of OPI 2.0 objects
|
387
|
+
#endif
|
388
|
+
|
389
|
+
GBool ok; // set up ok?
|
390
|
+
|
391
|
+
|
392
|
+
friend class WinPDFPrinter;
|
393
|
+
};
|
394
|
+
|
395
|
+
#endif
|
Binary file
|
@@ -0,0 +1,135 @@
|
|
1
|
+
//========================================================================
|
2
|
+
//
|
3
|
+
// PSTokenizer.cc
|
4
|
+
//
|
5
|
+
// Copyright 2002-2003 Glyph & Cog, LLC
|
6
|
+
//
|
7
|
+
//========================================================================
|
8
|
+
|
9
|
+
#include <aconf.h>
|
10
|
+
|
11
|
+
#ifdef USE_GCC_PRAGMAS
|
12
|
+
#pragma implementation
|
13
|
+
#endif
|
14
|
+
|
15
|
+
#include <stdio.h>
|
16
|
+
#include <stdlib.h>
|
17
|
+
#include "PSTokenizer.h"
|
18
|
+
|
19
|
+
//------------------------------------------------------------------------
|
20
|
+
|
21
|
+
// A '1' in this array means the character is white space. A '1' or
|
22
|
+
// '2' means the character ends a name or command.
|
23
|
+
static char specialChars[256] = {
|
24
|
+
1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, // 0x
|
25
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1x
|
26
|
+
1, 0, 0, 0, 0, 2, 0, 0, 2, 2, 0, 0, 0, 0, 0, 2, // 2x
|
27
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, // 3x
|
28
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 4x
|
29
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, // 5x
|
30
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 6x
|
31
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, // 7x
|
32
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 8x
|
33
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 9x
|
34
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // ax
|
35
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // bx
|
36
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // cx
|
37
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // dx
|
38
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // ex
|
39
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 // fx
|
40
|
+
};
|
41
|
+
|
42
|
+
//------------------------------------------------------------------------
|
43
|
+
|
44
|
+
PSTokenizer::PSTokenizer(int (*getCharFuncA)(void *), void *dataA) {
|
45
|
+
getCharFunc = getCharFuncA;
|
46
|
+
data = dataA;
|
47
|
+
charBuf = -1;
|
48
|
+
}
|
49
|
+
|
50
|
+
PSTokenizer::~PSTokenizer() {
|
51
|
+
}
|
52
|
+
|
53
|
+
GBool PSTokenizer::getToken(char *buf, int size, int *length) {
|
54
|
+
GBool comment, backslash;
|
55
|
+
int c;
|
56
|
+
int i;
|
57
|
+
|
58
|
+
// skip whitespace and comments
|
59
|
+
comment = gFalse;
|
60
|
+
while (1) {
|
61
|
+
if ((c = getChar()) == EOF) {
|
62
|
+
buf[0] = '\0';
|
63
|
+
*length = 0;
|
64
|
+
return gFalse;
|
65
|
+
}
|
66
|
+
if (comment) {
|
67
|
+
if (c == '\x0a' || c == '\x0d') {
|
68
|
+
comment = gFalse;
|
69
|
+
}
|
70
|
+
} else if (c == '%') {
|
71
|
+
comment = gTrue;
|
72
|
+
} else if (specialChars[c] != 1) {
|
73
|
+
break;
|
74
|
+
}
|
75
|
+
}
|
76
|
+
|
77
|
+
// read a token
|
78
|
+
i = 0;
|
79
|
+
buf[i++] = c;
|
80
|
+
if (c == '(') {
|
81
|
+
backslash = gFalse;
|
82
|
+
while ((c = lookChar()) != EOF) {
|
83
|
+
if (i < size - 1) {
|
84
|
+
buf[i++] = c;
|
85
|
+
}
|
86
|
+
getChar();
|
87
|
+
if (c == '\\') {
|
88
|
+
backslash = gTrue;
|
89
|
+
} else if (!backslash && c == ')') {
|
90
|
+
break;
|
91
|
+
} else {
|
92
|
+
backslash = gFalse;
|
93
|
+
}
|
94
|
+
}
|
95
|
+
} else if (c == '<') {
|
96
|
+
while ((c = lookChar()) != EOF) {
|
97
|
+
getChar();
|
98
|
+
if (i < size - 1 && specialChars[c] != 1) {
|
99
|
+
buf[i++] = c;
|
100
|
+
}
|
101
|
+
if (c == '>') {
|
102
|
+
break;
|
103
|
+
}
|
104
|
+
}
|
105
|
+
} else if (c != '[' && c != ']') {
|
106
|
+
while ((c = lookChar()) != EOF && !specialChars[c]) {
|
107
|
+
getChar();
|
108
|
+
if (i < size - 1) {
|
109
|
+
buf[i++] = c;
|
110
|
+
}
|
111
|
+
}
|
112
|
+
}
|
113
|
+
buf[i] = '\0';
|
114
|
+
*length = i;
|
115
|
+
|
116
|
+
return gTrue;
|
117
|
+
}
|
118
|
+
|
119
|
+
int PSTokenizer::lookChar() {
|
120
|
+
if (charBuf < 0) {
|
121
|
+
charBuf = (*getCharFunc)(data);
|
122
|
+
}
|
123
|
+
return charBuf;
|
124
|
+
}
|
125
|
+
|
126
|
+
int PSTokenizer::getChar() {
|
127
|
+
int c;
|
128
|
+
|
129
|
+
if (charBuf < 0) {
|
130
|
+
charBuf = (*getCharFunc)(data);
|
131
|
+
}
|
132
|
+
c = charBuf;
|
133
|
+
charBuf = -1;
|
134
|
+
return c;
|
135
|
+
}
|