summaryrefslogtreecommitdiff
path: root/Build/source/libs/poppler/poppler-0.12.4/utils
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/libs/poppler/poppler-0.12.4/utils')
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/utils/CMakeLists.txt84
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/utils/HtmlFonts.cc360
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/utils/HtmlFonts.h97
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/utils/HtmlLinks.cc156
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/utils/HtmlLinks.h61
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/utils/HtmlOutputDev.cc1672
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/utils/HtmlOutputDev.h329
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/utils/ImageOutputDev.cc246
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/utils/ImageOutputDev.h106
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/utils/Makefile.am101
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/utils/Makefile.in876
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/utils/parseargs.c208
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/utils/parseargs.h85
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/utils/pdf2xml.dtd28
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/utils/pdffonts.1110
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/utils/pdffonts.cc320
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/utils/pdfimages.182
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/utils/pdfimages.cc171
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/utils/pdfinfo.1137
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/utils/pdfinfo.cc410
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/utils/pdftoabw.cc193
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/utils/pdftohtml.185
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/utils/pdftohtml.cc442
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/utils/pdftoppm.1128
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/utils/pdftoppm.cc325
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/utils/pdftops.1211
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/utils/pdftops.cc382
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/utils/pdftotext.1126
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/utils/pdftotext.cc398
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/utils/printencodings.cc34
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/utils/printencodings.h24
31 files changed, 0 insertions, 7987 deletions
diff --git a/Build/source/libs/poppler/poppler-0.12.4/utils/CMakeLists.txt b/Build/source/libs/poppler/poppler-0.12.4/utils/CMakeLists.txt
deleted file mode 100644
index f5d4911fdea..00000000000
--- a/Build/source/libs/poppler/poppler-0.12.4/utils/CMakeLists.txt
+++ /dev/null
@@ -1,84 +0,0 @@
-
-set(common_srcs
- parseargs.c
-)
-set(common_libs
- poppler
-)
-if (FONTCONFIG_FOUND)
- set(common_libs ${common_libs} ${FONTCONFIG_LIBRARIES})
-endif (FONTCONFIG_FOUND)
-
-if (ENABLE_SPLASH)
- # pdftoppm
- set(pdftoppm_SOURCES ${common_srcs}
- pdftoppm.cc
- )
- add_executable(pdftoppm ${pdftoppm_SOURCES})
- target_link_libraries(pdftoppm ${common_libs})
- install(TARGETS pdftoppm DESTINATION bin)
-endif (ENABLE_SPLASH)
-
-# pdffonts
-set(pdffonts_SOURCES ${common_srcs}
- pdffonts.cc
-)
-add_executable(pdffonts ${pdffonts_SOURCES})
-target_link_libraries(pdffonts ${common_libs})
-install(TARGETS pdffonts DESTINATION bin)
-
-# pdfimages
-set(pdfimages_SOURCES ${common_srcs}
- pdfimages.cc
- ImageOutputDev.cc
- ImageOutputDev.h
-)
-add_executable(pdfimages ${pdfimages_SOURCES})
-target_link_libraries(pdfimages ${common_libs})
-install(TARGETS pdfimages DESTINATION bin)
-
-# pdfinfo
-set(pdfinfo_SOURCES ${common_srcs}
- pdfinfo.cc printencodings.cc
-)
-add_executable(pdfinfo ${pdfinfo_SOURCES})
-target_link_libraries(pdfinfo ${common_libs})
-install(TARGETS pdfinfo DESTINATION bin)
-
-# pdftops
-set(pdftops_SOURCES ${common_srcs}
- pdftops.cc
-)
-add_executable(pdftops ${pdftops_SOURCES})
-target_link_libraries(pdftops ${common_libs})
-install(TARGETS pdftops DESTINATION bin)
-
-# pdftotext
-set(pdftotext_SOURCES ${common_srcs}
- pdftotext.cc printencodings.cc
-)
-add_executable(pdftotext ${pdftotext_SOURCES})
-target_link_libraries(pdftotext ${common_libs})
-install(TARGETS pdftotext DESTINATION bin)
-
-# pdftohtml
-set(pdftohtml_SOURCES ${common_srcs}
- pdftohtml.cc
- HtmlFonts.cc
- HtmlLinks.cc
- HtmlOutputDev.cc
-)
-add_executable(pdftohtml ${pdftohtml_SOURCES})
-target_link_libraries(pdftohtml ${common_libs})
-install(TARGETS pdftohtml DESTINATION bin)
-
-if (ENABLE_ABIWORD)
- # pdftoabw
- set(pdftoabw_SOURCES ${common_srcs}
- pdftoabw.cc
- )
- add_executable(pdftoabw ${pdftoabw_SOURCES})
- target_link_libraries(pdftoabw ${common_libs})
- install(TARGETS pdftoabw DESTINATION bin)
-endif (ENABLE_ABIWORD)
-
diff --git a/Build/source/libs/poppler/poppler-0.12.4/utils/HtmlFonts.cc b/Build/source/libs/poppler/poppler-0.12.4/utils/HtmlFonts.cc
deleted file mode 100644
index d2cbfd5363a..00000000000
--- a/Build/source/libs/poppler/poppler-0.12.4/utils/HtmlFonts.cc
+++ /dev/null
@@ -1,360 +0,0 @@
-//========================================================================
-//
-// This file comes from pdftohtml project
-// http://pdftohtml.sourceforge.net
-//
-// Copyright from:
-// Gueorgui Ovtcharov
-// Rainer Dorsch <http://www.ra.informatik.uni-stuttgart.de/~rainer/>
-// Mikhail Kruk <meshko@cs.brandeis.edu>
-//
-//========================================================================
-
-//========================================================================
-//
-// Modified under the Poppler project - http://poppler.freedesktop.org
-//
-// All changes made under the Poppler project to this file are licensed
-// under GPL version 2 or later
-//
-// Copyright (C) 2007 Albert Astals Cid <aacid@kde.org>
-// Copyright (C) 2008 Boris Toloknov <tlknv@yandex.ru>
-// Copyright (C) 2008 Tomas Are Haavet <tomasare@gmail.com>
-//
-// To see a description of the changes please see the Changelog file that
-// came with your tarball or type make ChangeLog if you are building from git
-//
-//========================================================================
-
-#include "HtmlFonts.h"
-#include "GlobalParams.h"
-#include "UnicodeMap.h"
-#include <stdio.h>
-
- struct Fonts{
- char *Fontname;
- char *name;
- };
-
-const int font_num=13;
-
-static Fonts fonts[font_num+1]={
- {"Courier", "Courier" },
- {"Courier-Bold", "Courier"},
- {"Courier-BoldOblique", "Courier"},
- {"Courier-Oblique", "Courier"},
- {"Helvetica", "Helvetica"},
- {"Helvetica-Bold", "Helvetica"},
- {"Helvetica-BoldOblique", "Helvetica"},
- {"Helvetica-Oblique", "Helvetica"},
- {"Symbol", "Symbol" },
- {"Times-Bold", "Times" },
- {"Times-BoldItalic", "Times" },
- {"Times-Italic", "Times" },
- {"Times-Roman", "Times" },
- {" " , "Times" },
-};
-
-#define xoutRound(x) ((int)(x + 0.5))
-extern GBool xml;
-
-GooString* HtmlFont::DefaultFont=new GooString("Times"); // Arial,Helvetica,sans-serif
-
-HtmlFontColor::HtmlFontColor(GfxRGB rgb){
- r=static_cast<int>(rgb.r/65535.0*255.0);
- g=static_cast<int>(rgb.g/65535.0*255.0);
- b=static_cast<int>(rgb.b/65535.0*255.0);
- if (!(Ok(r)&&Ok(b)&&Ok(g))) {
- if (!globalParams->getErrQuiet()) fprintf(stderr, "Error : Bad color (%d,%d,%d) reset to (0,0,0)\n", r, g, b);
- r=0;g=0;b=0;
- }
-}
-
-GooString *HtmlFontColor::convtoX(unsigned int xcol) const{
- GooString *xret=new GooString();
- char tmp;
- unsigned int k;
- k = (xcol/16);
- if ((k>=0)&&(k<10)) tmp=(char) ('0'+k); else tmp=(char)('a'+k-10);
- xret->append(tmp);
- k = (xcol%16);
- if ((k>=0)&&(k<10)) tmp=(char) ('0'+k); else tmp=(char)('a'+k-10);
- xret->append(tmp);
- return xret;
-}
-
-GooString *HtmlFontColor::toString() const{
- GooString *tmp=new GooString("#");
- GooString *tmpr=convtoX(r);
- GooString *tmpg=convtoX(g);
- GooString *tmpb=convtoX(b);
- tmp->append(tmpr);
- tmp->append(tmpg);
- tmp->append(tmpb);
- delete tmpr;
- delete tmpg;
- delete tmpb;
- return tmp;
-}
-
-HtmlFont::HtmlFont(GooString* ftname,int _size, GfxRGB rgb){
- //if (col) color=HtmlFontColor(col);
- //else color=HtmlFontColor();
- color=HtmlFontColor(rgb);
-
- GooString *fontname = NULL;
-
- if( ftname ){
- fontname = new GooString(ftname);
- FontName=new GooString(ftname);
- }
- else {
- fontname = NULL;
- FontName = NULL;
- }
-
- lineSize = -1;
-
- size=(_size-1);
- italic = gFalse;
- bold = gFalse;
-
- if (fontname){
- if (strstr(fontname->lowerCase()->getCString(),"bold")) bold=gTrue;
-
- if (strstr(fontname->lowerCase()->getCString(),"italic")||
- strstr(fontname->lowerCase()->getCString(),"oblique")) italic=gTrue;
-
- int i=0;
- while (strcmp(ftname->getCString(),fonts[i].Fontname)&&(i<font_num))
- {
- i++;
- }
- pos=i;
- delete fontname;
- } else
- pos = font_num;
- if (!DefaultFont) DefaultFont=new GooString(fonts[font_num].name);
-
-}
-
-HtmlFont::HtmlFont(const HtmlFont& x){
- size=x.size;
- lineSize=x.lineSize;
- italic=x.italic;
- bold=x.bold;
- pos=x.pos;
- color=x.color;
- if (x.FontName) FontName=new GooString(x.FontName);
- }
-
-
-HtmlFont::~HtmlFont(){
- if (FontName) delete FontName;
-}
-
-HtmlFont& HtmlFont::operator=(const HtmlFont& x){
- if (this==&x) return *this;
- size=x.size;
- lineSize=x.lineSize;
- italic=x.italic;
- bold=x.bold;
- pos=x.pos;
- color=x.color;
- if (FontName) delete FontName;
- if (x.FontName) FontName=new GooString(x.FontName);
- return *this;
-}
-
-void HtmlFont::clear(){
- if(DefaultFont) delete DefaultFont;
- DefaultFont = NULL;
-}
-
-
-
-/*
- This function is used to compare font uniquily for insertion into
- the list of all encountered fonts
-*/
-GBool HtmlFont::isEqual(const HtmlFont& x) const{
- return ((size==x.size) &&
- (lineSize==x.lineSize) &&
- (pos==x.pos) && (bold==x.bold) && (italic==x.italic) &&
- (color.isEqual(x.getColor())));
-}
-
-/*
- This one is used to decide whether two pieces of text can be joined together
- and therefore we don't care about bold/italics properties
-*/
-GBool HtmlFont::isEqualIgnoreBold(const HtmlFont& x) const{
- return ((size==x.size) &&
- (!strcmp(fonts[pos].name, fonts[x.pos].name)) &&
- (color.isEqual(x.getColor())));
-}
-
-GooString* HtmlFont::getFontName(){
- if (pos!=font_num) return new GooString(fonts[pos].name);
- else return new GooString(DefaultFont);
-}
-
-GooString* HtmlFont::getFullName(){
- if (FontName)
- return new GooString(FontName);
- else return new GooString(DefaultFont);
-}
-
-void HtmlFont::setDefaultFont(GooString* defaultFont){
- if (DefaultFont) delete DefaultFont;
- DefaultFont=new GooString(defaultFont);
-}
-
-
-GooString* HtmlFont::getDefaultFont(){
- return DefaultFont;
-}
-
-// this method if plain wrong todo
-GooString* HtmlFont::HtmlFilter(Unicode* u, int uLen) {
- GooString *tmp = new GooString();
- UnicodeMap *uMap;
- char buf[8];
- int n;
-
- // get the output encoding
- if (!(uMap = globalParams->getTextEncoding())) {
- return tmp;
- }
-
- for (int i = 0; i < uLen; ++i) {
- switch (u[i])
- {
- case '"': tmp->append("&quot;"); break;
- case '&': tmp->append("&amp;"); break;
- case '<': tmp->append("&lt;"); break;
- case '>': tmp->append("&gt;"); break;
- case ' ': tmp->append( !xml && ( i+1 >= uLen || !tmp->getLength() || tmp->getChar( tmp->getLength()-1 ) == ' ' ) ? "&nbsp;" : " " );
- break;
- default:
- {
- // convert unicode to string
- if ((n = uMap->mapUnicode(u[i], buf, sizeof(buf))) > 0) {
- tmp->append(buf, n);
- }
- }
- }
- }
-
- uMap->decRefCnt();
- return tmp;
-}
-
-GooString* HtmlFont::simple(HtmlFont* font, Unicode* content, int uLen){
- GooString *cont=HtmlFilter (content, uLen);
-
- /*if (font.isBold()) {
- cont->insert(0,"<b>",3);
- cont->append("</b>",4);
- }
- if (font.isItalic()) {
- cont->insert(0,"<i>",3);
- cont->append("</i>",4);
- } */
-
- return cont;
-}
-
-HtmlFontAccu::HtmlFontAccu(){
- accu=new GooVector<HtmlFont>();
-}
-
-HtmlFontAccu::~HtmlFontAccu(){
- if (accu) delete accu;
-}
-
-int HtmlFontAccu::AddFont(const HtmlFont& font){
- GooVector<HtmlFont>::iterator i;
- for (i=accu->begin();i!=accu->end();i++)
- {
- if (font.isEqual(*i))
- {
- return (int)(i-(accu->begin()));
- }
- }
-
- accu->push_back(font);
- return (accu->size()-1);
-}
-
-// get CSS font name for font #i
-GooString* HtmlFontAccu::getCSStyle(int i, GooString* content){
- GooString *tmp;
- GooString *iStr=GooString::fromInt(i);
-
- if (!xml) {
- tmp = new GooString("<span class=\"ft");
- tmp->append(iStr);
- tmp->append("\">");
- tmp->append(content);
- tmp->append("</span>");
- } else {
- tmp = new GooString("");
- tmp->append(content);
- }
-
- delete iStr;
- return tmp;
-}
-
-// get CSS font definition for font #i
-GooString* HtmlFontAccu::CSStyle(int i){
- GooString *tmp=new GooString();
- GooString *iStr=GooString::fromInt(i);
-
- GooVector<HtmlFont>::iterator g=accu->begin();
- g+=i;
- HtmlFont font=*g;
- GooString *Size=GooString::fromInt(font.getSize());
- GooString *colorStr=font.getColor().toString();
- GooString *fontName=font.getFontName();
- GooString *lSize;
-
- if(!xml){
- tmp->append(".ft");
- tmp->append(iStr);
- tmp->append("{font-size:");
- tmp->append(Size);
- if( font.getLineSize() != -1 )
- {
- lSize = GooString::fromInt(font.getLineSize());
- tmp->append("px;line-height:");
- tmp->append(lSize);
- delete lSize;
- }
- tmp->append("px;font-family:");
- tmp->append(fontName); //font.getFontName());
- tmp->append(";color:");
- tmp->append(colorStr);
- tmp->append(";}");
- }
- if (xml) {
- tmp->append("<fontspec id=\"");
- tmp->append(iStr);
- tmp->append("\" size=\"");
- tmp->append(Size);
- tmp->append("\" family=\"");
- tmp->append(fontName); //font.getFontName());
- tmp->append("\" color=\"");
- tmp->append(colorStr);
- tmp->append("\"/>");
- }
-
- delete fontName;
- delete colorStr;
- delete iStr;
- delete Size;
- return tmp;
-}
-
-
diff --git a/Build/source/libs/poppler/poppler-0.12.4/utils/HtmlFonts.h b/Build/source/libs/poppler/poppler-0.12.4/utils/HtmlFonts.h
deleted file mode 100644
index df2b5706eb3..00000000000
--- a/Build/source/libs/poppler/poppler-0.12.4/utils/HtmlFonts.h
+++ /dev/null
@@ -1,97 +0,0 @@
-//========================================================================
-//
-// This file comes from pdftohtml project
-// http://pdftohtml.sourceforge.net
-//
-// Copyright from:
-// Gueorgui Ovtcharov
-// Rainer Dorsch <http://www.ra.informatik.uni-stuttgart.de/~rainer/>
-// Mikhail Kruk <meshko@cs.brandeis.edu>
-//
-//========================================================================
-
-#ifndef _HTML_FONTS_H
-#define _HTML_FONTS_H
-#include "goo/GooVector.h"
-#include "goo/GooString.h"
-#include "GfxState.h"
-#include "CharTypes.h"
-
-
-class HtmlFontColor{
- private:
- unsigned int r;
- unsigned int g;
- unsigned int b;
- GBool Ok(unsigned int xcol){ return ((xcol<=255)&&(xcol>=0));}
- GooString *convtoX(unsigned int xcol) const;
- public:
- HtmlFontColor():r(0),g(0),b(0){}
- HtmlFontColor(GfxRGB rgb);
- HtmlFontColor(const HtmlFontColor& x){r=x.r;g=x.g;b=x.b;}
- HtmlFontColor& operator=(const HtmlFontColor &x){
- r=x.r;g=x.g;b=x.b;
- return *this;
- }
- ~HtmlFontColor(){};
- GooString* toString() const;
- GBool isEqual(const HtmlFontColor& col) const{
- return ((r==col.r)&&(g==col.g)&&(b==col.b));
- }
-} ;
-
-
-class HtmlFont{
- private:
- unsigned int size;
- int lineSize;
- GBool italic;
- GBool bold;
- int pos; // position of the font name in the fonts array
- static GooString *DefaultFont;
- GooString *FontName;
- HtmlFontColor color;
- static GooString* HtmlFilter(Unicode* u, int uLen); //char* s);
-public:
-
- HtmlFont(){FontName=NULL;};
- HtmlFont(GooString* fontname,int _size, GfxRGB rgb);
- HtmlFont(const HtmlFont& x);
- HtmlFont& operator=(const HtmlFont& x);
- HtmlFontColor getColor() const {return color;}
- ~HtmlFont();
- static void clear();
- GooString* getFullName();
- GBool isItalic() const {return italic;}
- GBool isBold() const {return bold;}
- unsigned int getSize() const {return size;}
- int getLineSize() const {return lineSize;}
- void setLineSize(int _lineSize) { lineSize = _lineSize; }
- GooString* getFontName();
- static GooString* getDefaultFont();
- static void setDefaultFont(GooString* defaultFont);
- GBool isEqual(const HtmlFont& x) const;
- GBool isEqualIgnoreBold(const HtmlFont& x) const;
- static GooString* simple(HtmlFont *font, Unicode *content, int uLen);
- void print() const {printf("font: %s %d %s%spos: %d\n", FontName->getCString(), size, bold ? "bold " : "", italic ? "italic " : "", pos);};
-};
-
-class HtmlFontAccu{
-private:
- GooVector<HtmlFont> *accu;
-
-public:
- HtmlFontAccu();
- ~HtmlFontAccu();
- int AddFont(const HtmlFont& font);
- HtmlFont* Get(int i){
- GooVector<HtmlFont>::iterator g=accu->begin();
- g+=i;
- return g;
- }
- GooString* getCSStyle (int i, GooString* content);
- GooString* CSStyle(int i);
- int size() const {return accu->size();}
-
-};
-#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/utils/HtmlLinks.cc b/Build/source/libs/poppler/poppler-0.12.4/utils/HtmlLinks.cc
deleted file mode 100644
index 0fd093c5f4d..00000000000
--- a/Build/source/libs/poppler/poppler-0.12.4/utils/HtmlLinks.cc
+++ /dev/null
@@ -1,156 +0,0 @@
-//========================================================================
-//
-// This file comes from pdftohtml project
-// http://pdftohtml.sourceforge.net
-//
-// Copyright from:
-// Gueorgui Ovtcharov
-// Rainer Dorsch <http://www.ra.informatik.uni-stuttgart.de/~rainer/>
-// Mikhail Kruk <meshko@cs.brandeis.edu>
-//
-//========================================================================
-
-//========================================================================
-//
-// Modified under the Poppler project - http://poppler.freedesktop.org
-//
-// All changes made under the Poppler project to this file are licensed
-// under GPL version 2 or later
-//
-// Copyright (C) 2008 Boris Toloknov <tlknv@yandex.ru>
-//
-// To see a description of the changes please see the Changelog file that
-// came with your tarball or type make ChangeLog if you are building from git
-//
-//========================================================================
-
-#include "HtmlLinks.h"
-
-extern GBool xml;
-
-HtmlLink::HtmlLink(const HtmlLink& x){
- Xmin=x.Xmin;
- Ymin=x.Ymin;
- Xmax=x.Xmax;
- Ymax=x.Ymax;
- dest=new GooString(x.dest);
-}
-
-HtmlLink::HtmlLink(double xmin,double ymin,double xmax,double ymax,GooString * _dest)
-{
- if (xmin < xmax) {
- Xmin=xmin;
- Xmax=xmax;
- } else {
- Xmin=xmax;
- Xmax=xmin;
- }
- if (ymin < ymax) {
- Ymin=ymin;
- Ymax=ymax;
- } else {
- Ymin=ymax;
- Ymax=ymin;
- }
- dest=new GooString(_dest);
-}
-
-HtmlLink::~HtmlLink(){
- if (dest) delete dest;
-}
-
-GBool HtmlLink::isEqualDest(const HtmlLink& x) const{
- return (!strcmp(dest->getCString(), x.dest->getCString()));
-}
-
-GBool HtmlLink::inLink(double xmin,double ymin,double xmax,double ymax) const {
- double y=(ymin+ymax)/2;
- if (y>Ymax) return gFalse;
- return (y>Ymin)&&(xmin<Xmax)&&(xmax>Xmin);
- }
-
-
-HtmlLink& HtmlLink::operator=(const HtmlLink& x){
- if (this==&x) return *this;
- if (dest) {delete dest;dest=NULL;}
- Xmin=x.Xmin;
- Ymin=x.Ymin;
- Xmax=x.Xmax;
- Ymax=x.Ymax;
- dest=new GooString(x.dest);
- return *this;
-}
-
-static GooString* EscapeSpecialChars( GooString* s )
-{
- GooString* tmp = NULL;
- for( int i = 0, j = 0; i < s->getLength(); i++, j++ ){
- const char *replace = NULL;
- switch ( s->getChar(i) ){
- case '"': replace = "&quot;"; break;
- case '&': replace = "&amp;"; break;
- case '<': replace = "&lt;"; break;
- case '>': replace = "&gt;"; break;
- default: continue;
- }
- if( replace ){
- if( !tmp ) tmp = new GooString( s );
- if( tmp ){
- tmp->del( j, 1 );
- int l = strlen( replace );
- tmp->insert( j, replace, l );
- j += l - 1;
- }
- }
- }
- return tmp ? tmp : s;
-}
-
-GooString* HtmlLink::getLinkStart() {
- GooString *res = new GooString("<a href=\"");
- GooString *d = xml ? EscapeSpecialChars(dest) : dest;
- res->append( d );
- if( d != dest ) delete d;
- res->append("\">");
- return res;
-}
-
-/*GooString* HtmlLink::Link(GooString* content){
- //GooString* _dest=new GooString(dest);
- GooString *tmp=new GooString("<a href=\"");
- tmp->append(dest);
- tmp->append("\">");
- tmp->append(content);
- tmp->append("</a>");
- //delete _dest;
- return tmp;
- }*/
-
-
-
-HtmlLinks::HtmlLinks(){
- accu=new GooVector<HtmlLink>();
-}
-
-HtmlLinks::~HtmlLinks(){
- delete accu;
- accu=NULL;
-}
-
-GBool HtmlLinks::inLink(double xmin,double ymin,double xmax,double ymax,int& p)const {
-
- for(GooVector<HtmlLink>::iterator i=accu->begin();i!=accu->end();i++){
- if (i->inLink(xmin,ymin,xmax,ymax)) {
- p=(i - accu->begin());
- return 1;
- }
- }
- return 0;
-}
-
-HtmlLink* HtmlLinks::getLink(int i) const{
- GooVector<HtmlLink>::iterator g=accu->begin();
- g+=i;
- return g;
-}
-
diff --git a/Build/source/libs/poppler/poppler-0.12.4/utils/HtmlLinks.h b/Build/source/libs/poppler/poppler-0.12.4/utils/HtmlLinks.h
deleted file mode 100644
index 571c2a70f0f..00000000000
--- a/Build/source/libs/poppler/poppler-0.12.4/utils/HtmlLinks.h
+++ /dev/null
@@ -1,61 +0,0 @@
-//========================================================================
-//
-// This file comes from pdftohtml project
-// http://pdftohtml.sourceforge.net
-//
-// Copyright from:
-// Gueorgui Ovtcharov
-// Rainer Dorsch <http://www.ra.informatik.uni-stuttgart.de/~rainer/>
-// Mikhail Kruk <meshko@cs.brandeis.edu>
-//
-//========================================================================
-
-#ifndef _HTML_LINKS
-#define _HTML_LINKS
-
-#include <stdlib.h>
-#include <string.h>
-#include "goo/GooVector.h"
-#include "goo/GooString.h"
-
-class HtmlLink{
-
-private:
- double Xmin;
- double Ymin;
- double Xmax;
- double Ymax;
- GooString* dest;
-
-public:
- HtmlLink(){dest=NULL;}
- HtmlLink(const HtmlLink& x);
- HtmlLink& operator=(const HtmlLink& x);
- HtmlLink(double xmin,double ymin,double xmax,double ymax,GooString *_dest);
- ~HtmlLink();
- GBool isEqualDest(const HtmlLink& x) const;
- GooString *getDest(){return new GooString(dest);}
- double getX1() const {return Xmin;}
- double getX2() const {return Xmax;}
- double getY1() const {return Ymin;}
- double getY2() const {return Ymax;}
- GBool inLink(double xmin,double ymin,double xmax,double ymax) const ;
- //GooString *Link(GooString *content);
- GooString* getLinkStart();
-
-};
-
-class HtmlLinks{
-private:
- GooVector<HtmlLink> *accu;
-public:
- HtmlLinks();
- ~HtmlLinks();
- void AddLink(const HtmlLink& x) {accu->push_back(x);}
- GBool inLink(double xmin,double ymin,double xmax,double ymax,int& p) const;
- HtmlLink* getLink(int i) const;
-
-};
-
-#endif
-
diff --git a/Build/source/libs/poppler/poppler-0.12.4/utils/HtmlOutputDev.cc b/Build/source/libs/poppler/poppler-0.12.4/utils/HtmlOutputDev.cc
deleted file mode 100644
index 64f5098bc5f..00000000000
--- a/Build/source/libs/poppler/poppler-0.12.4/utils/HtmlOutputDev.cc
+++ /dev/null
@@ -1,1672 +0,0 @@
-//========================================================================
-//
-// HtmlOutputDev.cc
-//
-// Copyright 1997-2002 Glyph & Cog, LLC
-//
-// Changed 1999-2000 by G.Ovtcharov
-//
-// Changed 2002 by Mikhail Kruk
-//
-//========================================================================
-
-//========================================================================
-//
-// Modified under the Poppler project - http://poppler.freedesktop.org
-//
-// All changes made under the Poppler project to this file are licensed
-// under GPL version 2 or later
-//
-// Copyright (C) 2005-2009 Albert Astals Cid <aacid@kde.org>
-// Copyright (C) 2008 Kjartan Maraas <kmaraas@gnome.org>
-// Copyright (C) 2008 Boris Toloknov <tlknv@yandex.ru>
-// Copyright (C) 2008 Haruyuki Kawabe <Haruyuki.Kawabe@unisys.co.jp>
-// Copyright (C) 2008 Tomas Are Haavet <tomasare@gmail.com>
-// Copyright (C) 2009 Warren Toomey <wkt@tuhs.org>
-// Copyright (C) 2009 Carlos Garcia Campos <carlosgc@gnome.org>
-//
-// To see a description of the changes please see the Changelog file that
-// came with your tarball or type make ChangeLog if you are building from git
-//
-//========================================================================
-
-#ifdef __GNUC__
-#pragma implementation
-#endif
-
-#include "config.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <stddef.h>
-#include <ctype.h>
-#include <math.h>
-#include "goo/GooString.h"
-#include "goo/GooList.h"
-#include "UnicodeMap.h"
-#include "goo/gmem.h"
-#include "Error.h"
-#include "GfxState.h"
-#include "Page.h"
-#ifdef ENABLE_LIBJPEG
-#include "DCTStream.h"
-#endif
-#include "GlobalParams.h"
-#include "HtmlOutputDev.h"
-#include "HtmlFonts.h"
-#include "PNGWriter.h"
-
-int HtmlPage::pgNum=0;
-int HtmlOutputDev::imgNum=1;
-GooList *HtmlOutputDev::imgList=new GooList();
-
-extern double scale;
-extern GBool complexMode;
-extern GBool ignore;
-extern GBool printCommands;
-extern GBool printHtml;
-extern GBool noframes;
-extern GBool stout;
-extern GBool xml;
-extern GBool showHidden;
-extern GBool noMerge;
-
-static GooString* basename(GooString* str){
-
- char *p=str->getCString();
- int len=str->getLength();
- for (int i=len-1;i>=0;i--)
- if (*(p+i)==SLASH)
- return new GooString((p+i+1),len-i-1);
- return new GooString(str);
-}
-
-#if 0
-static GooString* Dirname(GooString* str){
-
- char *p=str->getCString();
- int len=str->getLength();
- for (int i=len-1;i>=0;i--)
- if (*(p+i)==SLASH)
- return new GooString(p,i+1);
- return new GooString();
-}
-#endif
-
-//------------------------------------------------------------------------
-// HtmlString
-//------------------------------------------------------------------------
-
-HtmlString::HtmlString(GfxState *state, double fontSize, HtmlFontAccu* fonts) {
- GfxFont *font;
- double x, y;
-
- state->transform(state->getCurX(), state->getCurY(), &x, &y);
- if ((font = state->getFont())) {
- double ascent = font->getAscent();
- double descent = font->getDescent();
- if( ascent > 1.05 ){
- //printf( "ascent=%.15g is too high, descent=%.15g\n", ascent, descent );
- ascent = 1.05;
- }
- if( descent < -0.4 ){
- //printf( "descent %.15g is too low, ascent=%.15g\n", descent, ascent );
- descent = -0.4;
- }
- yMin = y - ascent * fontSize;
- yMax = y - descent * fontSize;
- GfxRGB rgb;
- state->getFillRGB(&rgb);
- GooString *name = state->getFont()->getName();
- if (!name) name = HtmlFont::getDefaultFont(); //new GooString("default");
- HtmlFont hfont=HtmlFont(name, static_cast<int>(fontSize-1), rgb);
- fontpos = fonts->AddFont(hfont);
- } else {
- // this means that the PDF file draws text without a current font,
- // which should never happen
- yMin = y - 0.95 * fontSize;
- yMax = y + 0.35 * fontSize;
- fontpos=0;
- }
- if (yMin == yMax) {
- // this is a sanity check for a case that shouldn't happen -- but
- // if it does happen, we want to avoid dividing by zero later
- yMin = y;
- yMax = y + 1;
- }
- col = 0;
- text = NULL;
- xRight = NULL;
- link = NULL;
- len = size = 0;
- yxNext = NULL;
- xyNext = NULL;
- htext=new GooString();
- dir = textDirUnknown;
-}
-
-
-HtmlString::~HtmlString() {
- gfree(text);
- delete htext;
- gfree(xRight);
-}
-
-void HtmlString::addChar(GfxState *state, double x, double y,
- double dx, double dy, Unicode u) {
- if (dir == textDirUnknown) {
- //dir = UnicodeMap::getDirection(u);
- dir = textDirLeftRight;
- }
-
- if (len == size) {
- size += 16;
- text = (Unicode *)grealloc(text, size * sizeof(Unicode));
- xRight = (double *)grealloc(xRight, size * sizeof(double));
- }
- text[len] = u;
- if (len == 0) {
- xMin = x;
- }
- xMax = xRight[len] = x + dx;
-//printf("added char: %f %f xright = %f\n", x, dx, x+dx);
- ++len;
-}
-
-void HtmlString::endString()
-{
- if( dir == textDirRightLeft && len > 1 )
- {
- //printf("will reverse!\n");
- for (int i = 0; i < len / 2; i++)
- {
- Unicode ch = text[i];
- text[i] = text[len - i - 1];
- text[len - i - 1] = ch;
- }
- }
-}
-
-//------------------------------------------------------------------------
-// HtmlPage
-//------------------------------------------------------------------------
-
-HtmlPage::HtmlPage(GBool rawOrder, char *imgExtVal) {
- this->rawOrder = rawOrder;
- curStr = NULL;
- yxStrings = NULL;
- xyStrings = NULL;
- yxCur1 = yxCur2 = NULL;
- fonts=new HtmlFontAccu();
- links=new HtmlLinks();
- pageWidth=0;
- pageHeight=0;
- fontsPageMarker = 0;
- DocName=NULL;
- firstPage = -1;
- imgExt = new GooString(imgExtVal);
-}
-
-HtmlPage::~HtmlPage() {
- clear();
- if (DocName) delete DocName;
- if (fonts) delete fonts;
- if (links) delete links;
- if (imgExt) delete imgExt;
-}
-
-void HtmlPage::updateFont(GfxState *state) {
- GfxFont *font;
- double *fm;
- char *name;
- int code;
- double w;
-
- // adjust the font size
- fontSize = state->getTransformedFontSize();
- if ((font = state->getFont()) && font->getType() == fontType3) {
- // This is a hack which makes it possible to deal with some Type 3
- // fonts. The problem is that it's impossible to know what the
- // base coordinate system used in the font is without actually
- // rendering the font. This code tries to guess by looking at the
- // width of the character 'm' (which breaks if the font is a
- // subset that doesn't contain 'm').
- for (code = 0; code < 256; ++code) {
- if ((name = ((Gfx8BitFont *)font)->getCharName(code)) &&
- name[0] == 'm' && name[1] == '\0') {
- break;
- }
- }
- if (code < 256) {
- w = ((Gfx8BitFont *)font)->getWidth(code);
- if (w != 0) {
- // 600 is a generic average 'm' width -- yes, this is a hack
- fontSize *= w / 0.6;
- }
- }
- fm = font->getFontMatrix();
- if (fm[0] != 0) {
- fontSize *= fabs(fm[3] / fm[0]);
- }
- }
-}
-
-void HtmlPage::beginString(GfxState *state, GooString *s) {
- curStr = new HtmlString(state, fontSize, fonts);
-}
-
-
-void HtmlPage::conv(){
- HtmlString *tmp;
-
- int linkIndex = 0;
- HtmlFont* h;
- for(tmp=yxStrings;tmp;tmp=tmp->yxNext){
- int pos=tmp->fontpos;
- // printf("%d\n",pos);
- h=fonts->Get(pos);
-
- if (tmp->htext) delete tmp->htext;
- tmp->htext=HtmlFont::simple(h,tmp->text,tmp->len);
-
- if (links->inLink(tmp->xMin,tmp->yMin,tmp->xMax,tmp->yMax, linkIndex)){
- tmp->link = links->getLink(linkIndex);
- /*GooString *t=tmp->htext;
- tmp->htext=links->getLink(k)->Link(tmp->htext);
- delete t;*/
- }
- }
-
-}
-
-
-void HtmlPage::addChar(GfxState *state, double x, double y,
- double dx, double dy,
- double ox, double oy, Unicode *u, int uLen) {
- double x1, y1, w1, h1, dx2, dy2;
- int n, i;
- state->transform(x, y, &x1, &y1);
- n = curStr->len;
-
- // check that new character is in the same direction as current string
- // and is not too far away from it before adding
- //if ((UnicodeMap::getDirection(u[0]) != curStr->dir) ||
- // XXX
- if (
- (n > 0 &&
- fabs(x1 - curStr->xRight[n-1]) > 0.1 * (curStr->yMax - curStr->yMin))) {
- endString();
- beginString(state, NULL);
- }
- state->textTransformDelta(state->getCharSpace() * state->getHorizScaling(),
- 0, &dx2, &dy2);
- dx -= dx2;
- dy -= dy2;
- state->transformDelta(dx, dy, &w1, &h1);
- if (uLen != 0) {
- w1 /= uLen;
- h1 /= uLen;
- }
- for (i = 0; i < uLen; ++i) {
- curStr->addChar(state, x1 + i*w1, y1 + i*h1, w1, h1, u[i]);
- }
-}
-
-void HtmlPage::endString() {
- HtmlString *p1, *p2;
- double h, y1, y2;
-
- // throw away zero-length strings -- they don't have valid xMin/xMax
- // values, and they're useless anyway
- if (curStr->len == 0) {
- delete curStr;
- curStr = NULL;
- return;
- }
-
- curStr->endString();
-
-#if 0 //~tmp
- if (curStr->yMax - curStr->yMin > 20) {
- delete curStr;
- curStr = NULL;
- return;
- }
-#endif
-
- // insert string in y-major list
- h = curStr->yMax - curStr->yMin;
- y1 = curStr->yMin + 0.5 * h;
- y2 = curStr->yMin + 0.8 * h;
- if (rawOrder) {
- p1 = yxCur1;
- p2 = NULL;
- } else if ((!yxCur1 ||
- (y1 >= yxCur1->yMin &&
- (y2 >= yxCur1->yMax || curStr->xMax >= yxCur1->xMin))) &&
- (!yxCur2 ||
- (y1 < yxCur2->yMin ||
- (y2 < yxCur2->yMax && curStr->xMax < yxCur2->xMin)))) {
- p1 = yxCur1;
- p2 = yxCur2;
- } else {
- for (p1 = NULL, p2 = yxStrings; p2; p1 = p2, p2 = p2->yxNext) {
- if (y1 < p2->yMin || (y2 < p2->yMax && curStr->xMax < p2->xMin))
- break;
- }
- yxCur2 = p2;
- }
- yxCur1 = curStr;
- if (p1)
- p1->yxNext = curStr;
- else
- yxStrings = curStr;
- curStr->yxNext = p2;
- curStr = NULL;
-}
-
-static const char *strrstr( const char *s, const char *ss )
-{
- const char *p = strstr( s, ss );
- for( const char *pp = p; pp != NULL; pp = strstr( p+1, ss ) ){
- p = pp;
- }
- return p;
-}
-
-static void CloseTags( GooString *htext, GBool &finish_a, GBool &finish_italic, GBool &finish_bold )
-{
- const char *last_italic = finish_italic && ( finish_bold || finish_a ) ? strrstr( htext->getCString(), "<i>" ) : NULL;
- const char *last_bold = finish_bold && ( finish_italic || finish_a ) ? strrstr( htext->getCString(), "<b>" ) : NULL;
- const char *last_a = finish_a && ( finish_italic || finish_bold ) ? strrstr( htext->getCString(), "<a " ) : NULL;
- if( finish_a && ( finish_italic || finish_bold ) && last_a > ( last_italic > last_bold ? last_italic : last_bold ) ){
- htext->append("</a>", 4);
- finish_a = false;
- }
- if( finish_italic && finish_bold && last_italic > last_bold ){
- htext->append("</i>", 4);
- finish_italic = false;
- }
- if( finish_bold )
- htext->append("</b>", 4);
- if( finish_italic )
- htext->append("</i>", 4);
- if( finish_a )
- htext->append("</a>");
-}
-
-void HtmlPage::coalesce() {
- HtmlString *str1, *str2;
- HtmlFont *hfont1, *hfont2;
- double space, horSpace, vertSpace, vertOverlap;
- GBool addSpace, addLineBreak;
- int n, i;
- double curX, curY;
-
-#if 0 //~ for debugging
- for (str1 = yxStrings; str1; str1 = str1->yxNext) {
- printf("x=%f..%f y=%f..%f size=%2d '",
- str1->xMin, str1->xMax, str1->yMin, str1->yMax,
- (int)(str1->yMax - str1->yMin));
- for (i = 0; i < str1->len; ++i) {
- fputc(str1->text[i] & 0xff, stdout);
- }
- printf("'\n");
- }
- printf("\n------------------------------------------------------------\n\n");
-#endif
- str1 = yxStrings;
-
- if( !str1 ) return;
-
- //----- discard duplicated text (fake boldface, drop shadows)
- if( !complexMode )
- { /* if not in complex mode get rid of duplicate strings */
- HtmlString *str3;
- GBool found;
- while (str1)
- {
- double size = str1->yMax - str1->yMin;
- double xLimit = str1->xMin + size * 0.2;
- found = gFalse;
- for (str2 = str1, str3 = str1->yxNext;
- str3 && str3->xMin < xLimit;
- str2 = str3, str3 = str2->yxNext)
- {
- if (str3->len == str1->len &&
- !memcmp(str3->text, str1->text, str1->len * sizeof(Unicode)) &&
- fabs(str3->yMin - str1->yMin) < size * 0.2 &&
- fabs(str3->yMax - str1->yMax) < size * 0.2 &&
- fabs(str3->xMax - str1->xMax) < size * 0.2)
- {
- found = gTrue;
- //printf("found duplicate!\n");
- break;
- }
- }
- if (found)
- {
- str2->xyNext = str3->xyNext;
- str2->yxNext = str3->yxNext;
- delete str3;
- }
- else
- {
- str1 = str1->yxNext;
- }
- }
- } /*- !complexMode */
-
- str1 = yxStrings;
-
- hfont1 = getFont(str1);
- if( hfont1->isBold() )
- str1->htext->insert(0,"<b>",3);
- if( hfont1->isItalic() )
- str1->htext->insert(0,"<i>",3);
- if( str1->getLink() != NULL ) {
- GooString *ls = str1->getLink()->getLinkStart();
- str1->htext->insert(0, ls);
- delete ls;
- }
- curX = str1->xMin; curY = str1->yMin;
-
- while (str1 && (str2 = str1->yxNext)) {
- hfont2 = getFont(str2);
- space = str1->yMax - str1->yMin;
- horSpace = str2->xMin - str1->xMax;
- addLineBreak = !noMerge && (fabs(str1->xMin - str2->xMin) < 0.4);
- vertSpace = str2->yMin - str1->yMax;
-
-//printf("coalesce %d %d %f? ", str1->dir, str2->dir, d);
-
- if (str2->yMin >= str1->yMin && str2->yMin <= str1->yMax)
- {
- vertOverlap = str1->yMax - str2->yMin;
- } else
- if (str2->yMax >= str1->yMin && str2->yMax <= str1->yMax)
- {
- vertOverlap = str2->yMax - str1->yMin;
- } else
- {
- vertOverlap = 0;
- }
-
- if (
- (
- (
- (
- (rawOrder && vertOverlap > 0.5 * space)
- ||
- (!rawOrder && str2->yMin < str1->yMax)
- ) &&
- (horSpace > -0.5 * space && horSpace < space)
- ) ||
- (vertSpace >= 0 && vertSpace < 0.5 * space && addLineBreak)
- ) &&
- (!complexMode || (hfont1->isEqualIgnoreBold(*hfont2))) && // in complex mode fonts must be the same, in other modes fonts do not metter
- str1->dir == str2->dir // text direction the same
- )
- {
-// printf("yes\n");
- n = str1->len + str2->len;
- if ((addSpace = horSpace > 0.1 * space)) {
- ++n;
- }
- if (addLineBreak) {
- ++n;
- }
-
- str1->size = (n + 15) & ~15;
- str1->text = (Unicode *)grealloc(str1->text,
- str1->size * sizeof(Unicode));
- str1->xRight = (double *)grealloc(str1->xRight,
- str1->size * sizeof(double));
- if (addSpace) {
- str1->text[str1->len] = 0x20;
- str1->htext->append(xml?" ":"&nbsp;");
- str1->xRight[str1->len] = str2->xMin;
- ++str1->len;
- }
- if (addLineBreak) {
- str1->text[str1->len] = '\n';
- str1->htext->append("<br>");
- str1->xRight[str1->len] = str2->xMin;
- ++str1->len;
- str1->yMin = str2->yMin;
- str1->yMax = str2->yMax;
- str1->xMax = str2->xMax;
- int fontLineSize = hfont1->getLineSize();
- int curLineSize = (int)(vertSpace + space);
- if( curLineSize != fontLineSize )
- {
- HtmlFont *newfnt = new HtmlFont(*hfont1);
- newfnt->setLineSize(curLineSize);
- str1->fontpos = fonts->AddFont(*newfnt);
- delete newfnt;
- hfont1 = getFont(str1);
- // we have to reget hfont2 because it's location could have
- // changed on resize
- hfont2 = getFont(str2);
- }
- }
- for (i = 0; i < str2->len; ++i) {
- str1->text[str1->len] = str2->text[i];
- str1->xRight[str1->len] = str2->xRight[i];
- ++str1->len;
- }
-
- /* fix <i>, <b> if str1 and str2 differ and handle switch of links */
- HtmlLink *hlink1 = str1->getLink();
- HtmlLink *hlink2 = str2->getLink();
- bool switch_links = !hlink1 || !hlink2 || !hlink1->isEqualDest(*hlink2);
- GBool finish_a = switch_links && hlink1 != NULL;
- GBool finish_italic = hfont1->isItalic() && ( !hfont2->isItalic() || finish_a );
- GBool finish_bold = hfont1->isBold() && ( !hfont2->isBold() || finish_a || finish_italic );
- CloseTags( str1->htext, finish_a, finish_italic, finish_bold );
- if( switch_links && hlink2 != NULL ) {
- GooString *ls = hlink2->getLinkStart();
- str1->htext->append(ls);
- delete ls;
- }
- if( ( !hfont1->isItalic() || finish_italic ) && hfont2->isItalic() )
- str1->htext->append("<i>", 3);
- if( ( !hfont1->isBold() || finish_bold ) && hfont2->isBold() )
- str1->htext->append("<b>", 3);
-
-
- str1->htext->append(str2->htext);
- // str1 now contains href for link of str2 (if it is defined)
- str1->link = str2->link;
- hfont1 = hfont2;
- if (str2->xMax > str1->xMax) {
- str1->xMax = str2->xMax;
- }
- if (str2->yMax > str1->yMax) {
- str1->yMax = str2->yMax;
- }
- str1->yxNext = str2->yxNext;
- delete str2;
- } else { // keep strings separate
-// printf("no\n");
- GBool finish_a = str1->getLink() != NULL;
- GBool finish_bold = hfont1->isBold();
- GBool finish_italic = hfont1->isItalic();
- CloseTags( str1->htext, finish_a, finish_italic, finish_bold );
-
- str1->xMin = curX; str1->yMin = curY;
- str1 = str2;
- curX = str1->xMin; curY = str1->yMin;
- hfont1 = hfont2;
- if( hfont1->isBold() )
- str1->htext->insert(0,"<b>",3);
- if( hfont1->isItalic() )
- str1->htext->insert(0,"<i>",3);
- if( str1->getLink() != NULL ) {
- GooString *ls = str1->getLink()->getLinkStart();
- str1->htext->insert(0, ls);
- delete ls;
- }
- }
- }
- str1->xMin = curX; str1->yMin = curY;
-
- GBool finish_bold = hfont1->isBold();
- GBool finish_italic = hfont1->isItalic();
- GBool finish_a = str1->getLink() != NULL;
- CloseTags( str1->htext, finish_a, finish_italic, finish_bold );
-
-#if 0 //~ for debugging
- for (str1 = yxStrings; str1; str1 = str1->yxNext) {
- printf("x=%3d..%3d y=%3d..%3d size=%2d ",
- (int)str1->xMin, (int)str1->xMax, (int)str1->yMin, (int)str1->yMax,
- (int)(str1->yMax - str1->yMin));
- printf("'%s'\n", str1->htext->getCString());
- }
- printf("\n------------------------------------------------------------\n\n");
-#endif
-
-}
-
-void HtmlPage::dumpAsXML(FILE* f,int page){
- fprintf(f, "<page number=\"%d\" position=\"absolute\"", page);
- fprintf(f," top=\"0\" left=\"0\" height=\"%d\" width=\"%d\">\n", pageHeight,pageWidth);
-
- for(int i=fontsPageMarker;i < fonts->size();i++) {
- GooString *fontCSStyle = fonts->CSStyle(i);
- fprintf(f,"\t%s\n",fontCSStyle->getCString());
- delete fontCSStyle;
- }
-
- GooString *str, *str1 = NULL;
- for(HtmlString *tmp=yxStrings;tmp;tmp=tmp->yxNext){
- if (tmp->htext){
- str=new GooString(tmp->htext);
- fprintf(f,"<text top=\"%d\" left=\"%d\" ",xoutRound(tmp->yMin),xoutRound(tmp->xMin));
- fprintf(f,"width=\"%d\" height=\"%d\" ",xoutRound(tmp->xMax-tmp->xMin),xoutRound(tmp->yMax-tmp->yMin));
- fprintf(f,"font=\"%d\">", tmp->fontpos);
- if (tmp->fontpos!=-1){
- str1=fonts->getCSStyle(tmp->fontpos, str);
- }
- fputs(str1->getCString(),f);
- delete str;
- delete str1;
- fputs("</text>\n",f);
- }
- }
- fputs("</page>\n",f);
-}
-
-
-void HtmlPage::dumpComplex(FILE *file, int page){
- FILE* pageFile;
- GooString* tmp;
- char* htmlEncoding;
-
- if( firstPage == -1 ) firstPage = page;
-
- if( !noframes )
- {
- GooString* pgNum=GooString::fromInt(page);
- tmp = new GooString(DocName);
- tmp->append('-')->append(pgNum)->append(".html");
- delete pgNum;
-
- if (!(pageFile = fopen(tmp->getCString(), "w"))) {
- error(-1, "Couldn't open html file '%s'", tmp->getCString());
- delete tmp;
- return;
- }
- delete tmp;
-
- fprintf(pageFile,"%s\n<HTML>\n<HEAD>\n<TITLE>Page %d</TITLE>\n\n",
- DOCTYPE, page);
-
- htmlEncoding = HtmlOutputDev::mapEncodingToHtml
- (globalParams->getTextEncodingName());
- fprintf(pageFile, "<META http-equiv=\"Content-Type\" content=\"text/html; charset=%s\">\n", htmlEncoding);
- }
- else
- {
- pageFile = file;
- fprintf(pageFile,"<!-- Page %d -->\n", page);
- fprintf(pageFile,"<a name=\"%d\"></a>\n", page);
- }
-
- fprintf(pageFile,"<DIV style=\"position:relative;width:%d;height:%d;\">\n",
- pageWidth, pageHeight);
-
- tmp=basename(DocName);
-
- fputs("<STYLE type=\"text/css\">\n<!--\n",pageFile);
- for(int i=fontsPageMarker;i!=fonts->size();i++) {
- GooString *fontCSStyle = fonts->CSStyle(i);
- fprintf(pageFile,"\t%s\n",fontCSStyle->getCString());
- delete fontCSStyle;
- }
-
- fputs("-->\n</STYLE>\n",pageFile);
-
- if( !noframes )
- {
- fputs("</HEAD>\n<BODY bgcolor=\"#A0A0A0\" vlink=\"blue\" link=\"blue\">\n",pageFile);
- }
-
- if( !ignore )
- {
- fprintf(pageFile,
- "<IMG width=\"%d\" height=\"%d\" src=\"%s%03d.%s\" alt=\"background image\">\n",
- pageWidth, pageHeight, tmp->getCString(),
- (page-firstPage+1), imgExt->getCString());
- }
-
- delete tmp;
-
- GooString *str, *str1 = NULL;
- for(HtmlString *tmp1=yxStrings;tmp1;tmp1=tmp1->yxNext){
- if (tmp1->htext){
- str=new GooString(tmp1->htext);
- fprintf(pageFile,
- "<DIV style=\"position:absolute;top:%d;left:%d\">",
- xoutRound(tmp1->yMin),
- xoutRound(tmp1->xMin));
- fputs("<nobr>",pageFile);
- if (tmp1->fontpos!=-1){
- str1=fonts->getCSStyle(tmp1->fontpos, str);
- }
- //printf("%s\n", str1->getCString());
- fputs(str1->getCString(),pageFile);
-
- delete str;
- delete str1;
- fputs("</nobr></DIV>\n",pageFile);
- }
- }
-
- fputs("</DIV>\n", pageFile);
-
- if( !noframes )
- {
- fputs("</BODY>\n</HTML>\n",pageFile);
- fclose(pageFile);
- }
-}
-
-
-void HtmlPage::dump(FILE *f, int pageNum)
-{
- if (complexMode)
- {
- if (xml) dumpAsXML(f, pageNum);
- if (!xml) dumpComplex(f, pageNum);
- }
- else
- {
- fprintf(f,"<A name=%d></a>",pageNum);
- // Loop over the list of image names on this page
- int listlen=HtmlOutputDev::imgList->getLength();
- for (int i = 0; i < listlen; i++) {
- GooString *fName= (GooString *)HtmlOutputDev::imgList->del(0);
- fprintf(f,"<IMG src=\"%s\"><br>\n",fName->getCString());
- delete fName;
- }
- HtmlOutputDev::imgNum=1;
-
- GooString* str;
- for(HtmlString *tmp=yxStrings;tmp;tmp=tmp->yxNext){
- if (tmp->htext){
- str=new GooString(tmp->htext);
- fputs(str->getCString(),f);
- delete str;
- fputs("<br>\n",f);
- }
- }
- fputs("<hr>\n",f);
- }
-}
-
-
-
-void HtmlPage::clear() {
- HtmlString *p1, *p2;
-
- if (curStr) {
- delete curStr;
- curStr = NULL;
- }
- for (p1 = yxStrings; p1; p1 = p2) {
- p2 = p1->yxNext;
- delete p1;
- }
- yxStrings = NULL;
- xyStrings = NULL;
- yxCur1 = yxCur2 = NULL;
-
- if( !noframes )
- {
- delete fonts;
- fonts=new HtmlFontAccu();
- fontsPageMarker = 0;
- }
- else
- {
- fontsPageMarker = fonts->size();
- }
-
- delete links;
- links=new HtmlLinks();
-
-
-}
-
-void HtmlPage::setDocName(char *fname){
- DocName=new GooString(fname);
-}
-
-//------------------------------------------------------------------------
-// HtmlMetaVar
-//------------------------------------------------------------------------
-
-HtmlMetaVar::HtmlMetaVar(char *_name, char *_content)
-{
- name = new GooString(_name);
- content = new GooString(_content);
-}
-
-HtmlMetaVar::~HtmlMetaVar()
-{
- delete name;
- delete content;
-}
-
-GooString* HtmlMetaVar::toString()
-{
- GooString *result = new GooString("<META name=\"");
- result->append(name);
- result->append("\" content=\"");
- result->append(content);
- result->append("\">");
- return result;
-}
-
-//------------------------------------------------------------------------
-// HtmlOutputDev
-//------------------------------------------------------------------------
-
-static char* HtmlEncodings[][2] = {
- {"Latin1", "ISO-8859-1"},
- {NULL, NULL}
-};
-
-
-char* HtmlOutputDev::mapEncodingToHtml(GooString* encoding)
-{
- char* enc = encoding->getCString();
- for(int i = 0; HtmlEncodings[i][0] != NULL; i++)
- {
- if( strcmp(enc, HtmlEncodings[i][0]) == 0 )
- {
- return HtmlEncodings[i][1];
- }
- }
- return enc;
-}
-
-void HtmlOutputDev::doFrame(int firstPage){
- GooString* fName=new GooString(Docname);
- char* htmlEncoding;
- fName->append(".html");
-
- if (!(fContentsFrame = fopen(fName->getCString(), "w"))){
- error(-1, "Couldn't open html file '%s'", fName->getCString());
- delete fName;
- return;
- }
-
- delete fName;
-
- fName=basename(Docname);
- fputs(DOCTYPE_FRAMES, fContentsFrame);
- fputs("\n<HTML>",fContentsFrame);
- fputs("\n<HEAD>",fContentsFrame);
- fprintf(fContentsFrame,"\n<TITLE>%s</TITLE>",docTitle->getCString());
- htmlEncoding = mapEncodingToHtml(globalParams->getTextEncodingName());
- fprintf(fContentsFrame, "\n<META http-equiv=\"Content-Type\" content=\"text/html; charset=%s\">\n", htmlEncoding);
- dumpMetaVars(fContentsFrame);
- fprintf(fContentsFrame, "</HEAD>\n");
- fputs("<FRAMESET cols=\"100,*\">\n",fContentsFrame);
- fprintf(fContentsFrame,"<FRAME name=\"links\" src=\"%s_ind.html\">\n",fName->getCString());
- fputs("<FRAME name=\"contents\" src=",fContentsFrame);
- if (complexMode)
- fprintf(fContentsFrame,"\"%s-%d.html\"",fName->getCString(), firstPage);
- else
- fprintf(fContentsFrame,"\"%ss.html\"",fName->getCString());
-
- fputs(">\n</FRAMESET>\n</HTML>\n",fContentsFrame);
-
- delete fName;
- fclose(fContentsFrame);
-}
-
-HtmlOutputDev::HtmlOutputDev(char *fileName, char *title,
- char *author, char *keywords, char *subject, char *date,
- char *extension,
- GBool rawOrder, int firstPage, GBool outline)
-{
- char *htmlEncoding;
-
- fContentsFrame = NULL;
- docTitle = new GooString(title);
- pages = NULL;
- dumpJPEG=gTrue;
- //write = gTrue;
- this->rawOrder = rawOrder;
- this->doOutline = outline;
- ok = gFalse;
- imgNum=1;
- //this->firstPage = firstPage;
- //pageNum=firstPage;
- // open file
- needClose = gFalse;
- pages = new HtmlPage(rawOrder, extension);
-
- glMetaVars = new GooList();
- glMetaVars->append(new HtmlMetaVar("generator", "pdftohtml 0.36"));
- if( author ) glMetaVars->append(new HtmlMetaVar("author", author));
- if( keywords ) glMetaVars->append(new HtmlMetaVar("keywords", keywords));
- if( date ) glMetaVars->append(new HtmlMetaVar("date", date));
- if( subject ) glMetaVars->append(new HtmlMetaVar("subject", subject));
-
- maxPageWidth = 0;
- maxPageHeight = 0;
-
- pages->setDocName(fileName);
- Docname=new GooString (fileName);
-
- // for non-xml output (complex or simple) with frames generate the left frame
- if(!xml && !noframes)
- {
- GooString* left=new GooString(fileName);
- left->append("_ind.html");
-
- doFrame(firstPage);
-
- if (!(fContentsFrame = fopen(left->getCString(), "w")))
- {
- error(-1, "Couldn't open html file '%s'", left->getCString());
- delete left;
- return;
- }
- delete left;
- fputs(DOCTYPE, fContentsFrame);
- fputs("<HTML>\n<HEAD>\n<TITLE></TITLE>\n</HEAD>\n<BODY>\n",fContentsFrame);
-
- if (doOutline)
- {
- GooString *str = basename(Docname);
- fprintf(fContentsFrame, "<A href=\"%s%s\" target=\"contents\">Outline</a><br>", str->getCString(), complexMode ? "-outline.html" : "s.html#outline");
- delete str;
- }
-
- if (!complexMode)
- { /* not in complex mode */
-
- GooString* right=new GooString(fileName);
- right->append("s.html");
-
- if (!(page=fopen(right->getCString(),"w"))){
- error(-1, "Couldn't open html file '%s'", right->getCString());
- delete right;
- return;
- }
- delete right;
- fputs(DOCTYPE, page);
- fputs("<HTML>\n<HEAD>\n<TITLE></TITLE>\n</HEAD>\n<BODY>\n",page);
- }
- }
-
- if (noframes) {
- if (stout) page=stdout;
- else {
- GooString* right=new GooString(fileName);
- if (!xml) right->append(".html");
- if (xml) right->append(".xml");
- if (!(page=fopen(right->getCString(),"w"))){
- error(-1, "Couldn't open html file '%s'", right->getCString());
- delete right;
- return;
- }
- delete right;
- }
-
- htmlEncoding = mapEncodingToHtml(globalParams->getTextEncodingName());
- if (xml)
- {
- fprintf(page, "<?xml version=\"1.0\" encoding=\"%s\"?>\n", htmlEncoding);
- fputs("<!DOCTYPE pdf2xml SYSTEM \"pdf2xml.dtd\">\n\n", page);
- fputs("<pdf2xml>\n",page);
- }
- else
- {
- fprintf(page,"%s\n<HTML>\n<HEAD>\n<TITLE>%s</TITLE>\n",
- DOCTYPE, docTitle->getCString());
-
- fprintf(page, "<META http-equiv=\"Content-Type\" content=\"text/html; charset=%s\">\n", htmlEncoding);
-
- dumpMetaVars(page);
- fprintf(page,"</HEAD>\n");
- fprintf(page,"<BODY bgcolor=\"#A0A0A0\" vlink=\"blue\" link=\"blue\">\n");
- }
- }
- ok = gTrue;
-}
-
-HtmlOutputDev::~HtmlOutputDev() {
- /*if (mode&&!xml){
- int h=xoutRound(pages->pageHeight/scale);
- int w=xoutRound(pages->pageWidth/scale);
- fprintf(tin,"%s=%03d\n","PAPER_WIDTH",w);
- fprintf(tin,"%s=%03d\n","PAPER_HEIGHT",h);
- fclose(tin);
- }*/
-
- HtmlFont::clear();
-
- delete Docname;
- delete docTitle;
-
- deleteGooList(glMetaVars, HtmlMetaVar);
-
- if (fContentsFrame){
- fputs("</BODY>\n</HTML>\n",fContentsFrame);
- fclose(fContentsFrame);
- }
- if (xml) {
- fputs("</pdf2xml>\n",page);
- fclose(page);
- } else
- if ( !complexMode || xml || noframes )
- {
- fputs("</BODY>\n</HTML>\n",page);
- fclose(page);
- }
- if (pages)
- delete pages;
-}
-
-void HtmlOutputDev::startPage(int pageNum, GfxState *state) {
-#if 0
- if (mode&&!xml){
- if (write){
- write=gFalse;
- GooString* fname=Dirname(Docname);
- fname->append("image.log");
- if((tin=fopen(getFileNameFromPath(fname->getCString(),fname->getLength()),"w"))==NULL){
- printf("Error : can not open %s",fname);
- exit(1);
- }
- delete fname;
- // if(state->getRotation()!=0)
- // fprintf(tin,"ROTATE=%d rotate %d neg %d neg translate\n",state->getRotation(),state->getX1(),-state->getY1());
- // else
- fprintf(tin,"ROTATE=%d neg %d neg translate\n",state->getX1(),state->getY1());
- }
- }
-#endif
-
- this->pageNum = pageNum;
- GooString *str=basename(Docname);
- pages->clear();
- if(!noframes)
- {
- if (fContentsFrame)
- {
- if (complexMode)
- fprintf(fContentsFrame,"<A href=\"%s-%d.html\"",str->getCString(),pageNum);
- else
- fprintf(fContentsFrame,"<A href=\"%ss.html#%d\"",str->getCString(),pageNum);
- fprintf(fContentsFrame," target=\"contents\" >Page %d</a><br>\n",pageNum);
- }
- }
-
- pages->pageWidth=static_cast<int>(state->getPageWidth());
- pages->pageHeight=static_cast<int>(state->getPageHeight());
-
- delete str;
-}
-
-
-void HtmlOutputDev::endPage() {
- Links *linksList = catalog->getPage(pageNum)->getLinks(catalog);
- for (int i = 0; i < linksList->getNumLinks(); ++i)
- {
- doProcessLink(linksList->getLink(i));
- }
- delete linksList;
-
- pages->conv();
- pages->coalesce();
- pages->dump(page, pageNum);
-
- // I don't yet know what to do in the case when there are pages of different
- // sizes and we want complex output: running ghostscript many times
- // seems very inefficient. So for now I'll just use last page's size
- maxPageWidth = pages->pageWidth;
- maxPageHeight = pages->pageHeight;
-
- //if(!noframes&&!xml) fputs("<br>\n", fContentsFrame);
- if(!stout && !globalParams->getErrQuiet()) printf("Page-%d\n",(pageNum));
-}
-
-void HtmlOutputDev::updateFont(GfxState *state) {
- pages->updateFont(state);
-}
-
-void HtmlOutputDev::beginString(GfxState *state, GooString *s) {
- pages->beginString(state, s);
-}
-
-void HtmlOutputDev::endString(GfxState *state) {
- pages->endString();
-}
-
-void HtmlOutputDev::drawChar(GfxState *state, double x, double y,
- double dx, double dy,
- double originX, double originY,
- CharCode code, int /*nBytes*/, Unicode *u, int uLen)
-{
- if ( !showHidden && (state->getRender() & 3) == 3) {
- return;
- }
- pages->addChar(state, x, y, dx, dy, originX, originY, u, uLen);
-}
-
-void HtmlOutputDev::drawImageMask(GfxState *state, Object *ref, Stream *str,
- int width, int height, GBool invert,
- GBool interpolate, GBool inlineImg) {
-
- if (ignore||complexMode) {
- OutputDev::drawImageMask(state, ref, str, width, height, invert, interpolate, inlineImg);
- return;
- }
-
- FILE *f1;
- int c;
-
- int x0, y0; // top left corner of image
- int w0, h0, w1, h1; // size of image
- double xt, yt, wt, ht;
- GBool rotate, xFlip, yFlip;
-
- // get image position and size
- state->transform(0, 0, &xt, &yt);
- state->transformDelta(1, 1, &wt, &ht);
- if (wt > 0) {
- x0 = xoutRound(xt);
- w0 = xoutRound(wt);
- } else {
- x0 = xoutRound(xt + wt);
- w0 = xoutRound(-wt);
- }
- if (ht > 0) {
- y0 = xoutRound(yt);
- h0 = xoutRound(ht);
- } else {
- y0 = xoutRound(yt + ht);
- h0 = xoutRound(-ht);
- }
- state->transformDelta(1, 0, &xt, &yt);
- rotate = fabs(xt) < fabs(yt);
- if (rotate) {
- w1 = h0;
- h1 = w0;
- xFlip = ht < 0;
- yFlip = wt > 0;
- } else {
- w1 = w0;
- h1 = h0;
- xFlip = wt < 0;
- yFlip = ht > 0;
- }
-
- // dump JPEG file
- if (dumpJPEG && str->getKind() == strDCT) {
- GooString *fName=new GooString(Docname);
- fName->append("-");
- GooString *pgNum=GooString::fromInt(pageNum);
- GooString *imgnum=GooString::fromInt(imgNum);
- // open the image file
- fName->append(pgNum)->append("_")->append(imgnum)->append(".jpg");
- delete pgNum;
- delete imgnum;
-
- ++imgNum;
- if (!(f1 = fopen(fName->getCString(), "wb"))) {
- error(-1, "Couldn't open image file '%s'", fName->getCString());
- delete fName;
- return;
- }
-
- // initialize stream
- str = ((DCTStream *)str)->getRawStream();
- str->reset();
-
- // copy the stream
- while ((c = str->getChar()) != EOF)
- fputc(c, f1);
-
- fclose(f1);
-
- if (fName) imgList->append(fName);
- }
- else {
- OutputDev::drawImageMask(state, ref, str, width, height, invert, interpolate, inlineImg);
- }
-}
-
-void HtmlOutputDev::drawImage(GfxState *state, Object *ref, Stream *str,
- int width, int height, GfxImageColorMap *colorMap,
- GBool interpolate, int *maskColors, GBool inlineImg) {
-
- if (ignore||complexMode) {
- OutputDev::drawImage(state, ref, str, width, height, colorMap, interpolate,
- maskColors, inlineImg);
- return;
- }
-
- FILE *f1;
- int c;
-
- int x0, y0; // top left corner of image
- int w0, h0, w1, h1; // size of image
- double xt, yt, wt, ht;
- GBool rotate, xFlip, yFlip;
-
- // get image position and size
- state->transform(0, 0, &xt, &yt);
- state->transformDelta(1, 1, &wt, &ht);
- if (wt > 0) {
- x0 = xoutRound(xt);
- w0 = xoutRound(wt);
- } else {
- x0 = xoutRound(xt + wt);
- w0 = xoutRound(-wt);
- }
- if (ht > 0) {
- y0 = xoutRound(yt);
- h0 = xoutRound(ht);
- } else {
- y0 = xoutRound(yt + ht);
- h0 = xoutRound(-ht);
- }
- state->transformDelta(1, 0, &xt, &yt);
- rotate = fabs(xt) < fabs(yt);
- if (rotate) {
- w1 = h0;
- h1 = w0;
- xFlip = ht < 0;
- yFlip = wt > 0;
- } else {
- w1 = w0;
- h1 = h0;
- xFlip = wt < 0;
- yFlip = ht > 0;
- }
-
-
- /*if( !globalParams->getErrQuiet() )
- printf("image stream of kind %d\n", str->getKind());*/
- // dump JPEG file
- if (dumpJPEG && str->getKind() == strDCT) {
- GooString *fName=new GooString(Docname);
- fName->append("-");
- GooString *pgNum= GooString::fromInt(pageNum);
- GooString *imgnum= GooString::fromInt(imgNum);
-
- // open the image file
- fName->append(pgNum)->append("_")->append(imgnum)->append(".jpg");
- delete pgNum;
- delete imgnum;
-
- ++imgNum;
-
- if (!(f1 = fopen(fName->getCString(), "wb"))) {
- error(-1, "Couldn't open image file '%s'", fName->getCString());
- delete fName;
- return;
- }
-
- // initialize stream
- str = ((DCTStream *)str)->getRawStream();
- str->reset();
-
- // copy the stream
- while ((c = str->getChar()) != EOF)
- fputc(c, f1);
-
- fclose(f1);
-
- if (fName) imgList->append(fName);
- }
- else {
-#ifdef ENABLE_LIBPNG
- // Dump the image as a PNG file. Much of the PNG code
- // comes from an example by Guillaume Cottenceau.
- Guchar *p;
- GfxRGB rgb;
- png_byte *row = (png_byte *) malloc(3 * width); // 3 bytes/pixel: RGB
- png_bytep *row_pointer= &row;
-
- // Create the image filename
- GooString *fName=new GooString(Docname);
- fName->append("-");
- GooString *pgNum= GooString::fromInt(pageNum);
- GooString *imgnum= GooString::fromInt(imgNum);
- fName->append(pgNum)->append("_")->append(imgnum)->append(".png");
- delete pgNum;
- delete imgnum;
-
- // Open the image file
- if (!(f1 = fopen(fName->getCString(), "wb"))) {
- error(-1, "Couldn't open image file '%s'", fName->getCString());
- delete fName;
- return;
- }
-
- PNGWriter *writer = new PNGWriter();
- if (!writer->init(f1, width, height)) {
- delete writer;
- fclose(f1);
- return;
- }
-
- // Initialize the image stream
- ImageStream *imgStr = new ImageStream(str, width,
- colorMap->getNumPixelComps(), colorMap->getBits());
- imgStr->reset();
-
- // For each line...
- for (int y = 0; y < height; y++) {
-
- // Convert into a PNG row
- p = imgStr->getLine();
- for (int x = 0; x < width; x++) {
- colorMap->getRGB(p, &rgb);
- // Write the RGB pixels into the row
- row[3*x]= colToByte(rgb.r);
- row[3*x+1]= colToByte(rgb.g);
- row[3*x+2]= colToByte(rgb.b);
- p += colorMap->getNumPixelComps();
- }
-
- if (!writer->writeRow(row_pointer)) {
- delete writer;
- fclose(f1);
- return;
- }
- }
-
- writer->close();
- delete writer;
- fclose(f1);
-
- free(row);
- imgList->append(fName);
- ++imgNum;
- imgStr->close();
- delete imgStr;
-#else
- OutputDev::drawImage(state, ref, str, width, height, colorMap, interpolate,
- maskColors, inlineImg);
-#endif
- }
-}
-
-
-
-void HtmlOutputDev::doProcessLink(Link* link){
- double _x1,_y1,_x2,_y2;
- int x1,y1,x2,y2;
-
- link->getRect(&_x1,&_y1,&_x2,&_y2);
- cvtUserToDev(_x1,_y1,&x1,&y1);
-
- cvtUserToDev(_x2,_y2,&x2,&y2);
-
-
- GooString* _dest=getLinkDest(link,catalog);
- HtmlLink t((double) x1,(double) y2,(double) x2,(double) y1,_dest);
- pages->AddLink(t);
- delete _dest;
-}
-
-GooString* HtmlOutputDev::getLinkDest(Link *link,Catalog* catalog){
- char *p;
- switch(link->getAction()->getKind())
- {
- case actionGoTo:
- {
- GooString* file=basename(Docname);
- int page=1;
- LinkGoTo *ha=(LinkGoTo *)link->getAction();
- LinkDest *dest=NULL;
- if (ha->getDest()!=NULL)
- dest=ha->getDest()->copy();
- else if (ha->getNamedDest()!=NULL)
- dest=catalog->findDest(ha->getNamedDest());
-
- if (dest){
- if (dest->isPageRef()){
- Ref pageref=dest->getPageRef();
- page=catalog->findPage(pageref.num,pageref.gen);
- }
- else {
- page=dest->getPageNum();
- }
-
- delete dest;
-
- GooString *str=GooString::fromInt(page);
- /* complex simple
- frames file-4.html files.html#4
- noframes file.html#4 file.html#4
- */
- if (noframes)
- {
- file->append(".html#");
- file->append(str);
- }
- else
- {
- if( complexMode )
- {
- file->append("-");
- file->append(str);
- file->append(".html");
- }
- else
- {
- file->append("s.html#");
- file->append(str);
- }
- }
-
- if (printCommands) printf(" link to page %d ",page);
- delete str;
- return file;
- }
- else
- {
- return new GooString();
- }
- }
- case actionGoToR:
- {
- LinkGoToR *ha=(LinkGoToR *) link->getAction();
- LinkDest *dest=NULL;
- int page=1;
- GooString *file=new GooString();
- if (ha->getFileName()){
- delete file;
- file=new GooString(ha->getFileName()->getCString());
- }
- if (ha->getDest()!=NULL) dest=ha->getDest()->copy();
- if (dest&&file){
- if (!(dest->isPageRef())) page=dest->getPageNum();
- delete dest;
-
- if (printCommands) printf(" link to page %d ",page);
- if (printHtml){
- p=file->getCString()+file->getLength()-4;
- if (!strcmp(p, ".pdf") || !strcmp(p, ".PDF")){
- file->del(file->getLength()-4,4);
- file->append(".html");
- }
- file->append('#');
- file->append(GooString::fromInt(page));
- }
- }
- if (printCommands && file) printf("filename %s\n",file->getCString());
- return file;
- }
- case actionURI:
- {
- LinkURI *ha=(LinkURI *) link->getAction();
- GooString* file=new GooString(ha->getURI()->getCString());
- // printf("uri : %s\n",file->getCString());
- return file;
- }
- case actionLaunch:
- {
- LinkLaunch *ha=(LinkLaunch *) link->getAction();
- GooString* file=new GooString(ha->getFileName()->getCString());
- if (printHtml) {
- p=file->getCString()+file->getLength()-4;
- if (!strcmp(p, ".pdf") || !strcmp(p, ".PDF")){
- file->del(file->getLength()-4,4);
- file->append(".html");
- }
- if (printCommands) printf("filename %s",file->getCString());
-
- return file;
-
- }
- }
- default:
- return new GooString();
- }
-}
-
-void HtmlOutputDev::dumpMetaVars(FILE *file)
-{
- GooString *var;
-
- for(int i = 0; i < glMetaVars->getLength(); i++)
- {
- HtmlMetaVar *t = (HtmlMetaVar*)glMetaVars->get(i);
- var = t->toString();
- fprintf(file, "%s\n", var->getCString());
- delete var;
- }
-}
-
-GBool HtmlOutputDev::dumpDocOutline(Catalog* catalog)
-{
- FILE * output;
- GBool bClose = gFalse;
-
- if (!ok || xml)
- return gFalse;
-
- Object *outlines = catalog->getOutline();
- if (!outlines->isDict())
- return gFalse;
-
- if (!complexMode && !xml)
- {
- output = page;
- }
- else if (complexMode && !xml)
- {
- if (noframes)
- {
- output = page;
- fputs("<hr>\n", output);
- }
- else
- {
- GooString *str = Docname->copy();
- str->append("-outline.html");
- output = fopen(str->getCString(), "w");
- if (output == NULL)
- return gFalse;
- delete str;
- bClose = gTrue;
- fputs("<HTML>\n<HEAD>\n<TITLE>Document Outline</TITLE>\n</HEAD>\n<BODY>\n", output);
- }
- }
-
- GBool done = newOutlineLevel(output, outlines, catalog);
- if (done && !complexMode)
- fputs("<hr>\n", output);
-
- if (bClose)
- {
- fputs("</BODY>\n</HTML>\n", output);
- fclose(output);
- }
- return done;
-}
-
-GBool HtmlOutputDev::newOutlineLevel(FILE *output, Object *node, Catalog* catalog, int level)
-{
- Object curr, next;
- GBool atLeastOne = gFalse;
-
- if (node->dictLookup("First", &curr)->isDict()) {
- if (level == 1)
- {
- fputs("<A name=\"outline\"></a>", output);
- fputs("<h1>Document Outline</h1>\n", output);
- }
- fputs("<ul>",output);
- do {
- // get title, give up if not found
- Object title;
- if (curr.dictLookup("Title", &title)->isNull()) {
- title.free();
- break;
- }
- GooString *titleStr = new GooString(title.getString());
- title.free();
-
- // get corresponding link
- // Note: some code duplicated from HtmlOutputDev::getLinkDest().
- GooString *linkName = NULL;;
- Object dest;
- if (!curr.dictLookup("Dest", &dest)->isNull()) {
- LinkGoTo *link = new LinkGoTo(&dest);
- LinkDest *linkdest=NULL;
- if (link->getDest()!=NULL)
- linkdest=link->getDest()->copy();
- else if (link->getNamedDest()!=NULL)
- linkdest=catalog->findDest(link->getNamedDest());
-
- delete link;
- if (linkdest) {
- int page;
- if (linkdest->isPageRef()) {
- Ref pageref=linkdest->getPageRef();
- page=catalog->findPage(pageref.num,pageref.gen);
- } else {
- page=linkdest->getPageNum();
- }
- delete linkdest;
-
- /* complex simple
- frames file-4.html files.html#4
- noframes file.html#4 file.html#4
- */
- linkName=basename(Docname);
- GooString *str=GooString::fromInt(page);
- if (noframes) {
- linkName->append(".html#");
- linkName->append(str);
- } else {
- if( complexMode ) {
- linkName->append("-");
- linkName->append(str);
- linkName->append(".html");
- } else {
- linkName->append("s.html#");
- linkName->append(str);
- }
- }
- delete str;
- }
- }
- dest.free();
-
- fputs("<li>",output);
- if (linkName)
- fprintf(output,"<A href=\"%s\">", linkName->getCString());
- fputs(titleStr->getCString(),output);
- if (linkName) {
- fputs("</A>",output);
- delete linkName;
- }
- fputs("\n",output);
- delete titleStr;
- atLeastOne = gTrue;
-
- newOutlineLevel(output, &curr, catalog, level+1);
- curr.dictLookup("Next", &next);
- curr.free();
- curr = next;
- } while(curr.isDict());
- fputs("</ul>",output);
- }
- curr.free();
-
- return atLeastOne;
-}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/utils/HtmlOutputDev.h b/Build/source/libs/poppler/poppler-0.12.4/utils/HtmlOutputDev.h
deleted file mode 100644
index 24ccfd1c584..00000000000
--- a/Build/source/libs/poppler/poppler-0.12.4/utils/HtmlOutputDev.h
+++ /dev/null
@@ -1,329 +0,0 @@
-//========================================================================
-//
-// HtmlOutputDev.h
-//
-// Copyright 1997 Derek B. Noonburg
-//
-// Changed 1999 by G.Ovtcharov
-//========================================================================
-
-//========================================================================
-//
-// Modified under the Poppler project - http://poppler.freedesktop.org
-//
-// All changes made under the Poppler project to this file are licensed
-// under GPL version 2 or later
-//
-// Copyright (C) 2006, 2007, 2009 Albert Astals Cid <aacid@kde.org>
-// Copyright (C) 2008-2009 Warren Toomey <wkt@tuhs.org>
-// Copyright (C) 2009 Carlos Garcia Campos <carlosgc@gnome.org>
-// Copyright (C) 2009 Kovid Goyal <kovid@kovidgoyal.net>
-//
-// To see a description of the changes please see the Changelog file that
-// came with your tarball or type make ChangeLog if you are building from git
-//
-//========================================================================
-
-#ifndef HTMLOUTPUTDEV_H
-#define HTMLOUTPUTDEV_H
-
-#ifdef __GNUC__
-#pragma interface
-#endif
-
-#include <stdio.h>
-#include "goo/gtypes.h"
-#include "goo/GooList.h"
-#include "GfxFont.h"
-#include "OutputDev.h"
-#include "HtmlLinks.h"
-#include "HtmlFonts.h"
-#include "Link.h"
-#include "Catalog.h"
-#include "UnicodeMap.h"
-
-
-#ifdef _WIN32
-# define SLASH '\\'
-#else
-# define SLASH '/'
-#endif
-
-#define xoutRound(x) ((int)(x + 0.5))
-
-#define DOCTYPE "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">"
-#define DOCTYPE_FRAMES "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Frameset//EN\"\n\"http://www.w3.org/TR/html4/frameset.dtd\">"
-
-class GfxState;
-class GooString;
-//------------------------------------------------------------------------
-// HtmlString
-//------------------------------------------------------------------------
-
-enum UnicodeTextDirection {
- textDirUnknown,
- textDirLeftRight,
- textDirRightLeft,
- textDirTopBottom
-};
-
-
-class HtmlString {
-public:
-
- // Constructor.
- HtmlString(GfxState *state, double fontSize, HtmlFontAccu* fonts);
-
- // Destructor.
- ~HtmlString();
-
- // Add a character to the string.
- void addChar(GfxState *state, double x, double y,
- double dx, double dy,
- Unicode u);
- HtmlLink* getLink() { return link; }
- void endString(); // postprocessing
-
-private:
-// aender die text variable
- HtmlLink *link;
- double xMin, xMax; // bounding box x coordinates
- double yMin, yMax; // bounding box y coordinates
- int col; // starting column
- Unicode *text; // the text
- double *xRight; // right-hand x coord of each char
- HtmlString *yxNext; // next string in y-major order
- HtmlString *xyNext; // next string in x-major order
- int fontpos;
- GooString* htext;
- int len; // length of text and xRight
- int size; // size of text and xRight arrays
- UnicodeTextDirection dir; // direction (left to right/right to left)
-
- friend class HtmlPage;
-
-};
-
-
-//------------------------------------------------------------------------
-// HtmlPage
-//------------------------------------------------------------------------
-
-
-
-class HtmlPage {
-public:
-
- // Constructor.
- HtmlPage(GBool rawOrder, char *imgExtVal);
-
- // Destructor.
- ~HtmlPage();
-
- // Begin a new string.
- void beginString(GfxState *state, GooString *s);
-
- // Add a character to the current string.
- void addChar(GfxState *state, double x, double y,
- double dx, double dy,
- double ox, double oy,
- Unicode *u, int uLen); //Guchar c);
-
- void updateFont(GfxState *state);
-
- // End the current string, sorting it into the list of strings.
- void endString();
-
- // Coalesce strings that look like parts of the same line.
- void coalesce();
-
- // Find a string. If <top> is true, starts looking at top of page;
- // otherwise starts looking at <xMin>,<yMin>. If <bottom> is true,
- // stops looking at bottom of page; otherwise stops looking at
- // <xMax>,<yMax>. If found, sets the text bounding rectange and
- // returns true; otherwise returns false.
-
-
- // new functions
- void AddLink(const HtmlLink& x){
- links->AddLink(x);
- }
-
- void dump(FILE *f, int pageNum);
-
- // Clear the page.
- void clear();
-
- void conv();
-private:
- HtmlFont* getFont(HtmlString *hStr) { return fonts->Get(hStr->fontpos); }
-
- double fontSize; // current font size
- GBool rawOrder; // keep strings in content stream order
-
- HtmlString *curStr; // currently active string
-
- HtmlString *yxStrings; // strings in y-major order
- HtmlString *xyStrings; // strings in x-major order
- HtmlString *yxCur1, *yxCur2; // cursors for yxStrings list
-
- void setDocName(char* fname);
- void dumpAsXML(FILE* f,int page);
- void dumpComplex(FILE* f, int page);
-
- // marks the position of the fonts that belong to current page (for noframes)
- int fontsPageMarker;
- HtmlFontAccu *fonts;
- HtmlLinks *links;
-
- GooString *DocName;
- GooString *imgExt;
- int pageWidth;
- int pageHeight;
- static int pgNum;
- int firstPage; // used to begin the numeration of pages
-
- friend class HtmlOutputDev;
-};
-
-//------------------------------------------------------------------------
-// HtmlMetaVar
-//------------------------------------------------------------------------
-class HtmlMetaVar {
-public:
- HtmlMetaVar(char *_name, char *_content);
- ~HtmlMetaVar();
-
- GooString* toString();
-
-private:
-
- GooString *name;
- GooString *content;
-};
-
-//------------------------------------------------------------------------
-// HtmlOutputDev
-//------------------------------------------------------------------------
-
-class HtmlOutputDev: public OutputDev {
-public:
-
- // Open a text output file. If <fileName> is NULL, no file is written
- // (this is useful, e.g., for searching text). If <useASCII7> is true,
- // text is converted to 7-bit ASCII; otherwise, text is converted to
- // 8-bit ISO Latin-1. <useASCII7> should also be set for Japanese
- // (EUC-JP) text. If <rawOrder> is true, the text is kept in content
- // stream order.
- HtmlOutputDev(char *fileName, char *title,
- char *author,
- char *keywords,
- char *subject,
- char *date,
- char *extension,
- GBool rawOrder,
- int firstPage = 1,
- GBool outline = 0);
-
- // Destructor.
- virtual ~HtmlOutputDev();
-
- // Check if file was successfully created.
- virtual GBool isOk() { return ok; }
-
- //---- get info about output device
-
- // Does this device use upside-down coordinates?
- // (Upside-down means (0,0) is the top left corner of the page.)
- virtual GBool upsideDown() { return gTrue; }
-
- // Does this device use drawChar() or drawString()?
- virtual GBool useDrawChar() { return gTrue; }
-
- // Does this device use beginType3Char/endType3Char? Otherwise,
- // text in Type 3 fonts will be drawn with drawChar/drawString.
- virtual GBool interpretType3Chars() { return gFalse; }
-
- // Does this device need non-text content?
- virtual GBool needNonText() { return gTrue; }
-
- //----- initialization and control
-
- virtual GBool checkPageSlice(Page *page, double hDPI, double vDPI,
- int rotate, GBool useMediaBox, GBool crop,
- int sliceX, int sliceY, int sliceW, int sliceH,
- GBool printing, Catalog * catalogA,
- GBool (* abortCheckCbk)(void *data) = NULL,
- void * abortCheckCbkData = NULL)
- {
- catalog = catalogA;
- return gTrue;
- }
-
-
- // Start a page.
- virtual void startPage(int pageNum, GfxState *state);
-
- // End a page.
- virtual void endPage();
-
- //----- update text state
- virtual void updateFont(GfxState *state);
-
- //----- text drawing
- virtual void beginString(GfxState *state, GooString *s);
- virtual void endString(GfxState *state);
- virtual void drawChar(GfxState *state, double x, double y,
- double dx, double dy,
- double originX, double originY,
- CharCode code, int nBytes, Unicode *u, int uLen);
-
- virtual void drawImageMask(GfxState *state, Object *ref,
- Stream *str,
- int width, int height, GBool invert,
- GBool interpolate, GBool inlineImg);
- virtual void drawImage(GfxState *state, Object *ref, Stream *str,
- int width, int height, GfxImageColorMap *colorMap,
- GBool interpolate, int *maskColors, GBool inlineImg);
-
- //new feature
- virtual int DevType() {return 1234;}
-
- int getPageWidth() { return maxPageWidth; }
- int getPageHeight() { return maxPageHeight; }
-
- GBool dumpDocOutline(Catalog* catalog);
-
-private:
- // convert encoding into a HTML standard, or encoding->getCString if not
- // recognized
- static char* mapEncodingToHtml(GooString* encoding);
- void doProcessLink(Link *link);
- GooString* getLinkDest(Link *link,Catalog *catalog);
- void dumpMetaVars(FILE *);
- void doFrame(int firstPage);
- GBool newOutlineLevel(FILE *output, Object *node, Catalog* catalog, int level = 1);
-
- FILE *fContentsFrame;
- FILE *page; // html file
- //FILE *tin; // image log file
- //GBool write;
- GBool needClose; // need to close the file?
- HtmlPage *pages; // text for the current page
- GBool rawOrder; // keep text in content stream order
- GBool doOutline; // output document outline
- GBool ok; // set up ok?
- GBool dumpJPEG;
- int pageNum;
- int maxPageWidth;
- int maxPageHeight;
- static int imgNum;
- static GooList *imgList;
- GooString *Docname;
- GooString *docTitle;
- GooList *glMetaVars;
- Catalog *catalog;
- friend class HtmlPage;
-};
-
-#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/utils/ImageOutputDev.cc b/Build/source/libs/poppler/poppler-0.12.4/utils/ImageOutputDev.cc
deleted file mode 100644
index 7bf843fc124..00000000000
--- a/Build/source/libs/poppler/poppler-0.12.4/utils/ImageOutputDev.cc
+++ /dev/null
@@ -1,246 +0,0 @@
-//========================================================================
-//
-// ImageOutputDev.cc
-//
-// Copyright 1998-2003 Glyph & Cog, LLC
-//
-//========================================================================
-
-//========================================================================
-//
-// Modified under the Poppler project - http://poppler.freedesktop.org
-//
-// All changes made under the Poppler project to this file are licensed
-// under GPL version 2 or later
-//
-// Copyright (C) 2005, 2007 Albert Astals Cid <aacid@kde.org>
-// Copyright (C) 2006 Rainer Keller <class321@gmx.de>
-// Copyright (C) 2008 Timothy Lee <timothy.lee@siriushk.com>
-// Copyright (C) 2008 Vasile Gaburici <gaburici@cs.umd.edu>
-// Copyright (C) 2009 Carlos Garcia Campos <carlosgc@gnome.org>
-// Copyright (C) 2009 William Bader <williambader@hotmail.com>
-//
-// To see a description of the changes please see the Changelog file that
-// came with your tarball or type make ChangeLog if you are building from git
-//
-//========================================================================
-
-#include "config.h"
-#include <poppler-config.h>
-
-#ifdef USE_GCC_PRAGMAS
-#pragma implementation
-#endif
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <stddef.h>
-#include <ctype.h>
-#include "goo/gmem.h"
-#include "Error.h"
-#include "GfxState.h"
-#include "Object.h"
-#include "Stream.h"
-#ifdef ENABLE_LIBJPEG
-#include "DCTStream.h"
-#endif
-#include "ImageOutputDev.h"
-
-ImageOutputDev::ImageOutputDev(char *fileRootA, GBool dumpJPEGA) {
- fileRoot = copyString(fileRootA);
- fileName = (char *)gmalloc(strlen(fileRoot) + 20);
- dumpJPEG = dumpJPEGA;
- imgNum = 0;
- ok = gTrue;
-}
-
-ImageOutputDev::~ImageOutputDev() {
- gfree(fileName);
- gfree(fileRoot);
-}
-
-void ImageOutputDev::drawImageMask(GfxState *state, Object *ref, Stream *str,
- int width, int height, GBool invert,
- GBool interpolate, GBool inlineImg) {
- FILE *f;
- int c;
- int size, i;
-
- // dump JPEG file
- if (dumpJPEG && str->getKind() == strDCT && !inlineImg) {
-
- // open the image file
- sprintf(fileName, "%s-%03d.jpg", fileRoot, imgNum);
- ++imgNum;
- if (!(f = fopen(fileName, "wb"))) {
- error(-1, "Couldn't open image file '%s'", fileName);
- return;
- }
-
- // initialize stream
- str = ((DCTStream *)str)->getRawStream();
- str->reset();
-
- // copy the stream
- while ((c = str->getChar()) != EOF)
- fputc(c, f);
-
- str->close();
- fclose(f);
-
- // dump PBM file
- } else {
-
- // open the image file and write the PBM header
- sprintf(fileName, "%s-%03d.pbm", fileRoot, imgNum);
- ++imgNum;
- if (!(f = fopen(fileName, "wb"))) {
- error(-1, "Couldn't open image file '%s'", fileName);
- return;
- }
- fprintf(f, "P4\n");
- fprintf(f, "%d %d\n", width, height);
-
- // initialize stream
- str->reset();
-
- // copy the stream
- size = height * ((width + 7) / 8);
- for (i = 0; i < size; ++i) {
- fputc(str->getChar(), f);
- }
-
- str->close();
- fclose(f);
- }
-}
-
-void ImageOutputDev::drawImage(GfxState *state, Object *ref, Stream *str,
- int width, int height,
- GfxImageColorMap *colorMap,
- GBool interpolate, int *maskColors, GBool inlineImg) {
- FILE *f;
- ImageStream *imgStr;
- Guchar *p;
- Guchar zero = 0;
- GfxGray gray;
- GfxRGB rgb;
- int x, y;
- int c;
- int size, i;
- int pbm_mask = 0xff;
-
- // dump JPEG file
- if (dumpJPEG && str->getKind() == strDCT &&
- (colorMap->getNumPixelComps() == 1 ||
- colorMap->getNumPixelComps() == 3) &&
- !inlineImg) {
-
- // open the image file
- sprintf(fileName, "%s-%03d.jpg", fileRoot, imgNum);
- ++imgNum;
- if (!(f = fopen(fileName, "wb"))) {
- error(-1, "Couldn't open image file '%s'", fileName);
- return;
- }
-
- // initialize stream
- str = ((DCTStream *)str)->getRawStream();
- str->reset();
-
- // copy the stream
- while ((c = str->getChar()) != EOF)
- fputc(c, f);
-
- str->close();
- fclose(f);
-
- // dump PBM file
- } else if (colorMap->getNumPixelComps() == 1 &&
- colorMap->getBits() == 1) {
-
- // open the image file and write the PBM header
- sprintf(fileName, "%s-%03d.pbm", fileRoot, imgNum);
- ++imgNum;
- if (!(f = fopen(fileName, "wb"))) {
- error(-1, "Couldn't open image file '%s'", fileName);
- return;
- }
- fprintf(f, "P4\n");
- fprintf(f, "%d %d\n", width, height);
-
- // initialize stream
- str->reset();
-
- // if 0 comes out as 0 in the color map, the we _flip_ stream bits
- // otherwise we pass through stream bits unmolested
- colorMap->getGray(&zero, &gray);
- if(colToByte(gray))
- pbm_mask = 0;
-
- // copy the stream
- size = height * ((width + 7) / 8);
- for (i = 0; i < size; ++i) {
- fputc(str->getChar() ^ pbm_mask, f);
- }
-
- str->close();
- fclose(f);
-
- // dump PPM file
- } else {
-
- // open the image file and write the PPM header
- sprintf(fileName, "%s-%03d.ppm", fileRoot, imgNum);
- ++imgNum;
- if (!(f = fopen(fileName, "wb"))) {
- error(-1, "Couldn't open image file '%s'", fileName);
- return;
- }
- fprintf(f, "P6\n");
- fprintf(f, "%d %d\n", width, height);
- fprintf(f, "255\n");
-
- // initialize stream
- imgStr = new ImageStream(str, width, colorMap->getNumPixelComps(),
- colorMap->getBits());
- imgStr->reset();
-
- // for each line...
- for (y = 0; y < height; ++y) {
-
- // write the line
- p = imgStr->getLine();
- for (x = 0; x < width; ++x) {
- colorMap->getRGB(p, &rgb);
- fputc(colToByte(rgb.r), f);
- fputc(colToByte(rgb.g), f);
- fputc(colToByte(rgb.b), f);
- p += colorMap->getNumPixelComps();
- }
- }
- imgStr->close();
- delete imgStr;
-
- fclose(f);
- }
-}
-
-void ImageOutputDev::drawMaskedImage(
- GfxState *state, Object *ref, Stream *str,
- int width, int height, GfxImageColorMap *colorMap, GBool interpolate,
- Stream *maskStr, int maskWidth, int maskHeight, GBool maskInvert, GBool maskInterpolate) {
- drawImage(state, ref, str, width, height, colorMap, interpolate, NULL, gFalse);
- drawImageMask(state, ref, maskStr, maskWidth, maskHeight, maskInvert,
- maskInterpolate, gFalse);
-}
-
-void ImageOutputDev::drawSoftMaskedImage(
- GfxState *state, Object *ref, Stream *str,
- int width, int height, GfxImageColorMap *colorMap, GBool interpolate,
- Stream *maskStr, int maskWidth, int maskHeight,
- GfxImageColorMap *maskColorMap, GBool maskInterpolate) {
- drawImage(state, ref, str, width, height, colorMap, interpolate, NULL, gFalse);
- drawImage(state, ref, maskStr, maskWidth, maskHeight,
- maskColorMap, maskInterpolate, NULL, gFalse);
-}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/utils/ImageOutputDev.h b/Build/source/libs/poppler/poppler-0.12.4/utils/ImageOutputDev.h
deleted file mode 100644
index f2beab25092..00000000000
--- a/Build/source/libs/poppler/poppler-0.12.4/utils/ImageOutputDev.h
+++ /dev/null
@@ -1,106 +0,0 @@
-//========================================================================
-//
-// ImageOutputDev.h
-//
-// Copyright 1998-2003 Glyph & Cog, LLC
-//
-//========================================================================
-
-//========================================================================
-//
-// Modified under the Poppler project - http://poppler.freedesktop.org
-//
-// All changes made under the Poppler project to this file are licensed
-// under GPL version 2 or later
-//
-// Copyright (C) 2006 Rainer Keller <class321@gmx.de>
-// Copyright (C) 2008 Timothy Lee <timothy.lee@siriushk.com>
-// Copyright (C) 2009 Carlos Garcia Campos <carlosgc@gnome.org>
-//
-// To see a description of the changes please see the Changelog file that
-// came with your tarball or type make ChangeLog if you are building from git
-//
-//========================================================================
-
-#ifndef IMAGEOUTPUTDEV_H
-#define IMAGEOUTPUTDEV_H
-
-#include "poppler/poppler-config.h"
-
-#ifdef USE_GCC_PRAGMAS
-#pragma interface
-#endif
-
-#include <stdio.h>
-#include "goo/gtypes.h"
-#include "OutputDev.h"
-
-class GfxState;
-
-//------------------------------------------------------------------------
-// ImageOutputDev
-//------------------------------------------------------------------------
-
-class ImageOutputDev: public OutputDev {
-public:
-
- // Create an OutputDev which will write images to files named
- // <fileRoot>-NNN.<type>. Normally, all images are written as PBM
- // (.pbm) or PPM (.ppm) files. If <dumpJPEG> is set, JPEG images are
- // written as JPEG (.jpg) files.
- ImageOutputDev(char *fileRootA, GBool dumpJPEGA);
-
- // Destructor.
- virtual ~ImageOutputDev();
-
- // Check if file was successfully created.
- virtual GBool isOk() { return ok; }
-
- // Does this device use beginType3Char/endType3Char? Otherwise,
- // text in Type 3 fonts will be drawn with drawChar/drawString.
- virtual GBool interpretType3Chars() { return gFalse; }
-
- // Does this device need non-text content?
- virtual GBool needNonText() { return gTrue; }
-
- //---- get info about output device
-
- // Does this device use upside-down coordinates?
- // (Upside-down means (0,0) is the top left corner of the page.)
- virtual GBool upsideDown() { return gTrue; }
-
- // Does this device use drawChar() or drawString()?
- virtual GBool useDrawChar() { return gFalse; }
-
- //----- image drawing
- virtual void drawImageMask(GfxState *state, Object *ref, Stream *str,
- int width, int height, GBool invert,
- GBool interpolate, GBool inlineImg);
- virtual void drawImage(GfxState *state, Object *ref, Stream *str,
- int width, int height, GfxImageColorMap *colorMap,
- GBool interpolate, int *maskColors, GBool inlineImg);
- virtual void drawMaskedImage(GfxState *state, Object *ref, Stream *str,
- int width, int height,
- GfxImageColorMap *colorMap,
- GBool interpolate,
- Stream *maskStr, int maskWidth, int maskHeight,
- GBool maskInvert, GBool maskInterpolate);
- virtual void drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str,
- int width, int height,
- GfxImageColorMap *colorMap,
- GBool interpolate,
- Stream *maskStr,
- int maskWidth, int maskHeight,
- GfxImageColorMap *maskColorMap,
- GBool maskInterpolate);
-
-private:
-
- char *fileRoot; // root of output file names
- char *fileName; // buffer for output file names
- GBool dumpJPEG; // set to dump native JPEG files
- int imgNum; // current image number
- GBool ok; // set up ok?
-};
-
-#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/utils/Makefile.am b/Build/source/libs/poppler/poppler-0.12.4/utils/Makefile.am
deleted file mode 100644
index e57c71b9b9a..00000000000
--- a/Build/source/libs/poppler/poppler-0.12.4/utils/Makefile.am
+++ /dev/null
@@ -1,101 +0,0 @@
-if BUILD_SPLASH_OUTPUT
-
-pdftoppm_SOURCES = \
- pdftoppm.cc \
- $(common)
-
-pdftoppm_binary = pdftoppm
-
-pdftoppm_manpage = pdftoppm.1
-
-endif
-
-INCLUDES = \
- -I$(top_srcdir) \
- -I$(top_srcdir)/goo \
- -I$(top_srcdir)/utils \
- -I$(top_srcdir)/poppler \
- $(UTILS_CFLAGS) \
- $(FONTCONFIG_CFLAGS) \
- $(ABIWORD_CFLAGS)
-
-LDADD = \
- $(top_builddir)/poppler/libpoppler.la \
- $(UTILS_LIBS) \
- $(FONTCONFIG_LIBS)
-
-if BUILD_ABIWORD_OUTPUT
-
-pdftoabw_SOURCES = \
- pdftoabw.cc \
- $(common)
-
-pdftoabw_LDADD = $(LDADD) $(ABIWORD_LIBS)
-
-pdftoabw_binary = pdftoabw
-
-endif
-
-AM_LDFLAGS = @auto_import_flags@
-
-bin_PROGRAMS = \
- pdffonts \
- pdfimages \
- pdfinfo \
- pdftops \
- pdftotext \
- pdftohtml \
- $(pdftoppm_binary) \
- $(pdftoabw_binary)
-
-dist_man1_MANS = \
- pdffonts.1 \
- pdfimages.1 \
- pdfinfo.1 \
- pdftops.1 \
- pdftotext.1 \
- pdftohtml.1 \
- $(pdftoppm_manpage)
-
-common = parseargs.c parseargs.h
-
-pdffonts_SOURCES = \
- pdffonts.cc \
- $(common)
-
-pdfimages_SOURCES = \
- pdfimages.cc \
- ImageOutputDev.cc \
- ImageOutputDev.h \
- $(common)
-
-pdfinfo_SOURCES = \
- pdfinfo.cc \
- printencodings.cc \
- printencodings.h \
- $(common)
-
-pdftops_SOURCES = \
- pdftops.cc \
- $(common)
-
-pdftotext_SOURCES = \
- pdftotext.cc \
- printencodings.cc \
- printencodings.h \
- $(common)
-
-pdftohtml_SOURCES = \
- pdftohtml.cc \
- HtmlFonts.cc \
- HtmlFonts.h \
- HtmlLinks.cc \
- HtmlLinks.h \
- HtmlOutputDev.cc \
- HtmlOutputDev.h \
- $(common)
-
-# Yay, automake! It should be able to figure out that it has to dist
-# pdftoppm.1, but nooo. So we just add it here.
-
-EXTRA_DIST = pdf2xml.dtd pdftoppm.1
diff --git a/Build/source/libs/poppler/poppler-0.12.4/utils/Makefile.in b/Build/source/libs/poppler/poppler-0.12.4/utils/Makefile.in
deleted file mode 100644
index 99a282ba69d..00000000000
--- a/Build/source/libs/poppler/poppler-0.12.4/utils/Makefile.in
+++ /dev/null
@@ -1,876 +0,0 @@
-# Makefile.in generated by automake 1.11 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-bin_PROGRAMS = pdffonts$(EXEEXT) pdfimages$(EXEEXT) pdfinfo$(EXEEXT) \
- pdftops$(EXEEXT) pdftotext$(EXEEXT) pdftohtml$(EXEEXT) \
- $(am__EXEEXT_1) $(am__EXEEXT_2)
-subdir = utils
-DIST_COMMON = $(dist_man1_MANS) $(srcdir)/Makefile.am \
- $(srcdir)/Makefile.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
- $(top_srcdir)/m4/define-dir.m4 $(top_srcdir)/m4/gtk-doc.m4 \
- $(top_srcdir)/m4/libjpeg.m4 $(top_srcdir)/m4/libpng.m4 \
- $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
- $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
- $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/qt.m4 \
- $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = $(top_builddir)/config.h \
- $(top_builddir)/poppler/poppler-config.h
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-@BUILD_SPLASH_OUTPUT_TRUE@am__EXEEXT_1 = pdftoppm$(EXEEXT)
-@BUILD_ABIWORD_OUTPUT_TRUE@am__EXEEXT_2 = pdftoabw$(EXEEXT)
-am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"
-PROGRAMS = $(bin_PROGRAMS)
-am__objects_1 = parseargs.$(OBJEXT)
-am_pdffonts_OBJECTS = pdffonts.$(OBJEXT) $(am__objects_1)
-pdffonts_OBJECTS = $(am_pdffonts_OBJECTS)
-pdffonts_LDADD = $(LDADD)
-am__DEPENDENCIES_1 =
-pdffonts_DEPENDENCIES = $(top_builddir)/poppler/libpoppler.la \
- $(am__DEPENDENCIES_1)
-AM_V_lt = $(am__v_lt_$(V))
-am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
-am__v_lt_0 = --silent
-am_pdfimages_OBJECTS = pdfimages.$(OBJEXT) ImageOutputDev.$(OBJEXT) \
- $(am__objects_1)
-pdfimages_OBJECTS = $(am_pdfimages_OBJECTS)
-pdfimages_LDADD = $(LDADD)
-pdfimages_DEPENDENCIES = $(top_builddir)/poppler/libpoppler.la \
- $(am__DEPENDENCIES_1)
-am_pdfinfo_OBJECTS = pdfinfo.$(OBJEXT) printencodings.$(OBJEXT) \
- $(am__objects_1)
-pdfinfo_OBJECTS = $(am_pdfinfo_OBJECTS)
-pdfinfo_LDADD = $(LDADD)
-pdfinfo_DEPENDENCIES = $(top_builddir)/poppler/libpoppler.la \
- $(am__DEPENDENCIES_1)
-am__pdftoabw_SOURCES_DIST = pdftoabw.cc parseargs.c parseargs.h
-@BUILD_ABIWORD_OUTPUT_TRUE@am_pdftoabw_OBJECTS = pdftoabw.$(OBJEXT) \
-@BUILD_ABIWORD_OUTPUT_TRUE@ $(am__objects_1)
-pdftoabw_OBJECTS = $(am_pdftoabw_OBJECTS)
-am__DEPENDENCIES_2 = $(top_builddir)/poppler/libpoppler.la \
- $(am__DEPENDENCIES_1)
-@BUILD_ABIWORD_OUTPUT_TRUE@pdftoabw_DEPENDENCIES = \
-@BUILD_ABIWORD_OUTPUT_TRUE@ $(am__DEPENDENCIES_2) \
-@BUILD_ABIWORD_OUTPUT_TRUE@ $(am__DEPENDENCIES_1)
-am_pdftohtml_OBJECTS = pdftohtml.$(OBJEXT) HtmlFonts.$(OBJEXT) \
- HtmlLinks.$(OBJEXT) HtmlOutputDev.$(OBJEXT) $(am__objects_1)
-pdftohtml_OBJECTS = $(am_pdftohtml_OBJECTS)
-pdftohtml_LDADD = $(LDADD)
-pdftohtml_DEPENDENCIES = $(top_builddir)/poppler/libpoppler.la \
- $(am__DEPENDENCIES_1)
-am__pdftoppm_SOURCES_DIST = pdftoppm.cc parseargs.c parseargs.h
-@BUILD_SPLASH_OUTPUT_TRUE@am_pdftoppm_OBJECTS = pdftoppm.$(OBJEXT) \
-@BUILD_SPLASH_OUTPUT_TRUE@ $(am__objects_1)
-pdftoppm_OBJECTS = $(am_pdftoppm_OBJECTS)
-pdftoppm_LDADD = $(LDADD)
-pdftoppm_DEPENDENCIES = $(top_builddir)/poppler/libpoppler.la \
- $(am__DEPENDENCIES_1)
-am_pdftops_OBJECTS = pdftops.$(OBJEXT) $(am__objects_1)
-pdftops_OBJECTS = $(am_pdftops_OBJECTS)
-pdftops_LDADD = $(LDADD)
-pdftops_DEPENDENCIES = $(top_builddir)/poppler/libpoppler.la \
- $(am__DEPENDENCIES_1)
-am_pdftotext_OBJECTS = pdftotext.$(OBJEXT) printencodings.$(OBJEXT) \
- $(am__objects_1)
-pdftotext_OBJECTS = $(am_pdftotext_OBJECTS)
-pdftotext_LDADD = $(LDADD)
-pdftotext_DEPENDENCIES = $(top_builddir)/poppler/libpoppler.la \
- $(am__DEPENDENCIES_1)
-DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/poppler
-depcomp = $(SHELL) $(top_srcdir)/depcomp
-am__depfiles_maybe = depfiles
-am__mv = mv -f
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
- $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
- $(AM_CFLAGS) $(CFLAGS)
-AM_V_CC = $(am__v_CC_$(V))
-am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
-am__v_CC_0 = @echo " CC " $@;
-AM_V_at = $(am__v_at_$(V))
-am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
-am__v_at_0 = @
-CCLD = $(CC)
-LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
- $(AM_LDFLAGS) $(LDFLAGS) -o $@
-AM_V_CCLD = $(am__v_CCLD_$(V))
-am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
-am__v_CCLD_0 = @echo " CCLD " $@;
-CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
-LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
- $(AM_CXXFLAGS) $(CXXFLAGS)
-AM_V_CXX = $(am__v_CXX_$(V))
-am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
-am__v_CXX_0 = @echo " CXX " $@;
-CXXLD = $(CXX)
-CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
- $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-AM_V_CXXLD = $(am__v_CXXLD_$(V))
-am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
-am__v_CXXLD_0 = @echo " CXXLD " $@;
-AM_V_GEN = $(am__v_GEN_$(V))
-am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
-am__v_GEN_0 = @echo " GEN " $@;
-SOURCES = $(pdffonts_SOURCES) $(pdfimages_SOURCES) $(pdfinfo_SOURCES) \
- $(pdftoabw_SOURCES) $(pdftohtml_SOURCES) $(pdftoppm_SOURCES) \
- $(pdftops_SOURCES) $(pdftotext_SOURCES)
-DIST_SOURCES = $(pdffonts_SOURCES) $(pdfimages_SOURCES) \
- $(pdfinfo_SOURCES) $(am__pdftoabw_SOURCES_DIST) \
- $(pdftohtml_SOURCES) $(am__pdftoppm_SOURCES_DIST) \
- $(pdftops_SOURCES) $(pdftotext_SOURCES)
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
-am__vpath_adj = case $$p in \
- $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
- *) f=$$p;; \
- esac;
-am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
-am__install_max = 40
-am__nobase_strip_setup = \
- srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
-am__nobase_strip = \
- for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
-am__nobase_list = $(am__nobase_strip_setup); \
- for p in $$list; do echo "$$p $$p"; done | \
- sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
- $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
- if (++n[$$2] == $(am__install_max)) \
- { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
- END { for (dir in files) print dir, files[dir] }'
-am__base_list = \
- sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
- sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
-man1dir = $(mandir)/man1
-NROFF = nroff
-MANS = $(dist_man1_MANS)
-ETAGS = etags
-CTAGS = ctags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ABIWORD_CFLAGS = @ABIWORD_CFLAGS@
-ABIWORD_LIBS = @ABIWORD_LIBS@
-ACLOCAL = @ACLOCAL@
-AMTAR = @AMTAR@
-AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
-AR = @AR@
-AS = @AS@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CAIRO_CFLAGS = @CAIRO_CFLAGS@
-CAIRO_FEATURE = @CAIRO_FEATURE@
-CAIRO_LIBS = @CAIRO_LIBS@
-CAIRO_REQ = @CAIRO_REQ@
-CAIRO_VERSION = @CAIRO_VERSION@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DLLTOOL = @DLLTOOL@
-DSYMUTIL = @DSYMUTIL@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@
-FONTCONFIG_LIBS = @FONTCONFIG_LIBS@
-FREETYPE_CFLAGS = @FREETYPE_CFLAGS@
-FREETYPE_CONFIG = @FREETYPE_CONFIG@
-FREETYPE_LIBS = @FREETYPE_LIBS@
-GDK_CFLAGS = @GDK_CFLAGS@
-GDK_FEATURE = @GDK_FEATURE@
-GDK_LIBS = @GDK_LIBS@
-GLIB_MKENUMS = @GLIB_MKENUMS@
-GREP = @GREP@
-GTKDOC_CHECK = @GTKDOC_CHECK@
-GTK_TEST_CFLAGS = @GTK_TEST_CFLAGS@
-GTK_TEST_LIBS = @GTK_TEST_LIBS@
-HTML_DIR = @HTML_DIR@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LCMS_CFLAGS = @LCMS_CFLAGS@
-LCMS_LIBS = @LCMS_LIBS@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LIBJPEG_LIBS = @LIBJPEG_LIBS@
-LIBOBJS = @LIBOBJS@
-LIBOPENJPEG_LIBS = @LIBOPENJPEG_LIBS@
-LIBPNG_LIBS = @LIBPNG_LIBS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LIPO = @LIPO@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-MAKEINFO = @MAKEINFO@
-MKDIR_P = @MKDIR_P@
-MOCQT4 = @MOCQT4@
-NM = @NM@
-NMEDIT = @NMEDIT@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PC_REQUIRES = @PC_REQUIRES@
-PC_REQUIRES_PRIVATE = @PC_REQUIRES_PRIVATE@
-PKG_CONFIG = @PKG_CONFIG@
-POPPLER_DATADIR = @POPPLER_DATADIR@
-POPPLER_GLIB_CFLAGS = @POPPLER_GLIB_CFLAGS@
-POPPLER_GLIB_DISABLE_DEPRECATED = @POPPLER_GLIB_DISABLE_DEPRECATED@
-POPPLER_GLIB_DISABLE_SINGLE_INCLUDES = @POPPLER_GLIB_DISABLE_SINGLE_INCLUDES@
-POPPLER_GLIB_LIBS = @POPPLER_GLIB_LIBS@
-POPPLER_MAJOR_VERSION = @POPPLER_MAJOR_VERSION@
-POPPLER_MICRO_VERSION = @POPPLER_MICRO_VERSION@
-POPPLER_MINOR_VERSION = @POPPLER_MINOR_VERSION@
-POPPLER_QT4_CFLAGS = @POPPLER_QT4_CFLAGS@
-POPPLER_QT4_CXXFLAGS = @POPPLER_QT4_CXXFLAGS@
-POPPLER_QT4_LIBS = @POPPLER_QT4_LIBS@
-POPPLER_QT4_TEST_CFLAGS = @POPPLER_QT4_TEST_CFLAGS@
-POPPLER_QT4_TEST_LIBS = @POPPLER_QT4_TEST_LIBS@
-POPPLER_QT_CXXFLAGS = @POPPLER_QT_CXXFLAGS@
-POPPLER_QT_LIBS = @POPPLER_QT_LIBS@
-PTHREAD_CC = @PTHREAD_CC@
-PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
-PTHREAD_LIBS = @PTHREAD_LIBS@
-RANLIB = @RANLIB@
-SED = @SED@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-VERSION = @VERSION@
-XMKMF = @XMKMF@
-X_CFLAGS = @X_CFLAGS@
-X_EXTRA_LIBS = @X_EXTRA_LIBS@
-X_LIBS = @X_LIBS@
-X_PRE_LIBS = @X_PRE_LIBS@
-ZLIB_LIBS = @ZLIB_LIBS@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-acx_pthread_config = @acx_pthread_config@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-auto_import_flags = @auto_import_flags@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-create_shared_lib = @create_shared_lib@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-win32_libs = @win32_libs@
-@BUILD_SPLASH_OUTPUT_TRUE@pdftoppm_SOURCES = \
-@BUILD_SPLASH_OUTPUT_TRUE@ pdftoppm.cc \
-@BUILD_SPLASH_OUTPUT_TRUE@ $(common)
-
-@BUILD_SPLASH_OUTPUT_TRUE@pdftoppm_binary = pdftoppm
-@BUILD_SPLASH_OUTPUT_TRUE@pdftoppm_manpage = pdftoppm.1
-INCLUDES = \
- -I$(top_srcdir) \
- -I$(top_srcdir)/goo \
- -I$(top_srcdir)/utils \
- -I$(top_srcdir)/poppler \
- $(UTILS_CFLAGS) \
- $(FONTCONFIG_CFLAGS) \
- $(ABIWORD_CFLAGS)
-
-LDADD = \
- $(top_builddir)/poppler/libpoppler.la \
- $(UTILS_LIBS) \
- $(FONTCONFIG_LIBS)
-
-@BUILD_ABIWORD_OUTPUT_TRUE@pdftoabw_SOURCES = \
-@BUILD_ABIWORD_OUTPUT_TRUE@ pdftoabw.cc \
-@BUILD_ABIWORD_OUTPUT_TRUE@ $(common)
-
-@BUILD_ABIWORD_OUTPUT_TRUE@pdftoabw_LDADD = $(LDADD) $(ABIWORD_LIBS)
-@BUILD_ABIWORD_OUTPUT_TRUE@pdftoabw_binary = pdftoabw
-AM_LDFLAGS = @auto_import_flags@
-dist_man1_MANS = \
- pdffonts.1 \
- pdfimages.1 \
- pdfinfo.1 \
- pdftops.1 \
- pdftotext.1 \
- pdftohtml.1 \
- $(pdftoppm_manpage)
-
-common = parseargs.c parseargs.h
-pdffonts_SOURCES = \
- pdffonts.cc \
- $(common)
-
-pdfimages_SOURCES = \
- pdfimages.cc \
- ImageOutputDev.cc \
- ImageOutputDev.h \
- $(common)
-
-pdfinfo_SOURCES = \
- pdfinfo.cc \
- printencodings.cc \
- printencodings.h \
- $(common)
-
-pdftops_SOURCES = \
- pdftops.cc \
- $(common)
-
-pdftotext_SOURCES = \
- pdftotext.cc \
- printencodings.cc \
- printencodings.h \
- $(common)
-
-pdftohtml_SOURCES = \
- pdftohtml.cc \
- HtmlFonts.cc \
- HtmlFonts.h \
- HtmlLinks.cc \
- HtmlLinks.h \
- HtmlOutputDev.cc \
- HtmlOutputDev.h \
- $(common)
-
-
-# Yay, automake! It should be able to figure out that it has to dist
-# pdftoppm.1, but nooo. So we just add it here.
-EXTRA_DIST = pdf2xml.dtd pdftoppm.1
-all: all-am
-
-.SUFFIXES:
-.SUFFIXES: .c .cc .lo .o .obj
-$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
- && { if test -f $@; then exit 0; else break; fi; }; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign utils/Makefile'; \
- $(am__cd) $(top_srcdir) && \
- $(AUTOMAKE) --foreign utils/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: $(am__configure_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): $(am__aclocal_m4_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-install-binPROGRAMS: $(bin_PROGRAMS)
- @$(NORMAL_INSTALL)
- test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
- @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
- for p in $$list; do echo "$$p $$p"; done | \
- sed 's/$(EXEEXT)$$//' | \
- while read p p1; do if test -f $$p || test -f $$p1; \
- then echo "$$p"; echo "$$p"; else :; fi; \
- done | \
- sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
- -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
- sed 'N;N;N;s,\n, ,g' | \
- $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
- { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
- if ($$2 == $$4) files[d] = files[d] " " $$1; \
- else { print "f", $$3 "/" $$4, $$1; } } \
- END { for (d in files) print "f", d, files[d] }' | \
- while read type dir files; do \
- if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
- test -z "$$files" || { \
- echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
- $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
- } \
- ; done
-
-uninstall-binPROGRAMS:
- @$(NORMAL_UNINSTALL)
- @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
- files=`for p in $$list; do echo "$$p"; done | \
- sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
- -e 's/$$/$(EXEEXT)/' `; \
- test -n "$$list" || exit 0; \
- echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(bindir)" && rm -f $$files
-
-clean-binPROGRAMS:
- @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
- echo " rm -f" $$list; \
- rm -f $$list || exit $$?; \
- test -n "$(EXEEXT)" || exit 0; \
- list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
- echo " rm -f" $$list; \
- rm -f $$list
-pdffonts$(EXEEXT): $(pdffonts_OBJECTS) $(pdffonts_DEPENDENCIES)
- @rm -f pdffonts$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(pdffonts_OBJECTS) $(pdffonts_LDADD) $(LIBS)
-pdfimages$(EXEEXT): $(pdfimages_OBJECTS) $(pdfimages_DEPENDENCIES)
- @rm -f pdfimages$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(pdfimages_OBJECTS) $(pdfimages_LDADD) $(LIBS)
-pdfinfo$(EXEEXT): $(pdfinfo_OBJECTS) $(pdfinfo_DEPENDENCIES)
- @rm -f pdfinfo$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(pdfinfo_OBJECTS) $(pdfinfo_LDADD) $(LIBS)
-pdftoabw$(EXEEXT): $(pdftoabw_OBJECTS) $(pdftoabw_DEPENDENCIES)
- @rm -f pdftoabw$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(pdftoabw_OBJECTS) $(pdftoabw_LDADD) $(LIBS)
-pdftohtml$(EXEEXT): $(pdftohtml_OBJECTS) $(pdftohtml_DEPENDENCIES)
- @rm -f pdftohtml$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(pdftohtml_OBJECTS) $(pdftohtml_LDADD) $(LIBS)
-pdftoppm$(EXEEXT): $(pdftoppm_OBJECTS) $(pdftoppm_DEPENDENCIES)
- @rm -f pdftoppm$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(pdftoppm_OBJECTS) $(pdftoppm_LDADD) $(LIBS)
-pdftops$(EXEEXT): $(pdftops_OBJECTS) $(pdftops_DEPENDENCIES)
- @rm -f pdftops$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(pdftops_OBJECTS) $(pdftops_LDADD) $(LIBS)
-pdftotext$(EXEEXT): $(pdftotext_OBJECTS) $(pdftotext_DEPENDENCIES)
- @rm -f pdftotext$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(pdftotext_OBJECTS) $(pdftotext_LDADD) $(LIBS)
-
-mostlyclean-compile:
- -rm -f *.$(OBJEXT)
-
-distclean-compile:
- -rm -f *.tab.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/HtmlFonts.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/HtmlLinks.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/HtmlOutputDev.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImageOutputDev.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parseargs.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pdffonts.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pdfimages.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pdfinfo.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pdftoabw.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pdftohtml.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pdftoppm.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pdftops.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pdftotext.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printencodings.Po@am__quote@
-
-.c.o:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c $<
-
-.c.obj:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
-
-.c.lo:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
-
-.cc.o:
-@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
-
-.cc.obj:
-@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
-
-.cc.lo:
-@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
-@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-install-man1: $(dist_man1_MANS)
- @$(NORMAL_INSTALL)
- test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
- @list='$(dist_man1_MANS)'; test -n "$(man1dir)" || exit 0; \
- { for i in $$list; do echo "$$i"; done; \
- } | while read p; do \
- if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
- echo "$$d$$p"; echo "$$p"; \
- done | \
- sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
- -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
- sed 'N;N;s,\n, ,g' | { \
- list=; while read file base inst; do \
- if test "$$base" = "$$inst"; then list="$$list $$file"; else \
- echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
- $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \
- fi; \
- done; \
- for i in $$list; do echo "$$i"; done | $(am__base_list) | \
- while read files; do \
- test -z "$$files" || { \
- echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \
- $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \
- done; }
-
-uninstall-man1:
- @$(NORMAL_UNINSTALL)
- @list='$(dist_man1_MANS)'; test -n "$(man1dir)" || exit 0; \
- files=`{ for i in $$list; do echo "$$i"; done; \
- } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
- -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
- test -z "$$files" || { \
- echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(man1dir)" && rm -f $$files; }
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- set x; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- shift; \
- if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
- test -n "$$unique" || unique=$$empty_fix; \
- if test $$# -gt 0; then \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- "$$@" $$unique; \
- else \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$unique; \
- fi; \
- fi
-ctags: CTAGS
-CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- test -z "$(CTAGS_ARGS)$$unique" \
- || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$unique
-
-GTAGS:
- here=`$(am__cd) $(top_builddir) && pwd` \
- && $(am__cd) $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) "$$here"
-
-distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
- @list='$(MANS)'; if test -n "$$list"; then \
- list=`for p in $$list; do \
- if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
- if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
- if test -n "$$list" && \
- grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
- echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
- grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \
- echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \
- echo " typically \`make maintainer-clean' will remove them" >&2; \
- exit 1; \
- else :; fi; \
- else :; fi
- @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- list='$(DISTFILES)'; \
- dist_files=`for file in $$list; do echo $$file; done | \
- sed -e "s|^$$srcdirstrip/||;t" \
- -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
- case $$dist_files in \
- */*) $(MKDIR_P) `echo "$$dist_files" | \
- sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
- sort -u` ;; \
- esac; \
- for file in $$dist_files; do \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test -d "$(distdir)/$$file"; then \
- find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
- fi; \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
- find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
- fi; \
- cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
- else \
- test -f "$(distdir)/$$file" \
- || cp -p $$d/$$file "$(distdir)/$$file" \
- || exit 1; \
- fi; \
- done
-check-am: all-am
-check: check-am
-all-am: Makefile $(PROGRAMS) $(MANS)
-installdirs:
- for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; do \
- test -z "$$dir" || $(MKDIR_P) "$$dir"; \
- done
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
- -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-am
- -rm -rf ./$(DEPDIR)
- -rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-generic \
- distclean-tags
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-html-am:
-
-info: info-am
-
-info-am:
-
-install-data-am: install-man
-
-install-dvi: install-dvi-am
-
-install-dvi-am:
-
-install-exec-am: install-binPROGRAMS
-
-install-html: install-html-am
-
-install-html-am:
-
-install-info: install-info-am
-
-install-info-am:
-
-install-man: install-man1
-
-install-pdf: install-pdf-am
-
-install-pdf-am:
-
-install-ps: install-ps-am
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
- -rm -rf ./$(DEPDIR)
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-compile mostlyclean-generic \
- mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-binPROGRAMS uninstall-man
-
-uninstall-man: uninstall-man1
-
-.MAKE: install-am install-strip
-
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
- clean-generic clean-libtool ctags distclean distclean-compile \
- distclean-generic distclean-libtool distclean-tags distdir dvi \
- dvi-am html html-am info info-am install install-am \
- install-binPROGRAMS install-data install-data-am install-dvi \
- install-dvi-am install-exec install-exec-am install-html \
- install-html-am install-info install-info-am install-man \
- install-man1 install-pdf install-pdf-am install-ps \
- install-ps-am install-strip installcheck installcheck-am \
- installdirs maintainer-clean maintainer-clean-generic \
- mostlyclean mostlyclean-compile mostlyclean-generic \
- mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
- uninstall-am uninstall-binPROGRAMS uninstall-man \
- uninstall-man1
-
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/Build/source/libs/poppler/poppler-0.12.4/utils/parseargs.c b/Build/source/libs/poppler/poppler-0.12.4/utils/parseargs.c
deleted file mode 100644
index 8e84a9bd3b6..00000000000
--- a/Build/source/libs/poppler/poppler-0.12.4/utils/parseargs.c
+++ /dev/null
@@ -1,208 +0,0 @@
-/*
- * parseargs.h
- *
- * Command line argument parser.
- *
- * Copyright 1996-2003 Glyph & Cog, LLC
- */
-
-//========================================================================
-//
-// Modified under the Poppler project - http://poppler.freedesktop.org
-//
-// Poppler project changes to this file are under the GPLv2 or later license
-//
-// All changes made under the Poppler project to this file are licensed
-// under GPL version 2 or later
-//
-// Copyright (C) 2008, 2009 Albert Astals Cid <aacid@kde.org>
-//
-// To see a description of the changes please see the Changelog file that
-// came with your tarball or type make ChangeLog if you are building from git
-//
-//========================================================================
-
-#include <stdio.h>
-#include <stddef.h>
-#include <string.h>
-#include <stdlib.h>
-#include <ctype.h>
-#include "parseargs.h"
-
-#include "goo/gstrtod.h"
-
-static const ArgDesc *findArg(const ArgDesc *args, char *arg);
-static GBool grabArg(const ArgDesc *arg, int i, int *argc, char *argv[]);
-
-GBool parseArgs(const ArgDesc *args, int *argc, char *argv[]) {
- const ArgDesc *arg;
- int i, j;
- GBool ok;
-
- ok = gTrue;
- i = 1;
- while (i < *argc) {
- if (!strcmp(argv[i], "--")) {
- --*argc;
- for (j = i; j < *argc; ++j)
- argv[j] = argv[j+1];
- break;
- } else if ((arg = findArg(args, argv[i]))) {
- if (!grabArg(arg, i, argc, argv))
- ok = gFalse;
- } else {
- ++i;
- }
- }
- return ok;
-}
-
-void printUsage(char *program, char *otherArgs, const ArgDesc *args) {
- const ArgDesc *arg;
- char *typ;
- int w, w1;
-
- w = 0;
- for (arg = args; arg->arg; ++arg) {
- if ((w1 = strlen(arg->arg)) > w)
- w = w1;
- }
-
- fprintf(stderr, "Usage: %s [options]", program);
- if (otherArgs)
- fprintf(stderr, " %s", otherArgs);
- fprintf(stderr, "\n");
-
- for (arg = args; arg->arg; ++arg) {
- fprintf(stderr, " %s", arg->arg);
- w1 = 9 + w - strlen(arg->arg);
- switch (arg->kind) {
- case argInt:
- case argIntDummy:
- typ = " <int>";
- break;
- case argFP:
- case argFPDummy:
- typ = " <fp>";
- break;
- case argString:
- case argStringDummy:
- typ = " <string>";
- break;
- case argFlag:
- case argFlagDummy:
- default:
- typ = "";
- break;
- }
- fprintf(stderr, "%-*s", w1, typ);
- if (arg->usage)
- fprintf(stderr, ": %s", arg->usage);
- fprintf(stderr, "\n");
- }
-}
-
-static const ArgDesc *findArg(const ArgDesc *args, char *arg) {
- const ArgDesc *p;
-
- for (p = args; p->arg; ++p) {
- if (p->kind < argFlagDummy && !strcmp(p->arg, arg))
- return p;
- }
- return NULL;
-}
-
-static GBool grabArg(const ArgDesc *arg, int i, int *argc, char *argv[]) {
- int n;
- int j;
- GBool ok;
-
- ok = gTrue;
- n = 0;
- switch (arg->kind) {
- case argFlag:
- *(GBool *)arg->val = gTrue;
- n = 1;
- break;
- case argInt:
- if (i + 1 < *argc && isInt(argv[i+1])) {
- *(int *)arg->val = atoi(argv[i+1]);
- n = 2;
- } else {
- ok = gFalse;
- n = 1;
- }
- break;
- case argFP:
- if (i + 1 < *argc && isFP(argv[i+1])) {
- *(double *)arg->val = gatof(argv[i+1]);
- n = 2;
- } else {
- ok = gFalse;
- n = 1;
- }
- break;
- case argString:
- if (i + 1 < *argc) {
- strncpy((char *)arg->val, argv[i+1], arg->size - 1);
- ((char *)arg->val)[arg->size - 1] = '\0';
- n = 2;
- } else {
- ok = gFalse;
- n = 1;
- }
- break;
- default:
- fprintf(stderr, "Internal error in arg table\n");
- n = 1;
- break;
- }
- if (n > 0) {
- *argc -= n;
- for (j = i; j < *argc; ++j)
- argv[j] = argv[j+n];
- }
- return ok;
-}
-
-GBool isInt(char *s) {
- if (*s == '-' || *s == '+')
- ++s;
- while (isdigit(*s))
- ++s;
- if (*s)
- return gFalse;
- return gTrue;
-}
-
-GBool isFP(char *s) {
- int n;
-
- if (*s == '-' || *s == '+')
- ++s;
- n = 0;
- while (isdigit(*s)) {
- ++s;
- ++n;
- }
- if (*s == '.')
- ++s;
- while (isdigit(*s)) {
- ++s;
- ++n;
- }
- if (n > 0 && (*s == 'e' || *s == 'E')) {
- ++s;
- if (*s == '-' || *s == '+')
- ++s;
- n = 0;
- if (!isdigit(*s))
- return gFalse;
- do {
- ++s;
- } while (isdigit(*s));
- }
- if (*s)
- return gFalse;
- return gTrue;
-}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/utils/parseargs.h b/Build/source/libs/poppler/poppler-0.12.4/utils/parseargs.h
deleted file mode 100644
index 4418421783d..00000000000
--- a/Build/source/libs/poppler/poppler-0.12.4/utils/parseargs.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * parseargs.h
- *
- * Command line argument parser.
- *
- * Copyright 1996-2003 Glyph & Cog, LLC
- */
-
-//========================================================================
-//
-// Modified under the Poppler project - http://poppler.freedesktop.org
-//
-// All changes made under the Poppler project to this file are licensed
-// under GPL version 2 or later
-//
-// Copyright (C) 2008 Albert Astals Cid <aacid@kde.org>
-//
-// To see a description of the changes please see the Changelog file that
-// came with your tarball or type make ChangeLog if you are building from git
-//
-//========================================================================
-
-#ifndef PARSEARGS_H
-#define PARSEARGS_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "goo/gtypes.h"
-
-/*
- * Argument kinds.
- */
-typedef enum {
- argFlag, /* flag (present / not-present) */
- /* [val: GBool *] */
- argInt, /* integer arg */
- /* [val: int *] */
- argFP, /* floating point arg */
- /* [val: double *] */
- argString, /* string arg */
- /* [val: char *] */
- /* dummy entries -- these show up in the usage listing only; */
- /* useful for X args, for example */
- argFlagDummy,
- argIntDummy,
- argFPDummy,
- argStringDummy
-} ArgKind;
-
-/*
- * Argument descriptor.
- */
-typedef struct {
- char *arg; /* the command line switch */
- ArgKind kind; /* kind of arg */
- void *val; /* place to store value */
- int size; /* for argString: size of string */
- char *usage; /* usage string */
-} ArgDesc;
-
-/*
- * Parse command line. Removes all args which are found in the arg
- * descriptor list <args>. Stops parsing if "--" is found (and removes
- * it). Returns gFalse if there was an error.
- */
-extern GBool parseArgs(const ArgDesc *args, int *argc, char *argv[]);
-
-/*
- * Print usage message, based on arg descriptor list.
- */
-extern void printUsage(char *program, char *otherArgs, const ArgDesc *args);
-
-/*
- * Check if a string is a valid integer or floating point number.
- */
-extern GBool isInt(char *s);
-extern GBool isFP(char *s);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/utils/pdf2xml.dtd b/Build/source/libs/poppler/poppler-0.12.4/utils/pdf2xml.dtd
deleted file mode 100644
index 1afa4fe9aa0..00000000000
--- a/Build/source/libs/poppler/poppler-0.12.4/utils/pdf2xml.dtd
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0"?>
-<!ELEMENT pdf2xml (page+)>
-<!ELEMENT page (fontspec*, text*)>
-<!ATTLIST page
- number CDATA #REQUIRED
- position CDATA #REQUIRED
- top CDATA #REQUIRED
- left CDATA #REQUIRED
- height CDATA #REQUIRED
- width CDATA #REQUIRED
->
-<!ELEMENT fontspec EMPTY>
-<!ATTLIST fontspec
- id CDATA #REQUIRED
- size CDATA #REQUIRED
- family CDATA #REQUIRED
- color CDATA #REQUIRED
->
-<!ELEMENT text (#PCDATA | b | i)*>
-<!ATTLIST text
- top CDATA #REQUIRED
- left CDATA #REQUIRED
- width CDATA #REQUIRED
- height CDATA #REQUIRED
- font CDATA #REQUIRED
->
-<!ELEMENT b (#PCDATA)>
-<!ELEMENT i (#PCDATA)>
diff --git a/Build/source/libs/poppler/poppler-0.12.4/utils/pdffonts.1 b/Build/source/libs/poppler/poppler-0.12.4/utils/pdffonts.1
deleted file mode 100644
index fd7386c4ae2..00000000000
--- a/Build/source/libs/poppler/poppler-0.12.4/utils/pdffonts.1
+++ /dev/null
@@ -1,110 +0,0 @@
-.\" Copyright 1999-2004 Glyph & Cog, LLC
-.TH pdffonts 1 "22 January 2004"
-.SH NAME
-pdffonts \- Portable Document Format (PDF) font analyzer (version
-3.00)
-.SH SYNOPSIS
-.B pdffonts
-[options]
-.RI [ PDF-file ]
-.SH DESCRIPTION
-.B Pdffonts
-lists the fonts used in a Portable Document Format (PDF) file along
-with various information for each font.
-.PP
-The following information is listed for each font:
-.TP
-.B name
-the font name, exactly as given in the PDF file (potentially including
-a subset prefix)
-.TP
-.B type
-the font type -- see below for details
-.TP
-.B emb
-"yes" if the font is embedded in the PDF file
-.TP
-.B sub
-"yes" if the font is a subset
-.TP
-.B uni
-"yes" if there is an explicit "ToUnicode" map in the PDF file (the
-absence of a ToUnicode map doesn't necessarily mean that the text
-can't be converted to Unicode)
-.TP
-.B object ID
-the font dictionary object ID (number and generation)
-.PP
-PDF files can contain the following types of fonts:
-.PP
-.RS
-Type 1
-.RE
-.RS
-Type 1C -- aka Compact Font Format (CFF)
-.RE
-.RS
-Type 3
-.RE
-.RS
-TrueType
-.RE
-.RS
-CID Type 0 -- 16-bit font with no specified type
-.RE
-.RS
-CID Type 0C -- 16-bit PostScript CFF font
-.RE
-.RS
-CID TrueType -- 16-bit TrueType font
-.RE
-.SH OPTIONS
-.TP
-.BI \-f " number"
-Specifies the first page to analyze.
-.TP
-.BI \-l " number"
-Specifies the last page to analyze.
-.TP
-.BI \-opw " password"
-Specify the owner password for the PDF file. Providing this will
-bypass all security restrictions.
-.TP
-.BI \-upw " password"
-Specify the user password for the PDF file.
-.TP
-.B \-v
-Print copyright and version information.
-.TP
-.B \-h
-Print usage information.
-.RB ( \-help
-and
-.B \-\-help
-are equivalent.)
-.SH EXIT CODES
-The Xpdf tools use the following exit codes:
-.TP
-0
-No error.
-.TP
-1
-Error opening a PDF file.
-.TP
-2
-Error opening an output file.
-.TP
-3
-Error related to PDF permissions.
-.TP
-99
-Other error.
-.SH AUTHOR
-The pdffonts software and documentation are copyright 1996-2004 Glyph
-& Cog, LLC.
-.SH "SEE ALSO"
-.BR pdftops (1),
-.BR pdftotext (1),
-.BR pdfinfo (1),
-.BR pdftoppm (1),
-.BR pdfimages (1),
diff --git a/Build/source/libs/poppler/poppler-0.12.4/utils/pdffonts.cc b/Build/source/libs/poppler/poppler-0.12.4/utils/pdffonts.cc
deleted file mode 100644
index 752fa15ea42..00000000000
--- a/Build/source/libs/poppler/poppler-0.12.4/utils/pdffonts.cc
+++ /dev/null
@@ -1,320 +0,0 @@
-//========================================================================
-//
-// pdffonts.cc
-//
-// Copyright 2001-2007 Glyph & Cog, LLC
-//
-//========================================================================
-
-//========================================================================
-//
-// Modified under the Poppler project - http://poppler.freedesktop.org
-//
-// All changes made under the Poppler project to this file are licensed
-// under GPL version 2 or later
-//
-// Copyright (C) 2006 Dominic Lachowicz <cinamod@hotmail.com>
-// Copyright (C) 2007-2008 Albert Astals Cid <aacid@kde.org>
-//
-// To see a description of the changes please see the Changelog file that
-// came with your tarball or type make ChangeLog if you are building from git
-//
-//========================================================================
-
-#include "config.h"
-#include <poppler-config.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <stddef.h>
-#include <string.h>
-#include <math.h>
-#include "parseargs.h"
-#include "goo/GooString.h"
-#include "goo/gmem.h"
-#include "GlobalParams.h"
-#include "Error.h"
-#include "Object.h"
-#include "Dict.h"
-#include "GfxFont.h"
-#include "Annot.h"
-#include "PDFDoc.h"
-
-static char *fontTypeNames[] = {
- "unknown",
- "Type 1",
- "Type 1C",
- "Type 1C (OT)",
- "Type 3",
- "TrueType",
- "TrueType (OT)",
- "CID Type 0",
- "CID Type 0C",
- "CID Type 0C (OT)",
- "CID TrueType",
- "CID TrueType (OT)"
-};
-
-static void scanFonts(Dict *resDict, PDFDoc *doc);
-static void scanFont(GfxFont *font, PDFDoc *doc);
-
-static int firstPage = 1;
-static int lastPage = 0;
-static char ownerPassword[33] = "\001";
-static char userPassword[33] = "\001";
-static GBool printVersion = gFalse;
-static GBool printHelp = gFalse;
-
-static const ArgDesc argDesc[] = {
- {"-f", argInt, &firstPage, 0,
- "first page to examine"},
- {"-l", argInt, &lastPage, 0,
- "last page to examine"},
- {"-opw", argString, ownerPassword, sizeof(ownerPassword),
- "owner password (for encrypted files)"},
- {"-upw", argString, userPassword, sizeof(userPassword),
- "user password (for encrypted files)"},
- {"-v", argFlag, &printVersion, 0,
- "print copyright and version info"},
- {"-h", argFlag, &printHelp, 0,
- "print usage information"},
- {"-help", argFlag, &printHelp, 0,
- "print usage information"},
- {"--help", argFlag, &printHelp, 0,
- "print usage information"},
- {"-?", argFlag, &printHelp, 0,
- "print usage information"},
- {NULL}
-};
-
-static Ref *fonts;
-static int fontsLen;
-static int fontsSize;
-
-int main(int argc, char *argv[]) {
- PDFDoc *doc;
- GooString *fileName;
- GooString *ownerPW, *userPW;
- GBool ok;
- Page *page;
- Dict *resDict;
- Annots *annots;
- Object obj1, obj2;
- int pg, i;
- int exitCode;
-
- exitCode = 99;
-
- // parse args
- ok = parseArgs(argDesc, &argc, argv);
- if (!ok || argc != 2 || printVersion || printHelp) {
- fprintf(stderr, "pdffonts version %s\n", PACKAGE_VERSION);
- fprintf(stderr, "%s\n", popplerCopyright);
- fprintf(stderr, "%s\n", xpdfCopyright);
- if (!printVersion) {
- printUsage("pdffonts", "<PDF-file>", argDesc);
- }
- goto err0;
- }
- fileName = new GooString(argv[1]);
-
- // read config file
- globalParams = new GlobalParams();
-
- // open PDF file
- if (ownerPassword[0] != '\001') {
- ownerPW = new GooString(ownerPassword);
- } else {
- ownerPW = NULL;
- }
- if (userPassword[0] != '\001') {
- userPW = new GooString(userPassword);
- } else {
- userPW = NULL;
- }
-
- if(fileName->cmp("-") != 0) {
- doc = new PDFDoc(fileName, ownerPW, userPW);
- } else {
- Object obj;
-
- obj.initNull();
- doc = new PDFDoc(new FileStream(stdin, 0, gFalse, 0, &obj), ownerPW, userPW);
- }
-
- if (userPW) {
- delete userPW;
- }
- if (ownerPW) {
- delete ownerPW;
- }
- if (!doc->isOk()) {
- exitCode = 1;
- goto err1;
- }
-
- // get page range
- if (firstPage < 1) {
- firstPage = 1;
- }
- if (lastPage < 1 || lastPage > doc->getNumPages()) {
- lastPage = doc->getNumPages();
- }
-
- // scan the fonts
- printf("name type emb sub uni object ID\n");
- printf("------------------------------------ ----------------- --- --- --- ---------\n");
- fonts = NULL;
- fontsLen = fontsSize = 0;
- for (pg = firstPage; pg <= lastPage; ++pg) {
- page = doc->getCatalog()->getPage(pg);
- if ((resDict = page->getResourceDict())) {
- scanFonts(resDict, doc);
- }
- annots = new Annots(doc->getXRef(),
- doc->getCatalog(),
- page->getAnnots(&obj1));
- obj1.free();
- for (i = 0; i < annots->getNumAnnots(); ++i) {
- if (annots->getAnnot(i)->getAppearance(&obj1)->isStream()) {
- obj1.streamGetDict()->lookup("Resources", &obj2);
- if (obj2.isDict()) {
- scanFonts(obj2.getDict(), doc);
- }
- obj2.free();
- }
- obj1.free();
- }
- delete annots;
- }
-
- exitCode = 0;
-
- // clean up
- gfree(fonts);
- err1:
- delete doc;
- delete globalParams;
- err0:
-
- // check for memory leaks
- Object::memCheck(stderr);
- gMemReport(stderr);
-
- return exitCode;
-}
-
-static void scanFonts(Dict *resDict, PDFDoc *doc) {
- Object obj1, obj2, xObjDict, xObj, resObj;
- Ref r;
- GfxFontDict *gfxFontDict;
- GfxFont *font;
- int i;
-
- // scan the fonts in this resource dictionary
- gfxFontDict = NULL;
- resDict->lookupNF("Font", &obj1);
- if (obj1.isRef()) {
- obj1.fetch(doc->getXRef(), &obj2);
- if (obj2.isDict()) {
- r = obj1.getRef();
- gfxFontDict = new GfxFontDict(doc->getXRef(), &r, obj2.getDict());
- }
- obj2.free();
- } else if (obj1.isDict()) {
- gfxFontDict = new GfxFontDict(doc->getXRef(), NULL, obj1.getDict());
- }
- if (gfxFontDict) {
- for (i = 0; i < gfxFontDict->getNumFonts(); ++i) {
- if ((font = gfxFontDict->getFont(i))) {
- scanFont(font, doc);
- }
- }
- delete gfxFontDict;
- }
- obj1.free();
-
- // recursively scan any resource dictionaries in objects in this
- // resource dictionary
- resDict->lookup("XObject", &xObjDict);
- if (xObjDict.isDict()) {
- for (i = 0; i < xObjDict.dictGetLength(); ++i) {
- xObjDict.dictGetVal(i, &xObj);
- if (xObj.isStream()) {
- xObj.streamGetDict()->lookup("Resources", &resObj);
- if (resObj.isDict()) {
- scanFonts(resObj.getDict(), doc);
- }
- resObj.free();
- }
- xObj.free();
- }
- }
- xObjDict.free();
-}
-
-static void scanFont(GfxFont *font, PDFDoc *doc) {
- Ref fontRef, embRef;
- Object fontObj, toUnicodeObj;
- GooString *name;
- GBool emb, subset, hasToUnicode;
- int i;
-
- fontRef = *font->getID();
-
- // check for an already-seen font
- for (i = 0; i < fontsLen; ++i) {
- if (fontRef.num == fonts[i].num && fontRef.gen == fonts[i].gen) {
- return;
- }
- }
-
- // font name
- name = font->getOrigName();
-
- // check for an embedded font
- if (font->getType() == fontType3) {
- emb = gTrue;
- } else {
- emb = font->getEmbeddedFontID(&embRef);
- }
-
- // look for a ToUnicode map
- hasToUnicode = gFalse;
- if (doc->getXRef()->fetch(fontRef.num, fontRef.gen, &fontObj)->isDict()) {
- hasToUnicode = fontObj.dictLookup("ToUnicode", &toUnicodeObj)->isStream();
- toUnicodeObj.free();
- }
- fontObj.free();
-
- // check for a font subset name: capital letters followed by a '+'
- // sign
- subset = gFalse;
- if (name) {
- for (i = 0; i < name->getLength(); ++i) {
- if (name->getChar(i) < 'A' || name->getChar(i) > 'Z') {
- break;
- }
- }
- subset = i > 0 && i < name->getLength() && name->getChar(i) == '+';
- }
-
- // print the font info
- printf("%-36s %-17s %-3s %-3s %-3s",
- name ? name->getCString() : "[none]",
- fontTypeNames[font->getType()],
- emb ? "yes" : "no",
- subset ? "yes" : "no",
- hasToUnicode ? "yes" : "no");
- if (fontRef.gen >= 100000) {
- printf(" [none]\n");
- } else {
- printf(" %6d %2d\n", fontRef.num, fontRef.gen);
- }
-
- // add this font to the list
- if (fontsLen == fontsSize) {
- fontsSize += 32;
- fonts = (Ref *)grealloc(fonts, fontsSize * sizeof(Ref));
- }
- fonts[fontsLen++] = *font->getID();
-}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/utils/pdfimages.1 b/Build/source/libs/poppler/poppler-0.12.4/utils/pdfimages.1
deleted file mode 100644
index ff31d850499..00000000000
--- a/Build/source/libs/poppler/poppler-0.12.4/utils/pdfimages.1
+++ /dev/null
@@ -1,82 +0,0 @@
-.\" Copyright 1998-2004 Glyph & Cog, LLC
-.TH pdfimages 1 "22 January 2004"
-.SH NAME
-pdfimages \- Portable Document Format (PDF) image extractor
-(version 3.00)
-.SH SYNOPSIS
-.B pdfimages
-[options]
-.I PDF-file image-root
-.SH DESCRIPTION
-.B Pdfimages
-saves images from a Portable Document Format (PDF) file as Portable
-Pixmap (PPM), Portable Bitmap (PBM), or JPEG files.
-.PP
-Pdfimages reads the PDF file
-.IR PDF-file ,
-scans one or more pages, and writes one PPM, PBM, or JPEG file for each image,
-.IR image-root - nnn . xxx ,
-where
-.I nnn
-is the image number and
-.I xxx
-is the image type (.ppm, .pbm, .jpg).
-.SH OPTIONS
-.TP
-.BI \-f " number"
-Specifies the first page to scan.
-.TP
-.BI \-l " number"
-Specifies the last page to scan.
-.TP
-.B \-j
-Normally, all images are written as PBM (for monochrome images) or PPM
-(for non-monochrome images) files. With this option, images in DCT
-format are saved as JPEG files. All non-DCT images are saved in
-PBM/PPM format as usual.
-.TP
-.BI \-opw " password"
-Specify the owner password for the PDF file. Providing this will
-bypass all security restrictions.
-.TP
-.BI \-upw " password"
-Specify the user password for the PDF file.
-.TP
-.B \-q
-Don't print any messages or errors.
-.TP
-.B \-v
-Print copyright and version information.
-.TP
-.B \-h
-Print usage information.
-.RB ( \-help
-and
-.B \-\-help
-are equivalent.)
-.SH EXIT CODES
-The Xpdf tools use the following exit codes:
-.TP
-0
-No error.
-.TP
-1
-Error opening a PDF file.
-.TP
-2
-Error opening an output file.
-.TP
-3
-Error related to PDF permissions.
-.TP
-99
-Other error.
-.SH AUTHOR
-The pdfimages software and documentation are copyright 1998-2004 Glyph
-& Cog, LLC.
-.SH "SEE ALSO"
-.BR pdftops (1),
-.BR pdftotext (1),
-.BR pdfinfo (1),
-.BR pdffonts (1),
-.BR pdftoppm (1),
diff --git a/Build/source/libs/poppler/poppler-0.12.4/utils/pdfimages.cc b/Build/source/libs/poppler/poppler-0.12.4/utils/pdfimages.cc
deleted file mode 100644
index b821c799205..00000000000
--- a/Build/source/libs/poppler/poppler-0.12.4/utils/pdfimages.cc
+++ /dev/null
@@ -1,171 +0,0 @@
-//========================================================================
-//
-// pdfimages.cc
-//
-// Copyright 1998-2003 Glyph & Cog, LLC
-//
-// Modified for Debian by Hamish Moffatt, 22 May 2002.
-//
-//========================================================================
-
-//========================================================================
-//
-// Modified under the Poppler project - http://poppler.freedesktop.org
-//
-// All changes made under the Poppler project to this file are licensed
-// under GPL version 2 or later
-//
-// Copyright (C) 2007-2008 Albert Astals Cid <aacid@kde.org>
-//
-// To see a description of the changes please see the Changelog file that
-// came with your tarball or type make ChangeLog if you are building from git
-//
-//========================================================================
-
-#include "config.h"
-#include <poppler-config.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <stddef.h>
-#include <string.h>
-#include "parseargs.h"
-#include "goo/GooString.h"
-#include "goo/gmem.h"
-#include "GlobalParams.h"
-#include "Object.h"
-#include "Stream.h"
-#include "Array.h"
-#include "Dict.h"
-#include "XRef.h"
-#include "Catalog.h"
-#include "Page.h"
-#include "PDFDoc.h"
-#include "ImageOutputDev.h"
-#include "Error.h"
-
-static int firstPage = 1;
-static int lastPage = 0;
-static GBool dumpJPEG = gFalse;
-static char ownerPassword[33] = "\001";
-static char userPassword[33] = "\001";
-static GBool quiet = gFalse;
-static GBool printVersion = gFalse;
-static GBool printHelp = gFalse;
-
-static const ArgDesc argDesc[] = {
- {"-f", argInt, &firstPage, 0,
- "first page to convert"},
- {"-l", argInt, &lastPage, 0,
- "last page to convert"},
- {"-j", argFlag, &dumpJPEG, 0,
- "write JPEG images as JPEG files"},
- {"-opw", argString, ownerPassword, sizeof(ownerPassword),
- "owner password (for encrypted files)"},
- {"-upw", argString, userPassword, sizeof(userPassword),
- "user password (for encrypted files)"},
- {"-q", argFlag, &quiet, 0,
- "don't print any messages or errors"},
- {"-v", argFlag, &printVersion, 0,
- "print copyright and version info"},
- {"-h", argFlag, &printHelp, 0,
- "print usage information"},
- {"-help", argFlag, &printHelp, 0,
- "print usage information"},
- {"--help", argFlag, &printHelp, 0,
- "print usage information"},
- {"-?", argFlag, &printHelp, 0,
- "print usage information"},
- {NULL}
-};
-
-int main(int argc, char *argv[]) {
- PDFDoc *doc;
- GooString *fileName;
- char *imgRoot;
- GooString *ownerPW, *userPW;
- ImageOutputDev *imgOut;
- GBool ok;
- int exitCode;
-
- exitCode = 99;
-
- // parse args
- ok = parseArgs(argDesc, &argc, argv);
- if (!ok || argc != 3 || printVersion || printHelp) {
- fprintf(stderr, "pdfimages version %s\n", PACKAGE_VERSION);
- fprintf(stderr, "%s\n", popplerCopyright);
- fprintf(stderr, "%s\n", xpdfCopyright);
- if (!printVersion) {
- printUsage("pdfimages", "<PDF-file> <image-root>", argDesc);
- }
- goto err0;
- }
- fileName = new GooString(argv[1]);
- imgRoot = argv[2];
-
- // read config file
- globalParams = new GlobalParams();
- if (quiet) {
- globalParams->setErrQuiet(quiet);
- }
-
- // open PDF file
- if (ownerPassword[0] != '\001') {
- ownerPW = new GooString(ownerPassword);
- } else {
- ownerPW = NULL;
- }
- if (userPassword[0] != '\001') {
- userPW = new GooString(userPassword);
- } else {
- userPW = NULL;
- }
- doc = new PDFDoc(fileName, ownerPW, userPW);
- if (userPW) {
- delete userPW;
- }
- if (ownerPW) {
- delete ownerPW;
- }
- if (!doc->isOk()) {
- exitCode = 1;
- goto err1;
- }
-
- // check for copy permission
-#ifdef ENFORCE_PERMISSIONS
- if (!doc->okToCopy()) {
- error(-1, "Copying of images from this document is not allowed.");
- exitCode = 3;
- goto err1;
- }
-#endif
-
- // get page range
- if (firstPage < 1)
- firstPage = 1;
- if (lastPage < 1 || lastPage > doc->getNumPages())
- lastPage = doc->getNumPages();
-
- // write image files
- imgOut = new ImageOutputDev(imgRoot, dumpJPEG);
- if (imgOut->isOk()) {
- doc->displayPages(imgOut, firstPage, lastPage, 72, 72, 0,
- gTrue, gFalse, gFalse);
- }
- delete imgOut;
-
- exitCode = 0;
-
- // clean up
- err1:
- delete doc;
- delete globalParams;
- err0:
-
- // check for memory leaks
- Object::memCheck(stderr);
- gMemReport(stderr);
-
- return exitCode;
-}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/utils/pdfinfo.1 b/Build/source/libs/poppler/poppler-0.12.4/utils/pdfinfo.1
deleted file mode 100644
index 1f5528a9bb9..00000000000
--- a/Build/source/libs/poppler/poppler-0.12.4/utils/pdfinfo.1
+++ /dev/null
@@ -1,137 +0,0 @@
-.\" Copyright 1999-2004 Glyph & Cog, LLC
-.TH pdfinfo 1 "22 January 2004"
-.SH NAME
-pdfinfo \- Portable Document Format (PDF) document information
-extractor (version 3.00)
-.SH SYNOPSIS
-.B pdfinfo
-[options]
-.RI [ PDF-file ]
-.SH DESCRIPTION
-.B Pdfinfo
-prints the contents of the \'Info' dictionary (plus some other useful
-information) from a Portable Document Format (PDF) file.
-.PP
-The \'Info' dictionary contains the following values:
-.PP
-.RS
-title
-.RE
-.RS
-subject
-.RE
-.RS
-keywords
-.RE
-.RS
-author
-.RE
-.RS
-creator
-.RE
-.RS
-producer
-.RE
-.RS
-creation date
-.RE
-.RS
-modification date
-.RE
-.PP
-In addition, the following information is printed:
-.PP
-.RS
-tagged (yes/no)
-.RE
-.RS
-page count
-.RE
-.RS
-encrypted flag (yes/no)
-.RE
-.RS
-print and copy permissions (if encrypted)
-.RE
-.RS
-page size
-.RE
-.RS
-file size
-.RE
-.RS
-linearized (yes/no)
-.RE
-.RS
-PDF version
-.RE
-.RS
-metadata (only if requested)
-.RE
-.SH OPTIONS
-.TP
-.BI \-f " number"
-Specifies the first page to examine. If multiple pages are requested
-using the "\-f" and "\-l" options, the size of each requested page (and,
-optionally, the bounding boxes for each requested page) are printed.
-Otherwise, only page one is examined.
-.TP
-.BI \-l " number"
-Specifies the last page to examine.
-.TP
-.B \-box
-Prints the page box bounding boxes: MediaBox, CropBox, BleedBox,
-TrimBox, and ArtBox.
-.TP
-.B \-meta
-Prints document-level metadata. (This is the "Metadata" stream from
-the PDF file's Catalog object.)
-.TP
-.BI \-enc " encoding-name"
-Sets the encoding to use for text output. This defaults to "UTF-8".
-.TP
-.B \-listenc
-Lits the available encodings
-.TP
-.BI \-opw " password"
-Specify the owner password for the PDF file. Providing this will
-bypass all security restrictions.
-.TP
-.BI \-upw " password"
-Specify the user password for the PDF file.
-.TP
-.B \-v
-Print copyright and version information.
-.TP
-.B \-h
-Print usage information.
-.RB ( \-help
-and
-.B \-\-help
-are equivalent.)
-.SH EXIT CODES
-The Xpdf tools use the following exit codes:
-.TP
-0
-No error.
-.TP
-1
-Error opening a PDF file.
-.TP
-2
-Error opening an output file.
-.TP
-3
-Error related to PDF permissions.
-.TP
-99
-Other error.
-.SH AUTHOR
-The pdfinfo software and documentation are copyright 1996-2004 Glyph &
-Cog, LLC.
-.SH "SEE ALSO"
-.BR pdftops (1),
-.BR pdftotext (1),
-.BR pdffonts (1),
-.BR pdftoppm (1),
-.BR pdfimages (1),
diff --git a/Build/source/libs/poppler/poppler-0.12.4/utils/pdfinfo.cc b/Build/source/libs/poppler/poppler-0.12.4/utils/pdfinfo.cc
deleted file mode 100644
index bfbe0b3d985..00000000000
--- a/Build/source/libs/poppler/poppler-0.12.4/utils/pdfinfo.cc
+++ /dev/null
@@ -1,410 +0,0 @@
-//========================================================================
-//
-// pdfinfo.cc
-//
-// Copyright 1998-2003 Glyph & Cog, LLC
-//
-//========================================================================
-
-//========================================================================
-//
-// Modified under the Poppler project - http://poppler.freedesktop.org
-//
-// All changes made under the Poppler project to this file are licensed
-// under GPL version 2 or later
-//
-// Copyright (C) 2006 Dom Lachowicz <cinamod@hotmail.com>
-// Copyright (C) 2007-2009 Albert Astals Cid <aacid@kde.org>
-//
-// To see a description of the changes please see the Changelog file that
-// came with your tarball or type make ChangeLog if you are building from git
-//
-//========================================================================
-
-#include "config.h"
-#include <poppler-config.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <stddef.h>
-#include <string.h>
-#include <time.h>
-#include <math.h>
-#include "parseargs.h"
-#include "printencodings.h"
-#include "goo/GooString.h"
-#include "goo/gmem.h"
-#include "GlobalParams.h"
-#include "Object.h"
-#include "Stream.h"
-#include "Array.h"
-#include "Dict.h"
-#include "XRef.h"
-#include "Catalog.h"
-#include "Page.h"
-#include "PDFDoc.h"
-#include "CharTypes.h"
-#include "UnicodeMap.h"
-#include "PDFDocEncoding.h"
-#include "Error.h"
-#include "DateInfo.h"
-
-static void printInfoString(Dict *infoDict, char *key, char *text,
- UnicodeMap *uMap);
-static void printInfoDate(Dict *infoDict, char *key, char *text);
-static void printBox(char *text, PDFRectangle *box);
-
-static int firstPage = 1;
-static int lastPage = 0;
-static GBool printBoxes = gFalse;
-static GBool printMetadata = gFalse;
-static char textEncName[128] = "";
-static char ownerPassword[33] = "\001";
-static char userPassword[33] = "\001";
-static GBool printVersion = gFalse;
-static GBool printHelp = gFalse;
-static GBool printEnc = gFalse;
-
-static const ArgDesc argDesc[] = {
- {"-f", argInt, &firstPage, 0,
- "first page to convert"},
- {"-l", argInt, &lastPage, 0,
- "last page to convert"},
- {"-box", argFlag, &printBoxes, 0,
- "print the page bounding boxes"},
- {"-meta", argFlag, &printMetadata, 0,
- "print the document metadata (XML)"},
- {"-enc", argString, textEncName, sizeof(textEncName),
- "output text encoding name"},
- {"-listenc",argFlag, &printEnc, 0,
- "list available encodings"},
- {"-opw", argString, ownerPassword, sizeof(ownerPassword),
- "owner password (for encrypted files)"},
- {"-upw", argString, userPassword, sizeof(userPassword),
- "user password (for encrypted files)"},
- {"-v", argFlag, &printVersion, 0,
- "print copyright and version info"},
- {"-h", argFlag, &printHelp, 0,
- "print usage information"},
- {"-help", argFlag, &printHelp, 0,
- "print usage information"},
- {"--help", argFlag, &printHelp, 0,
- "print usage information"},
- {"-?", argFlag, &printHelp, 0,
- "print usage information"},
- {NULL}
-};
-
-int main(int argc, char *argv[]) {
- PDFDoc *doc;
- GooString *fileName;
- GooString *ownerPW, *userPW;
- UnicodeMap *uMap;
- Page *page;
- Object info;
- char buf[256];
- double w, h, wISO, hISO;
- FILE *f;
- GooString *metadata;
- GBool ok;
- int exitCode;
- int pg, i;
- GBool multiPage;
-
- exitCode = 99;
-
- // parse args
- ok = parseArgs(argDesc, &argc, argv);
- if (!ok || (argc != 2 && !printEnc) || printVersion || printHelp) {
- fprintf(stderr, "pdfinfo version %s\n", PACKAGE_VERSION);
- fprintf(stderr, "%s\n", popplerCopyright);
- fprintf(stderr, "%s\n", xpdfCopyright);
- if (!printVersion) {
- printUsage("pdfinfo", "<PDF-file>", argDesc);
- }
- goto err0;
- }
-
- // read config file
- globalParams = new GlobalParams();
-
- if (printEnc) {
- printEncodings();
- delete globalParams;
- goto err0;
- }
-
- fileName = new GooString(argv[1]);
-
- if (textEncName[0]) {
- globalParams->setTextEncoding(textEncName);
- }
-
- // get mapping to output encoding
- if (!(uMap = globalParams->getTextEncoding())) {
- error(-1, "Couldn't get text encoding");
- delete fileName;
- goto err1;
- }
-
- // open PDF file
- if (ownerPassword[0] != '\001') {
- ownerPW = new GooString(ownerPassword);
- } else {
- ownerPW = NULL;
- }
- if (userPassword[0] != '\001') {
- userPW = new GooString(userPassword);
- } else {
- userPW = NULL;
- }
-
- if(fileName->cmp("-") != 0) {
- doc = new PDFDoc(fileName, ownerPW, userPW);
- } else {
- Object obj;
-
- obj.initNull();
- doc = new PDFDoc(new FileStream(stdin, 0, gFalse, 0, &obj), ownerPW, userPW);
- }
-
- if (userPW) {
- delete userPW;
- }
- if (ownerPW) {
- delete ownerPW;
- }
- if (!doc->isOk()) {
- exitCode = 1;
- goto err2;
- }
-
- // get page range
- if (firstPage < 1) {
- firstPage = 1;
- }
- if (lastPage == 0) {
- multiPage = gFalse;
- lastPage = 1;
- } else {
- multiPage = gTrue;
- }
- if (lastPage < 1 || lastPage > doc->getNumPages()) {
- lastPage = doc->getNumPages();
- }
-
- // print doc info
- doc->getDocInfo(&info);
- if (info.isDict()) {
- printInfoString(info.getDict(), "Title", "Title: ", uMap);
- printInfoString(info.getDict(), "Subject", "Subject: ", uMap);
- printInfoString(info.getDict(), "Keywords", "Keywords: ", uMap);
- printInfoString(info.getDict(), "Author", "Author: ", uMap);
- printInfoString(info.getDict(), "Creator", "Creator: ", uMap);
- printInfoString(info.getDict(), "Producer", "Producer: ", uMap);
- printInfoDate(info.getDict(), "CreationDate", "CreationDate: ");
- printInfoDate(info.getDict(), "ModDate", "ModDate: ");
- }
- info.free();
-
- // print tagging info
- printf("Tagged: %s\n",
- doc->getStructTreeRoot()->isDict() ? "yes" : "no");
-
- // print page count
- printf("Pages: %d\n", doc->getNumPages());
-
- // print encryption info
- printf("Encrypted: ");
- if (doc->isEncrypted()) {
- printf("yes (print:%s copy:%s change:%s addNotes:%s)\n",
- doc->okToPrint(gTrue) ? "yes" : "no",
- doc->okToCopy(gTrue) ? "yes" : "no",
- doc->okToChange(gTrue) ? "yes" : "no",
- doc->okToAddNotes(gTrue) ? "yes" : "no");
- } else {
- printf("no\n");
- }
-
- // print page size
- for (pg = firstPage; pg <= lastPage; ++pg) {
- w = doc->getPageCropWidth(pg);
- h = doc->getPageCropHeight(pg);
- if (multiPage) {
- printf("Page %4d size: %g x %g pts", pg, w, h);
- } else {
- printf("Page size: %g x %g pts", w, h);
- }
- if ((fabs(w - 612) < 0.1 && fabs(h - 792) < 0.1) ||
- (fabs(w - 792) < 0.1 && fabs(h - 612) < 0.1)) {
- printf(" (letter)");
- } else {
- hISO = sqrt(sqrt(2.0)) * 7200 / 2.54;
- wISO = hISO / sqrt(2.0);
- for (i = 0; i <= 6; ++i) {
- if ((fabs(w - wISO) < 1 && fabs(h - hISO) < 1) ||
- (fabs(w - hISO) < 1 && fabs(h - wISO) < 1)) {
- printf(" (A%d)", i);
- break;
- }
- hISO = wISO;
- wISO /= sqrt(2.0);
- }
- }
- printf("\n");
- }
-
- // print the boxes
- if (printBoxes) {
- if (multiPage) {
- for (pg = firstPage; pg <= lastPage; ++pg) {
- page = doc->getCatalog()->getPage(pg);
- sprintf(buf, "Page %4d MediaBox: ", pg);
- printBox(buf, page->getMediaBox());
- sprintf(buf, "Page %4d CropBox: ", pg);
- printBox(buf, page->getCropBox());
- sprintf(buf, "Page %4d BleedBox: ", pg);
- printBox(buf, page->getBleedBox());
- sprintf(buf, "Page %4d TrimBox: ", pg);
- printBox(buf, page->getTrimBox());
- sprintf(buf, "Page %4d ArtBox: ", pg);
- printBox(buf, page->getArtBox());
- }
- } else {
- page = doc->getCatalog()->getPage(firstPage);
- printBox("MediaBox: ", page->getMediaBox());
- printBox("CropBox: ", page->getCropBox());
- printBox("BleedBox: ", page->getBleedBox());
- printBox("TrimBox: ", page->getTrimBox());
- printBox("ArtBox: ", page->getArtBox());
- }
- }
-
- // print file size
-#ifdef VMS
- f = fopen(fileName->getCString(), "rb", "ctx=stm");
-#else
- f = fopen(fileName->getCString(), "rb");
-#endif
- if (f) {
-#if HAVE_FSEEKO
- fseeko(f, 0, SEEK_END);
- printf("File size: %u bytes\n", (Guint)ftello(f));
-#elif HAVE_FSEEK64
- fseek64(f, 0, SEEK_END);
- printf("File size: %u bytes\n", (Guint)ftell64(f));
-#else
- fseek(f, 0, SEEK_END);
- printf("File size: %d bytes\n", (int)ftell(f));
-#endif
- fclose(f);
- }
-
- // print linearization info
- printf("Optimized: %s\n", doc->isLinearized() ? "yes" : "no");
-
- // print PDF version
- printf("PDF version: %d.%d\n", doc->getPDFMajorVersion(), doc->getPDFMinorVersion());
-
- // print the metadata
- if (printMetadata && (metadata = doc->readMetadata())) {
- fputs("Metadata:\n", stdout);
- fputs(metadata->getCString(), stdout);
- fputc('\n', stdout);
- delete metadata;
- }
-
- exitCode = 0;
-
- // clean up
- err2:
- uMap->decRefCnt();
- delete doc;
- err1:
- delete globalParams;
- err0:
-
- // check for memory leaks
- Object::memCheck(stderr);
- gMemReport(stderr);
-
- return exitCode;
-}
-
-static void printInfoString(Dict *infoDict, char *key, char *text,
- UnicodeMap *uMap) {
- Object obj;
- GooString *s1;
- GBool isUnicode;
- Unicode u;
- char buf[8];
- int i, n;
-
- if (infoDict->lookup(key, &obj)->isString()) {
- fputs(text, stdout);
- s1 = obj.getString();
- if ((s1->getChar(0) & 0xff) == 0xfe &&
- (s1->getChar(1) & 0xff) == 0xff) {
- isUnicode = gTrue;
- i = 2;
- } else {
- isUnicode = gFalse;
- i = 0;
- }
- while (i < obj.getString()->getLength()) {
- if (isUnicode) {
- u = ((s1->getChar(i) & 0xff) << 8) |
- (s1->getChar(i+1) & 0xff);
- i += 2;
- } else {
- u = pdfDocEncoding[s1->getChar(i) & 0xff];
- ++i;
- }
- n = uMap->mapUnicode(u, buf, sizeof(buf));
- fwrite(buf, 1, n, stdout);
- }
- fputc('\n', stdout);
- }
- obj.free();
-}
-
-static void printInfoDate(Dict *infoDict, char *key, char *text) {
- Object obj;
- char *s;
- int year, mon, day, hour, min, sec, tz_hour, tz_minute;
- char tz;
- struct tm tmStruct;
- char buf[256];
-
- if (infoDict->lookup(key, &obj)->isString()) {
- fputs(text, stdout);
- s = obj.getString()->getCString();
- // TODO do something with the timezone info
- if ( parseDateString( s, &year, &mon, &day, &hour, &min, &sec, &tz, &tz_hour, &tz_minute ) ) {
- tmStruct.tm_year = year - 1900;
- tmStruct.tm_mon = mon - 1;
- tmStruct.tm_mday = day;
- tmStruct.tm_hour = hour;
- tmStruct.tm_min = min;
- tmStruct.tm_sec = sec;
- tmStruct.tm_wday = -1;
- tmStruct.tm_yday = -1;
- tmStruct.tm_isdst = -1;
- // compute the tm_wday and tm_yday fields
- if (mktime(&tmStruct) != (time_t)-1 &&
- strftime(buf, sizeof(buf), "%c", &tmStruct)) {
- fputs(buf, stdout);
- } else {
- fputs(s, stdout);
- }
- } else {
- fputs(s, stdout);
- }
- fputc('\n', stdout);
- }
- obj.free();
-}
-
-static void printBox(char *text, PDFRectangle *box) {
- printf("%s%8.2f %8.2f %8.2f %8.2f\n",
- text, box->x1, box->y1, box->x2, box->y2);
-}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/utils/pdftoabw.cc b/Build/source/libs/poppler/poppler-0.12.4/utils/pdftoabw.cc
deleted file mode 100644
index 9c71c766e32..00000000000
--- a/Build/source/libs/poppler/poppler-0.12.4/utils/pdftoabw.cc
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
- * Copyright (C) 2007 Jauco Noordzij <jauco@jauco.nl>
- * Copyright (C) 2007 Dominic Lachowicz <cinamod@hotmail.com>
- * Copyright (C) 2007 Kouhei Sutou <kou@cozmixng.org>
- * Copyright (C) 2009 Jakub Wilk <ubanus@users.sf.net>
- * Copyright (C) 2009 Albert Astals Cid <aacid@kde.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-#include "config.h"
-#include <poppler-config.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <stddef.h>
-#include <string.h>
-#ifdef HAVE_DIRENT_H
-#include <dirent.h>
-#endif
-#include <time.h>
-#include "parseargs.h"
-#include "goo/GooString.h"
-#include "goo/gmem.h"
-#include "Object.h"
-#include "Stream.h"
-#include "Array.h"
-#include "Dict.h"
-#include "XRef.h"
-#include "Catalog.h"
-#include "Page.h"
-#include "PDFDoc.h"
-#include "ABWOutputDev.h"
-#include "PSOutputDev.h"
-#include "GlobalParams.h"
-#include "Error.h"
-#include "goo/gfile.h"
-#include <libxml/parser.h>
-#include <libxml/tree.h>
-
-static int firstPage = 1;
-static int lastPage = 0;
-static GBool quiet = gFalse;
-static GBool printHelp = gFalse;
-static GBool printVersion = gFalse;
-static GBool stout = gFalse;
-static char ownerPassword[33] = "";
-static char userPassword[33] = "";
-
-// static char textEncName[128] = "";
-
-static const ArgDesc argDesc[] = {
- {"-f", argInt, &firstPage, 0,
- "first page to convert"},
- {"-l", argInt, &lastPage, 0,
- "last page to convert"},
- {"--stdout" ,argFlag, &stout, 0,
- "use standard output"},
- {"--opw", argString, ownerPassword, sizeof(ownerPassword),
- "owner password (for encrypted files)"},
- {"--upw", argString, userPassword, sizeof(userPassword),
- "user password (for encrypted files)"},
- {"-q", argFlag, &quiet, 0,
- "don't print any messages or errors"},
- {"-v", argFlag, &printVersion, 0,
- "print copyright and version info"},
- {"-h", argFlag, &printHelp, 0,
- "print usage information"},
- {"-help", argFlag, &printHelp, 0,
- "print usage information"},
- {"--help", argFlag, &printHelp, 0,
- "print usage information"},
- {"-?", argFlag, &printHelp, 0,
- "print usage information"},
- {NULL}
-};
-
-int main(int argc, char *argv[]) {
- GBool ok;
- PDFDoc *doc = NULL;
- GooString *fileName = NULL;
-// GooString *abwFileName = NULL;
- ABWOutputDev *abwOut = NULL;
-// GBool ok;
- GooString *ownerPW, *userPW;
- Object info;
-
- int result = 1;
-
- char * outpName;
- xmlDocPtr XMLdoc = NULL;
-
- // parse args
- ok = parseArgs(argDesc, &argc, argv);
- if (!ok || argc < 2 || argc > 3 || printVersion || printHelp) {
- fprintf(stderr, "pdftoabw version %s\n", PACKAGE_VERSION);
- fprintf(stderr, "%s\n", popplerCopyright);
- fprintf(stderr, "%s\n", xpdfCopyright);
- if (!printVersion) {
- printUsage("pdftoabw", "<PDF-file> [abw-file]", argDesc);
- }
- goto err0;
- }
- globalParams = new GlobalParams();
- if (quiet) {
- globalParams->setErrQuiet(quiet);
- }
-
- fileName = new GooString(argv[1]);
- if (stout || (argc < 3)){
- outpName = "-";
- }
- else {
- outpName = argv[2];
- }
-
- if (ownerPassword[0]) {
- ownerPW = new GooString(ownerPassword);
- } else {
- ownerPW = NULL;
- }
- if (userPassword[0]) {
- userPW = new GooString(userPassword);
- } else {
- userPW = NULL;
- }
-
- doc = new PDFDoc(fileName, ownerPW, userPW);
-
- if (userPW) {
- delete userPW;
- }
- if (ownerPW) {
- delete ownerPW;
- }
-
- if (!doc || !doc->isOk())
- {
- fprintf (stderr, "Error opening PDF %s\n", fileName->getCString());
- goto error;
- }
-
- // check for copy permission
- if (!doc->okToCopy()) {
- fprintf(stderr, "Copying of text from this document is not allowed.\n");
- goto error;
- }
-
- XMLdoc = xmlNewDoc(BAD_CAST "1.0");
- abwOut = new ABWOutputDev(XMLdoc);
- abwOut->setPDFDoc(doc);
-
- if (lastPage == 0 || lastPage > doc->getNumPages ()) lastPage = doc->getNumPages();
- if (firstPage < 1) firstPage = 1;
-
- if (abwOut->isOk())
- {
- doc->displayPages(abwOut, firstPage, lastPage, 72, 72, 0, gTrue, gFalse, gFalse);
- abwOut->createABW();
- }
-
- if (xmlSaveFormatFileEnc(outpName, XMLdoc, "UTF-8", 1) == -1)
- {
- fprintf (stderr, "Error saving to %s\n", outpName);
- goto error;
- }
-
- result = 0;
-
- error:
- // clean up
- if(globalParams) delete globalParams;
- if(doc) delete doc;
- if(XMLdoc) xmlFreeDoc(XMLdoc);
- if(abwOut) delete abwOut;
- err0:
- // check for memory leaks
- Object::memCheck(stderr);
- gMemReport(stderr);
-
- return result;
-}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/utils/pdftohtml.1 b/Build/source/libs/poppler/poppler-0.12.4/utils/pdftohtml.1
deleted file mode 100644
index 850aa840cae..00000000000
--- a/Build/source/libs/poppler/poppler-0.12.4/utils/pdftohtml.1
+++ /dev/null
@@ -1,85 +0,0 @@
-.TH PDFTOHTML 1
-.\" NAME should be all caps, SECTION should be 1-8, maybe w/ subsection
-.\" other parms are allowed: see man(7), man(1)
-.SH NAME
-pdftohtml \- program to convert pdf files into html, xml and png images
-.SH SYNOPSIS
-.B pdftohtml
-.I "[options] <PDF-file> [<html-file> <xml-file>]"
-.SH "DESCRIPTION"
-This manual page documents briefly the
-.BR pdftohtml
-command.
-This manual page was written for the Debian GNU/Linux distribution
-because the original program does not have a manual page.
-.PP
-.B pdftohtml
-is a program that converts pdf documents into html. It generates its output in
-the current working directory.
-.SH OPTIONS
-A summary of options are included below.
-.TP
-.B \-h, \-help
-Show summary of options.
-.TP
-.B \-f <int>
-first page to print
-.TP
-.B \-l <int>
-last page to print
-.TP
-.B \-q
-dont print any messages or errors
-.TP
-.B \-v
-print copyright and version info
-.TP
-.B \-p
-exchange .pdf links with .html
-.TP
-.B \-c
-generate complex output
-.TP
-.B \-i
-ignore images
-.TP
-.B \-noframes
-generate no frames. Not supported in complex output mode.
-.TP
-.B \-stdout
-use standard output
-.TP
-.B \-zoom <fp>
-zoom the pdf document (default 1.5)
-.TP
-.B \-xml
-output for XML post-processing
-.TP
-.B \-enc <string>
-output text encoding name
-.TP
-.B \-opw <string>
-owner password (for encrypted files)
-.TP
-.B \-upw <string>
-user password (for encrypted files)
-.TP
-.B \-hidden
-force hidden text extraction
-.TP
-.B \-dev
-output device name for Ghostscript (png16m, jpeg etc)
-.TP
-.B \-nomerge
-do not merge paragraphs
-.TP
-.B \-nodrm
-override document DRM settings
-
-.SH AUTHOR
-
-Pdftohtml was developed by Gueorgui Ovtcharov and Rainer Dorsch. It is
-based and benefits a lot from Derek Noonburg's xpdf package.
-
-This manual page was written by Søren Boll Overgaard <boll@debian.org>,
-for the Debian GNU/Linux system (but may be used by others).
diff --git a/Build/source/libs/poppler/poppler-0.12.4/utils/pdftohtml.cc b/Build/source/libs/poppler/poppler-0.12.4/utils/pdftohtml.cc
deleted file mode 100644
index 41312de2fdd..00000000000
--- a/Build/source/libs/poppler/poppler-0.12.4/utils/pdftohtml.cc
+++ /dev/null
@@ -1,442 +0,0 @@
-//========================================================================
-//
-// pdftohtml.cc
-//
-//
-// Copyright 1999-2000 G. Ovtcharov
-//========================================================================
-
-//========================================================================
-//
-// Modified under the Poppler project - http://poppler.freedesktop.org
-//
-// All changes made under the Poppler project to this file are licensed
-// under GPL version 2 or later
-//
-// Copyright (C) 2007-2008 Albert Astals Cid <aacid@kde.org>
-//
-// To see a description of the changes please see the Changelog file that
-// came with your tarball or type make ChangeLog if you are building from git
-//
-//========================================================================
-
-#include "config.h"
-#include <poppler-config.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <stddef.h>
-#include <string.h>
-#ifdef HAVE_DIRENT_H
-#include <dirent.h>
-#endif
-#include <time.h>
-#include "parseargs.h"
-#include "goo/GooString.h"
-#include "goo/gmem.h"
-#include "Object.h"
-#include "Stream.h"
-#include "Array.h"
-#include "Dict.h"
-#include "XRef.h"
-#include "Catalog.h"
-#include "Page.h"
-#include "PDFDoc.h"
-#include "HtmlOutputDev.h"
-#include "PSOutputDev.h"
-#include "GlobalParams.h"
-#include "Error.h"
-#include "DateInfo.h"
-#include "goo/gfile.h"
-
-#ifndef GHOSTSCRIPT
-# define GHOSTSCRIPT "gs"
-#endif
-
-static int firstPage = 1;
-static int lastPage = 0;
-static GBool rawOrder = gTrue;
-GBool printCommands = gTrue;
-static GBool printHelp = gFalse;
-GBool printHtml = gFalse;
-GBool complexMode=gFalse;
-GBool ignore=gFalse;
-//char extension[5]=".png";
-double scale=1.5;
-GBool noframes=gFalse;
-GBool stout=gFalse;
-GBool xml=gFalse;
-static GBool errQuiet=gFalse;
-static GBool noDrm=gFalse;
-
-GBool showHidden = gFalse;
-GBool noMerge = gFalse;
-static char ownerPassword[33] = "";
-static char userPassword[33] = "";
-static char gsDevice[33] = "png16m";
-static GBool printVersion = gFalse;
-
-static GooString* getInfoString(Dict *infoDict, char *key);
-static GooString* getInfoDate(Dict *infoDict, char *key);
-
-static char textEncName[128] = "";
-
-static const ArgDesc argDesc[] = {
- {"-f", argInt, &firstPage, 0,
- "first page to convert"},
- {"-l", argInt, &lastPage, 0,
- "last page to convert"},
- /*{"-raw", argFlag, &rawOrder, 0,
- "keep strings in content stream order"},*/
- {"-q", argFlag, &errQuiet, 0,
- "don't print any messages or errors"},
- {"-h", argFlag, &printHelp, 0,
- "print usage information"},
- {"-help", argFlag, &printHelp, 0,
- "print usage information"},
- {"-p", argFlag, &printHtml, 0,
- "exchange .pdf links by .html"},
- {"-c", argFlag, &complexMode, 0,
- "generate complex document"},
- {"-i", argFlag, &ignore, 0,
- "ignore images"},
- {"-noframes", argFlag, &noframes, 0,
- "generate no frames"},
- {"-stdout" ,argFlag, &stout, 0,
- "use standard output"},
- {"-zoom", argFP, &scale, 0,
- "zoom the pdf document (default 1.5)"},
- {"-xml", argFlag, &xml, 0,
- "output for XML post-processing"},
- {"-hidden", argFlag, &showHidden, 0,
- "output hidden text"},
- {"-nomerge", argFlag, &noMerge, 0,
- "do not merge paragraphs"},
- {"-enc", argString, textEncName, sizeof(textEncName),
- "output text encoding name"},
- {"-dev", argString, gsDevice, sizeof(gsDevice),
- "output device name for Ghostscript (png16m, jpeg etc)"},
- {"-v", argFlag, &printVersion, 0,
- "print copyright and version info"},
- {"-opw", argString, ownerPassword, sizeof(ownerPassword),
- "owner password (for encrypted files)"},
- {"-upw", argString, userPassword, sizeof(userPassword),
- "user password (for encrypted files)"},
- {"-nodrm", argFlag, &noDrm, 0,
- "override document DRM settings"},
- {NULL}
-};
-
-int main(int argc, char *argv[]) {
- PDFDoc *doc = NULL;
- GooString *fileName = NULL;
- GooString *docTitle = NULL;
- GooString *author = NULL, *keywords = NULL, *subject = NULL, *date = NULL;
- GooString *htmlFileName = NULL;
- GooString *psFileName = NULL;
- HtmlOutputDev *htmlOut = NULL;
- PSOutputDev *psOut = NULL;
- GBool ok;
- char *p;
- char extension[16] = "png";
- GooString *ownerPW, *userPW;
- Object info;
- char * extsList[] = {"png", "jpeg", "bmp", "pcx", "tiff", "pbm", NULL};
-
- // parse args
- ok = parseArgs(argDesc, &argc, argv);
- if (!ok || argc < 2 || argc > 3 || printHelp || printVersion) {
- fprintf(stderr, "pdftohtml version %s\n", PACKAGE_VERSION);
- fprintf(stderr, "%s\n", popplerCopyright);
- fprintf(stderr, "%s\n", "Copyright 1999-2003 Gueorgui Ovtcharov and Rainer Dorsch");
- fprintf(stderr, "%s\n\n", xpdfCopyright);
- if (!printVersion) {
- printUsage("pdftohtml", "<PDF-file> [<html-file> <xml-file>]", argDesc);
- }
- exit(1);
- }
-
- // init error file
- //errorInit();
-
- // read config file
- globalParams = new GlobalParams();
-
- if (errQuiet) {
- globalParams->setErrQuiet(errQuiet);
- printCommands = gFalse; // I'm not 100% what is the differecne between them
- }
-
- if (textEncName[0]) {
- globalParams->setTextEncoding(textEncName);
- if( !globalParams->getTextEncoding() ) {
- goto error;
- }
- }
-
- // open PDF file
- if (ownerPassword[0]) {
- ownerPW = new GooString(ownerPassword);
- } else {
- ownerPW = NULL;
- }
- if (userPassword[0]) {
- userPW = new GooString(userPassword);
- } else {
- userPW = NULL;
- }
-
- fileName = new GooString(argv[1]);
-
- doc = new PDFDoc(fileName, ownerPW, userPW);
- if (userPW) {
- delete userPW;
- }
- if (ownerPW) {
- delete ownerPW;
- }
- if (!doc->isOk()) {
- goto error;
- }
-
- // check for copy permission
- if (!doc->okToCopy()) {
- if (!noDrm) {
- error(-1, "Copying of text from this document is not allowed.");
- goto error;
- }
- fprintf(stderr, "Document has copy-protection bit set.\n");
- }
-
- // construct text file name
- if (argc == 3) {
- GooString* tmp = new GooString(argv[2]);
- p=tmp->getCString()+tmp->getLength()-5;
- if (!xml)
- if (!strcmp(p, ".html") || !strcmp(p, ".HTML"))
- htmlFileName = new GooString(tmp->getCString(),
- tmp->getLength() - 5);
- else htmlFileName =new GooString(tmp);
- else
- if (!strcmp(p, ".xml") || !strcmp(p, ".XML"))
- htmlFileName = new GooString(tmp->getCString(),
- tmp->getLength() - 5);
- else htmlFileName =new GooString(tmp);
-
- delete tmp;
- } else {
- p = fileName->getCString() + fileName->getLength() - 4;
- if (!strcmp(p, ".pdf") || !strcmp(p, ".PDF"))
- htmlFileName = new GooString(fileName->getCString(),
- fileName->getLength() - 4);
- else
- htmlFileName = fileName->copy();
- // htmlFileName->append(".html");
- }
-
- if (scale>3.0) scale=3.0;
- if (scale<0.5) scale=0.5;
-
- if (complexMode) {
- //noframes=gFalse;
- stout=gFalse;
- }
-
- if (stout) {
- noframes=gTrue;
- complexMode=gFalse;
- }
-
- if (xml)
- {
- complexMode = gTrue;
- noframes = gTrue;
- noMerge = gTrue;
- }
-
- // get page range
- if (firstPage < 1)
- firstPage = 1;
- if (lastPage < 1 || lastPage > doc->getNumPages())
- lastPage = doc->getNumPages();
-
- doc->getDocInfo(&info);
- if (info.isDict()) {
- docTitle = getInfoString(info.getDict(), "Title");
- author = getInfoString(info.getDict(), "Author");
- keywords = getInfoString(info.getDict(), "Keywords");
- subject = getInfoString(info.getDict(), "Subject");
- date = getInfoDate(info.getDict(), "ModDate");
- if( !date )
- date = getInfoDate(info.getDict(), "CreationDate");
- }
- info.free();
- if( !docTitle ) docTitle = new GooString(htmlFileName);
-
- /* determine extensions of output backgroun images */
- {int i;
- for(i = 0; extsList[i]; i++)
- {
- if( strstr(gsDevice, extsList[i]) != (char *) NULL )
- {
- strncpy(extension, extsList[i], sizeof(extension));
- break;
- }
- }}
-
- rawOrder = complexMode; // todo: figure out what exactly rawOrder do :)
-
- // write text file
- htmlOut = new HtmlOutputDev(htmlFileName->getCString(),
- docTitle->getCString(),
- author ? author->getCString() : NULL,
- keywords ? keywords->getCString() : NULL,
- subject ? subject->getCString() : NULL,
- date ? date->getCString() : NULL,
- extension,
- rawOrder,
- firstPage,
- doc->getCatalog()->getOutline()->isDict());
- delete docTitle;
- if( author )
- {
- delete author;
- }
- if( keywords )
- {
- delete keywords;
- }
- if( subject )
- {
- delete subject;
- }
- if( date )
- {
- delete date;
- }
-
- if (htmlOut->isOk())
- {
- doc->displayPages(htmlOut, firstPage, lastPage, 72, 72, 0,
- gTrue, gFalse, gFalse);
- if (!xml)
- {
- htmlOut->dumpDocOutline(doc->getCatalog());
- }
- }
-
- if( complexMode && !xml && !ignore ) {
- int h=xoutRound(htmlOut->getPageHeight()/scale);
- int w=xoutRound(htmlOut->getPageWidth()/scale);
- //int h=xoutRound(doc->getPageHeight(1)/scale);
- //int w=xoutRound(doc->getPageWidth(1)/scale);
-
- psFileName = new GooString(htmlFileName->getCString());
- psFileName->append(".ps");
-
- psOut = new PSOutputDev(psFileName->getCString(), doc->getXRef(),
- doc->getCatalog(), NULL, firstPage, lastPage, psModePS, w, h);
- psOut->setDisplayText(gFalse);
- doc->displayPages(psOut, firstPage, lastPage, 72, 72, 0,
- gTrue, gFalse, gFalse);
- delete psOut;
-
- /*sprintf(buf, "%s -sDEVICE=png16m -dBATCH -dNOPROMPT -dNOPAUSE -r72 -sOutputFile=%s%%03d.png -g%dx%d -q %s", GHOSTSCRIPT, htmlFileName->getCString(), w, h,
- psFileName->getCString());*/
-
- GooString *gsCmd = new GooString(GHOSTSCRIPT);
- GooString *tw, *th, *sc;
- gsCmd->append(" -sDEVICE=");
- gsCmd->append(gsDevice);
- gsCmd->append(" -dBATCH -dNOPROMPT -dNOPAUSE -r");
- sc = GooString::fromInt(static_cast<int>(72*scale));
- gsCmd->append(sc);
- gsCmd->append(" -sOutputFile=");
- gsCmd->append("\"");
- gsCmd->append(htmlFileName);
- gsCmd->append("%03d.");
- gsCmd->append(extension);
- gsCmd->append("\" -g");
- tw = GooString::fromInt(static_cast<int>(scale*w));
- gsCmd->append(tw);
- gsCmd->append("x");
- th = GooString::fromInt(static_cast<int>(scale*h));
- gsCmd->append(th);
- gsCmd->append(" -q \"");
- gsCmd->append(psFileName);
- gsCmd->append("\"");
-// printf("running: %s\n", gsCmd->getCString());
- if( !executeCommand(gsCmd->getCString()) && !errQuiet) {
- error(-1, "Failed to launch Ghostscript!\n");
- }
- unlink(psFileName->getCString());
- delete tw;
- delete th;
- delete sc;
- delete gsCmd;
- delete psFileName;
- }
-
- delete htmlOut;
-
- // clean up
- error:
- if(doc) delete doc;
- if(globalParams) delete globalParams;
-
- if(htmlFileName) delete htmlFileName;
- HtmlFont::clear();
-
- // check for memory leaks
- Object::memCheck(stderr);
- gMemReport(stderr);
-
- return 0;
-}
-
-static GooString* getInfoString(Dict *infoDict, char *key) {
- Object obj;
- GooString *s1 = NULL;
-
- if (infoDict->lookup(key, &obj)->isString()) {
- s1 = new GooString(obj.getString());
- }
- obj.free();
- return s1;
-}
-
-static GooString* getInfoDate(Dict *infoDict, char *key) {
- Object obj;
- char *s;
- int year, mon, day, hour, min, sec, tz_hour, tz_minute;
- char tz;
- struct tm tmStruct;
- GooString *result = NULL;
- char buf[256];
-
- if (infoDict->lookup(key, &obj)->isString()) {
- s = obj.getString()->getCString();
- // TODO do something with the timezone info
- if ( parseDateString( s, &year, &mon, &day, &hour, &min, &sec, &tz, &tz_hour, &tz_minute ) ) {
- tmStruct.tm_year = year - 1900;
- tmStruct.tm_mon = mon - 1;
- tmStruct.tm_mday = day;
- tmStruct.tm_hour = hour;
- tmStruct.tm_min = min;
- tmStruct.tm_sec = sec;
- tmStruct.tm_wday = -1;
- tmStruct.tm_yday = -1;
- tmStruct.tm_isdst = -1;
- mktime(&tmStruct); // compute the tm_wday and tm_yday fields
- if (strftime(buf, sizeof(buf), "%Y-%m-%dT%H:%M:%S+00:00", &tmStruct)) {
- result = new GooString(buf);
- } else {
- result = new GooString(s);
- }
- } else {
- result = new GooString(s);
- }
- }
- obj.free();
- return result;
-}
-
diff --git a/Build/source/libs/poppler/poppler-0.12.4/utils/pdftoppm.1 b/Build/source/libs/poppler/poppler-0.12.4/utils/pdftoppm.1
deleted file mode 100644
index ecadf2250a6..00000000000
--- a/Build/source/libs/poppler/poppler-0.12.4/utils/pdftoppm.1
+++ /dev/null
@@ -1,128 +0,0 @@
-.\" Copyright 2004 Glyph & Cog, LLC
-.TH pdftoppm 1 "22 January 2004"
-.SH NAME
-pdftoppm \- Portable Document Format (PDF) to Portable Pixmap (PPM)
-converter (version 3.00)
-.SH SYNOPSIS
-.B pdftoppm
-[options]
-.I PDF-file PPM-root
-.SH DESCRIPTION
-.B Pdftoppm
-converts Portable Document Format (PDF) files to color image files in
-Portable Pixmap (PPM) format, grayscale image files in Portable
-Graymap (PGM) format, or monochrome image files in Portable Bitmap
-(PBM) format.
-.PP
-Pdftoppm reads the PDF file,
-.IR PDF-file ,
-and writes one PPM file for each page,
-.IR PPM-root - nnnnnn .ppm,
-where
-.I nnnnnn
-is the page number.
-.SH OPTIONS
-.TP
-.BI \-f " number"
-Specifies the first page to convert.
-.TP
-.BI \-l " number"
-Specifies the last page to convert.
-.TP
-.BI \-r " number"
-Specifies the X and Y resolution, in DPI. The default is 150 DPI.
-.TP
-.BI \-rx " number"
-Specifies the X resolution, in DPI. The default is 150 DPI.
-.TP
-.BI \-ry " number"
-Specifies the Y resolution, in DPI. The default is 150 DPI.
-.TP
-.BI \-scale-to " number"
-Scales each page to fit in scale-to*scale-to pixel box.
-.TP
-.BI \-scale-to-x " number"
-Scales each page horizontally to fit in scale-to-x pixels.
-.TP
-.BI \-scale-to-y " number"
-Scales each page vertically to fit in scale-to-y pixels.
-.TP
-.BI \-x " number"
-Specifies the x-coordinate of the crop area top left corner
-.TP
-.BI \-y " number"
-Specifies the y-coordinate of the crop area top left corner
-.TP
-.BI \-W " number"
-Specifies the width of crop area in pixels (default is 0)
-.TP
-.BI \-H " number"
-Specifies the height of crop area in pixels (default is 0)
-.TP
-.BI \-sz " number"
-Specifies the size of crop square in pixels (sets W and H)
-.TP
-.B \-mono
-Generate a monochrome PBM file (instead of a color PPM file).
-.TP
-.B \-gray
-Generate a grayscale PGM file (instead of a color PPM file).
-.TP
-.B \-png
-Generates a PNG file instead a PPM file.
-.TP
-.BI \-freetype " yes | no"
-Enable or disable FreeType (a TrueType / Type 1 font rasterizer).
-This defaults to "yes".
-.TP
-.BI \-aa " yes | no"
-Enable or disable font anti-aliasing. This defaults to "yes".
-.TP
-.BI \-aaVector " yes | no"
-Enable or disable vector anti-aliasing. This defaults to "yes".
-.TP
-.BI \-opw " password"
-Specify the owner password for the PDF file. Providing this will
-bypass all security restrictions.
-.TP
-.BI \-upw " password"
-Specify the user password for the PDF file.
-.TP
-.B \-q
-Don't print any messages or errors.
-.TP
-.B \-v
-Print copyright and version information.
-.TP
-.B \-h
-Print usage information.
-.RB ( \-help
-and
-.B \-\-help
-are equivalent.)
-.SH EXIT CODES
-The Xpdf tools use the following exit codes:
-.TP
-0
-No error.
-.TP
-1
-Error opening a PDF file.
-.TP
-2
-Error opening an output file.
-.TP
-3
-Error related to PDF permissions.
-.TP
-99
-Other error.
-.SH AUTHOR
-The pdftoppm software and documentation are copyright 1996-2004 Glyph
-& Cog, LLC.
-.SH "SEE ALSO"
-.BR pdftops (1),
-.BR pdftotext (1),
-.BR pdfinfo (1),
-.BR pdffonts (1),
-.BR pdfimages (1),
diff --git a/Build/source/libs/poppler/poppler-0.12.4/utils/pdftoppm.cc b/Build/source/libs/poppler/poppler-0.12.4/utils/pdftoppm.cc
deleted file mode 100644
index 38c26fd776a..00000000000
--- a/Build/source/libs/poppler/poppler-0.12.4/utils/pdftoppm.cc
+++ /dev/null
@@ -1,325 +0,0 @@
-//========================================================================
-//
-// pdftoppm.cc
-//
-// Copyright 2003 Glyph & Cog, LLC
-//
-//========================================================================
-
-//========================================================================
-//
-// Modified under the Poppler project - http://poppler.freedesktop.org
-//
-// All changes made under the Poppler project to this file are licensed
-// under GPL version 2 or later
-//
-// Copyright (C) 2007 Ilmari Heikkinen <ilmari.heikkinen@gmail.com>
-// Copyright (C) 2008 Richard Airlie <richard.airlie@maglabs.net>
-// Copyright (C) 2009 Michael K. Johnson <a1237@danlj.org>
-// Copyright (C) 2009 Shen Liang <shenzhuxi@gmail.com>
-//
-// To see a description of the changes please see the Changelog file that
-// came with your tarball or type make ChangeLog if you are building from git
-//
-//========================================================================
-
-#include "config.h"
-#include <poppler-config.h>
-#include <stdio.h>
-#include <math.h>
-#include "parseargs.h"
-#include "goo/gmem.h"
-#include "goo/GooString.h"
-#include "GlobalParams.h"
-#include "Object.h"
-#include "PDFDoc.h"
-#include "splash/SplashBitmap.h"
-#include "splash/Splash.h"
-#include "SplashOutputDev.h"
-
-#define PPM_FILE_SZ 512
-
-static int firstPage = 1;
-static int lastPage = 0;
-static double resolution = 0.0;
-static double x_resolution = 150.0;
-static double y_resolution = 150.0;
-static int scaleTo = 0;
-static int x_scaleTo = 0;
-static int y_scaleTo = 0;
-static int x = 0;
-static int y = 0;
-static int w = 0;
-static int h = 0;
-static int sz = 0;
-static GBool useCropBox = gFalse;
-static GBool mono = gFalse;
-static GBool gray = gFalse;
-static GBool png = gFalse;
-static char enableFreeTypeStr[16] = "";
-static char antialiasStr[16] = "";
-static char vectorAntialiasStr[16] = "";
-static char ownerPassword[33] = "";
-static char userPassword[33] = "";
-static GBool quiet = gFalse;
-static GBool printVersion = gFalse;
-static GBool printHelp = gFalse;
-
-static const ArgDesc argDesc[] = {
- {"-f", argInt, &firstPage, 0,
- "first page to print"},
- {"-l", argInt, &lastPage, 0,
- "last page to print"},
-
- {"-r", argFP, &resolution, 0,
- "resolution, in DPI (default is 150)"},
- {"-rx", argFP, &x_resolution, 0,
- "X resolution, in DPI (default is 150)"},
- {"-ry", argFP, &y_resolution, 0,
- "Y resolution, in DPI (default is 150)"},
- {"-scale-to", argInt, &scaleTo, 0,
- "scales each page to fit within scale-to*scale-to pixel box"},
- {"-scale-to-x", argInt, &x_scaleTo, 0,
- "scales each page horizontally to fit in scale-to-x pixels"},
- {"-scale-to-y", argInt, &y_scaleTo, 0,
- "scales each page vertically to fit in scale-to-y pixels"},
-
- {"-x", argInt, &x, 0,
- "x-coordinate of the crop area top left corner"},
- {"-y", argInt, &y, 0,
- "y-coordinate of the crop area top left corner"},
- {"-W", argInt, &w, 0,
- "width of crop area in pixels (default is 0)"},
- {"-H", argInt, &h, 0,
- "height of crop area in pixels (default is 0)"},
- {"-sz", argInt, &sz, 0,
- "size of crop square in pixels (sets W and H)"},
- {"-cropbox",argFlag, &useCropBox, 0,
- "use the crop box rather than media box"},
-
- {"-mono", argFlag, &mono, 0,
- "generate a monochrome PBM file"},
- {"-gray", argFlag, &gray, 0,
- "generate a grayscale PGM file"},
-#if ENABLE_LIBPNG
- {"-png", argFlag, &png, 0,
- "generate a PNG file"},
-#endif
-#if HAVE_FREETYPE_FREETYPE_H | HAVE_FREETYPE_H
- {"-freetype", argString, enableFreeTypeStr, sizeof(enableFreeTypeStr),
- "enable FreeType font rasterizer: yes, no"},
-#endif
-
- {"-aa", argString, antialiasStr, sizeof(antialiasStr),
- "enable font anti-aliasing: yes, no"},
- {"-aaVector", argString, vectorAntialiasStr, sizeof(vectorAntialiasStr),
- "enable vector anti-aliasing: yes, no"},
-
- {"-opw", argString, ownerPassword, sizeof(ownerPassword),
- "owner password (for encrypted files)"},
- {"-upw", argString, userPassword, sizeof(userPassword),
- "user password (for encrypted files)"},
-
- {"-q", argFlag, &quiet, 0,
- "don't print any messages or errors"},
- {"-v", argFlag, &printVersion, 0,
- "print copyright and version info"},
- {"-h", argFlag, &printHelp, 0,
- "print usage information"},
- {"-help", argFlag, &printHelp, 0,
- "print usage information"},
- {"--help", argFlag, &printHelp, 0,
- "print usage information"},
- {"-?", argFlag, &printHelp, 0,
- "print usage information"},
- {NULL}
-};
-
-static void savePageSlice(PDFDoc *doc,
- SplashOutputDev *splashOut,
- int pg, int x, int y, int w, int h,
- double pg_w, double pg_h,
- char *ppmFile) {
- if (w == 0) w = (int)ceil(pg_w);
- if (h == 0) h = (int)ceil(pg_h);
- w = (x+w > pg_w ? (int)ceil(pg_w-x) : w);
- h = (y+h > pg_h ? (int)ceil(pg_h-y) : h);
- doc->displayPageSlice(splashOut,
- pg, x_resolution, y_resolution,
- 0,
- !useCropBox, gFalse, gFalse,
- x, y, w, h
- );
- if (ppmFile != NULL) {
- if (png) {
- splashOut->getBitmap()->writePNGFile(ppmFile);
- } else {
- splashOut->getBitmap()->writePNMFile(ppmFile);
- }
- } else {
- if (png) {
- splashOut->getBitmap()->writePNGFile(stdout);
- } else {
- splashOut->getBitmap()->writePNMFile(stdout);
- }
- }
-}
-
-int main(int argc, char *argv[]) {
- PDFDoc *doc;
- GooString *fileName = NULL;
- char *ppmRoot = NULL;
- char ppmFile[PPM_FILE_SZ];
- GooString *ownerPW, *userPW;
- SplashColor paperColor;
- SplashOutputDev *splashOut;
- GBool ok;
- int exitCode;
- int pg, pg_num_len;
- double pg_w, pg_h, tmp;
-
- exitCode = 99;
-
- // parse args
- ok = parseArgs(argDesc, &argc, argv);
- if (mono && gray) {
- ok = gFalse;
- }
- if ( resolution != 0.0 &&
- (x_resolution == 150.0 ||
- y_resolution == 150.0)) {
- x_resolution = resolution;
- y_resolution = resolution;
- }
- if (!ok || argc > 3 || printVersion || printHelp) {
- fprintf(stderr, "pdftoppm version %s\n", PACKAGE_VERSION);
- fprintf(stderr, "%s\n", popplerCopyright);
- fprintf(stderr, "%s\n", xpdfCopyright);
- if (!printVersion) {
- printUsage("pdftoppm", "[PDF-file [PPM-file-prefix]]", argDesc);
- }
- goto err0;
- }
- if (argc > 1) fileName = new GooString(argv[1]);
- if (argc == 3) ppmRoot = argv[2];
-
- // read config file
- globalParams = new GlobalParams();
- if (enableFreeTypeStr[0]) {
- if (!globalParams->setEnableFreeType(enableFreeTypeStr)) {
- fprintf(stderr, "Bad '-freetype' value on command line\n");
- }
- }
- if (antialiasStr[0]) {
- if (!globalParams->setAntialias(antialiasStr)) {
- fprintf(stderr, "Bad '-aa' value on command line\n");
- }
- }
- if (vectorAntialiasStr[0]) {
- if (!globalParams->setVectorAntialias(vectorAntialiasStr)) {
- fprintf(stderr, "Bad '-aaVector' value on command line\n");
- }
- }
- if (quiet) {
- globalParams->setErrQuiet(quiet);
- }
-
- // open PDF file
- if (ownerPassword[0]) {
- ownerPW = new GooString(ownerPassword);
- } else {
- ownerPW = NULL;
- }
- if (userPassword[0]) {
- userPW = new GooString(userPassword);
- } else {
- userPW = NULL;
- }
- if(fileName != NULL && fileName->cmp("-") != 0) {
- doc = new PDFDoc(fileName, ownerPW, userPW);
- } else {
- Object obj;
-
- obj.initNull();
- doc = new PDFDoc(new FileStream(stdin, 0, gFalse, 0, &obj), ownerPW, userPW);
- }
- if (userPW) {
- delete userPW;
- }
- if (ownerPW) {
- delete ownerPW;
- }
- if (!doc->isOk()) {
- exitCode = 1;
- goto err1;
- }
-
- // get page range
- if (firstPage < 1)
- firstPage = 1;
- if (lastPage < 1 || lastPage > doc->getNumPages())
- lastPage = doc->getNumPages();
-
- // write PPM files
- paperColor[0] = 255;
- paperColor[1] = 255;
- paperColor[2] = 255;
- splashOut = new SplashOutputDev(mono ? splashModeMono1 :
- gray ? splashModeMono8 :
- splashModeRGB8, 4,
- gFalse, paperColor);
- splashOut->startDoc(doc->getXRef());
- if (sz != 0) w = h = sz;
- pg_num_len = (int)ceil(log((double)doc->getNumPages()) / log((double)10));
- for (pg = firstPage; pg <= lastPage; ++pg) {
- if (useCropBox) {
- pg_w = doc->getPageCropWidth(pg);
- pg_h = doc->getPageCropHeight(pg);
- } else {
- pg_w = doc->getPageMediaWidth(pg);
- pg_h = doc->getPageMediaHeight(pg);
- }
-
- if (scaleTo != 0) {
- resolution = (72.0 * scaleTo) / (pg_w > pg_h ? pg_w : pg_h);
- x_resolution = y_resolution = resolution;
- } else {
- if (x_scaleTo != 0) {
- x_resolution = (72.0 * x_scaleTo) / pg_w;
- }
- if (y_scaleTo != 0) {
- y_resolution = (72.0 * y_scaleTo) / pg_h;
- }
- }
- pg_w = pg_w * (x_resolution / 72.0);
- pg_h = pg_h * (y_resolution / 72.0);
- if (doc->getPageRotate(pg)) {
- tmp = pg_w;
- pg_w = pg_h;
- pg_h = tmp;
- }
- if (ppmRoot != NULL) {
- snprintf(ppmFile, PPM_FILE_SZ, "%.*s-%0*d.%s",
- PPM_FILE_SZ - 32, ppmRoot, pg_num_len, pg,
- png ? "png" : mono ? "pbm" : gray ? "pgm" : "ppm");
- savePageSlice(doc, splashOut, pg, x, y, w, h, pg_w, pg_h, ppmFile);
- } else {
- savePageSlice(doc, splashOut, pg, x, y, w, h, pg_w, pg_h, NULL);
- }
- }
- delete splashOut;
-
- exitCode = 0;
-
- // clean up
- err1:
- delete doc;
- delete globalParams;
- err0:
-
- // check for memory leaks
- Object::memCheck(stderr);
- gMemReport(stderr);
-
- return exitCode;
-}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/utils/pdftops.1 b/Build/source/libs/poppler/poppler-0.12.4/utils/pdftops.1
deleted file mode 100644
index 6c4ef61876d..00000000000
--- a/Build/source/libs/poppler/poppler-0.12.4/utils/pdftops.1
+++ /dev/null
@@ -1,211 +0,0 @@
-.\" Copyright 1996-2004 Glyph & Cog, LLC
-.TH pdftops 1 "31 July 2009"
-.SH NAME
-pdftops \- Portable Document Format (PDF) to PostScript converter
-(version 3.00)
-.SH SYNOPSIS
-.B pdftops
-[options]
-.RI <PDF-file>
-.RI [<PS-file>]
-.SH DESCRIPTION
-.B Pdftops
-converts Portable Document Format (PDF) files to PostScript so they
-can be printed.
-.PP
-Pdftops reads the PDF file,
-.IR PDF-file ,
-and writes a PostScript file,
-.IR PS-file .
-If
-.I PS-file
-is not specified, pdftops converts
-.I file.pdf
-to
-.I file.ps
-(or
-.I file.eps
-with the \-eps option). If
-.I PS-file
-is \'-', the PostScript is sent to stdout.
-.SH OPTIONS
-.TP
-.BI \-f " number"
-Specifies the first page to print.
-.TP
-.BI \-l " number"
-Specifies the last page to print.
-.TP
-.B \-level1
-Generate Level 1 PostScript. The resulting PostScript files will be
-significantly larger (if they contain images), but will print on Level
-1 printers. This also converts all images to black and white. No
-more than one of the PostScript level options (\-level1, \-level1sep,
-\-level2, \-level2sep, \-level3, \-level3Sep) may be given.
-.TP
-.B \-level1sep
-Generate Level 1 separable PostScript. All colors are converted to
-CMYK. Images are written with separate stream data for the four
-components.
-.TP
-.B \-level2
-Generate Level 2 PostScript. Level 2 supports color images and image
-compression. This is the default setting.
-.TP
-.B \-level2sep
-Generate Level 2 separable PostScript. All colors are converted to
-CMYK. The PostScript separation convention operators are used to
-handle custom (spot) colors.
-.TP
-.B \-level3
-Generate Level 3 PostScript. This enables all Level 2 features plus
-CID font embedding.
-.TP
-.B \-level3Sep
-Generate Level 3 separable PostScript. The separation handling is the
-same as for \-level2Sep.
-.TP
-.B \-origpagesizes
-Generate a PostScript file with variable page sizes and orientations,
-taking for each page the size of the original page in the PDF file.
-The PostScript file contains "<</PageSize [WIDTH HEIGHT]>> setpagedevice"
-lines in each page header, so that the paper input tray gets correctly
-changed on the printer. This option should be used when pdftops is used
-as a print filter. Any specification of the page size via \-paper,
-\-paperw, or \-paperh will get overridden as long as each page of the
-PDF file has a defined paper size. No more than one of the mode options
-(\-origpagesizes, \-eps, \-form) may be given.
-.TP
-.B \-eps
-Generate an Encapsulated PostScript (EPS) file. An EPS file contains
-a single image, so if you use this option with a multi-page PDF file,
-you must use \-f and \-l to specify a single page. No more than one of
-the mode options (\-origpagesizes, \-eps, \-form) may be given.
-.TP
-.B \-form
-Generate a PostScript form which can be imported by software that
-understands forms. A form contains a single page, so if you use this
-option with a multi-page PDF file, you must use \-f and \-l to specify a
-single page. The \-level1 option cannot be used with \-form. No more
-than one of the mode options (\-origpagesizes, \-eps, \-form) may be
-given.
-.TP
-.B \-opi
-Generate OPI comments for all images and forms which have OPI
-information. (This option is only available if pdftops was compiled
-with OPI support.)
-.TP
-.B \-noembt1
-By default, any Type 1 fonts which are embedded in the PDF file are
-copied into the PostScript file. This option causes pdftops to
-substitute base fonts instead. Embedded fonts make PostScript files
-larger, but may be necessary for readable output.
-.TP
-.B \-noembtt
-By default, any TrueType fonts which are embedded in the PDF file are
-copied into the PostScript file. This option causes pdftops to
-substitute base fonts instead. Embedded fonts make PostScript files
-larger, but may be necessary for readable output. Also, some
-PostScript interpreters do not have TrueType rasterizers.
-.TP
-.B \-noembcidps
-By default, any CID PostScript fonts which are embedded in the PDF
-file are copied into the PostScript file. This option disables that
-embedding. No attempt is made to substitute for non-embedded CID
-PostScript fonts.
-.TP
-.B \-noembcidtt
-By default, any CID TrueType fonts which are embedded in the PDF file
-are copied into the PostScript file. This option disables that
-embedding. No attempt is made to substitute for non-embedded CID
-TrueType fonts.
-.TP
-.B \-passfonts
-By default, references to non-embedded 8-bit fonts in the PDF file are
-substituted with the closest "Helvetica", "Times-Roman", or "Courier" font.
-This option passes references to non-embedded fonts
-through to the PostScript file.
-.TP
-.B \-preload
-preload images and forms
-.TP
-.BI \-paper " size"
-Set the paper size to one of "letter", "legal", "A4", or "A3". This
-can also be set to "match", which will set the paper size to match the
-size specified in the PDF file. \-origpagesizes overrides this setting
-if the PDF file has defined page sizes.
-.TP
-.BI \-paperw " size"
-Set the paper width, in points. \-origpagesizes overrides this setting
-if the PDF file has defined page sizes.
-.TP
-.BI \-paperh " size"
-Set the paper height, in points. \-origpagesizes overrides this setting
-if the PDF file has defined page sizes.
-.TP
-.B \-nocrop
-By default, output is cropped to the CropBox specified in the PDF
-file. This option disables cropping.
-.TP
-.B \-expand
-Expand PDF pages smaller than the paper to fill the paper. By
-default, these pages are not scaled.
-.TP
-.B \-noshrink
-Don't scale PDF pages which are larger than the paper. By default,
-pages larger than the paper are shrunk to fit.
-.TP
-.B \-nocenter
-By default, PDF pages smaller than the paper (after any scaling) are
-centered on the paper. This option causes them to be aligned to the
-lower-left corner of the paper instead.
-.TP
-.B \-duplex
-Set the Duplex pagedevice entry in the PostScript file. This tells
-duplex-capable printers to enable duplexing.
-.TP
-.BI \-opw " password"
-Specify the owner password for the PDF file. Providing this will
-bypass all security restrictions.
-.TP
-.BI \-upw " password"
-Specify the user password for the PDF file.
-.TP
-.B \-q
-Don't print any messages or errors.
-.TP
-.B \-v
-Print copyright and version information.
-.TP
-.B \-h
-Print usage information.
-.RB ( \-help
-and
-.B \-\-help
-are equivalent.)
-.SH EXIT CODES
-The Xpdf tools use the following exit codes:
-.TP
-0
-No error.
-.TP
-1
-Error opening a PDF file.
-.TP
-2
-Error opening an output file.
-.TP
-3
-Error related to PDF permissions.
-.TP
-99
-Other error.
-.SH AUTHOR
-The pdftops software and documentation are copyright 1996-2004 Glyph &
-Cog, LLC.
-.SH "SEE ALSO"
-.BR pdftotext (1),
-.BR pdfinfo (1),
-.BR pdffonts (1),
-.BR pdftoppm (1),
-.BR pdfimages (1),
diff --git a/Build/source/libs/poppler/poppler-0.12.4/utils/pdftops.cc b/Build/source/libs/poppler/poppler-0.12.4/utils/pdftops.cc
deleted file mode 100644
index 69d5c329405..00000000000
--- a/Build/source/libs/poppler/poppler-0.12.4/utils/pdftops.cc
+++ /dev/null
@@ -1,382 +0,0 @@
-//========================================================================
-//
-// pdftops.cc
-//
-// Copyright 1996-2003 Glyph & Cog, LLC
-//
-// Modified for Debian by Hamish Moffatt, 22 May 2002.
-//
-//========================================================================
-
-//========================================================================
-//
-// Modified under the Poppler project - http://poppler.freedesktop.org
-//
-// All changes made under the Poppler project to this file are licensed
-// under GPL version 2 or later
-//
-// Copyright (C) 2006 Kristian Høgsberg <krh@redhat.com>
-// Copyright (C) 2007-2008 Albert Astals Cid <aacid@kde.org>
-// Copyright (C) 2009 Till Kamppeter <till.kamppeter@gmail.com>
-// Copyright (C) 2009 Sanjoy Mahajan <sanjoy@mit.edu>
-// Copyright (C) 2009 William Bader <williambader@hotmail.com>
-//
-// To see a description of the changes please see the Changelog file that
-// came with your tarball or type make ChangeLog if you are building from git
-//
-//========================================================================
-
-#include "config.h"
-#include <poppler-config.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <stddef.h>
-#include <string.h>
-#include "parseargs.h"
-#include "goo/GooString.h"
-#include "goo/gmem.h"
-#include "GlobalParams.h"
-#include "Object.h"
-#include "Stream.h"
-#include "Array.h"
-#include "Dict.h"
-#include "XRef.h"
-#include "Catalog.h"
-#include "Page.h"
-#include "PDFDoc.h"
-#include "PSOutputDev.h"
-#include "Error.h"
-
-static GBool setPSPaperSize(char *size, int &psPaperWidth, int &psPaperHeight) {
- if (!strcmp(size, "match")) {
- psPaperWidth = psPaperHeight = -1;
- } else if (!strcmp(size, "letter")) {
- psPaperWidth = 612;
- psPaperHeight = 792;
- } else if (!strcmp(size, "legal")) {
- psPaperWidth = 612;
- psPaperHeight = 1008;
- } else if (!strcmp(size, "A4")) {
- psPaperWidth = 595;
- psPaperHeight = 842;
- } else if (!strcmp(size, "A3")) {
- psPaperWidth = 842;
- psPaperHeight = 1190;
- } else {
- return gFalse;
- }
- return gTrue;
-}
-
-
-static int firstPage = 1;
-static int lastPage = 0;
-static GBool level1 = gFalse;
-static GBool level1Sep = gFalse;
-static GBool level2 = gFalse;
-static GBool level2Sep = gFalse;
-static GBool level3 = gFalse;
-static GBool level3Sep = gFalse;
-static GBool doOrigPageSizes = gFalse;
-static GBool doEPS = gFalse;
-static GBool doForm = gFalse;
-#if OPI_SUPPORT
-static GBool doOPI = gFalse;
-#endif
-static GBool noEmbedT1Fonts = gFalse;
-static GBool noEmbedTTFonts = gFalse;
-static GBool noEmbedCIDPSFonts = gFalse;
-static GBool noEmbedCIDTTFonts = gFalse;
-static GBool noSubstFonts = gFalse;
-static GBool preload = gFalse;
-static char paperSize[15] = "";
-static int paperWidth = -1;
-static int paperHeight = -1;
-static GBool noCrop = gFalse;
-static GBool expand = gFalse;
-static GBool noShrink = gFalse;
-static GBool noCenter = gFalse;
-static GBool duplex = gFalse;
-static char ownerPassword[33] = "\001";
-static char userPassword[33] = "\001";
-static GBool quiet = gFalse;
-static GBool printVersion = gFalse;
-static GBool printHelp = gFalse;
-
-static const ArgDesc argDesc[] = {
- {"-f", argInt, &firstPage, 0,
- "first page to print"},
- {"-l", argInt, &lastPage, 0,
- "last page to print"},
- {"-level1", argFlag, &level1, 0,
- "generate Level 1 PostScript"},
- {"-level1sep", argFlag, &level1Sep, 0,
- "generate Level 1 separable PostScript"},
- {"-level2", argFlag, &level2, 0,
- "generate Level 2 PostScript"},
- {"-level2sep", argFlag, &level2Sep, 0,
- "generate Level 2 separable PostScript"},
- {"-level3", argFlag, &level3, 0,
- "generate Level 3 PostScript"},
- {"-level3sep", argFlag, &level3Sep, 0,
- "generate Level 3 separable PostScript"},
- {"-origpagesizes",argFlag, &doOrigPageSizes,0,
- "conserve original page sizes"},
- {"-eps", argFlag, &doEPS, 0,
- "generate Encapsulated PostScript (EPS)"},
- {"-form", argFlag, &doForm, 0,
- "generate a PostScript form"},
-#if OPI_SUPPORT
- {"-opi", argFlag, &doOPI, 0,
- "generate OPI comments"},
-#endif
- {"-noembt1", argFlag, &noEmbedT1Fonts, 0,
- "don't embed Type 1 fonts"},
- {"-noembtt", argFlag, &noEmbedTTFonts, 0,
- "don't embed TrueType fonts"},
- {"-noembcidps", argFlag, &noEmbedCIDPSFonts, 0,
- "don't embed CID PostScript fonts"},
- {"-noembcidtt", argFlag, &noEmbedCIDTTFonts, 0,
- "don't embed CID TrueType fonts"},
- {"-passfonts", argFlag, &noSubstFonts,0,
- "don't substitute missing fonts"},
- {"-preload", argFlag, &preload, 0,
- "preload images and forms"},
- {"-paper", argString, paperSize, sizeof(paperSize),
- "paper size (letter, legal, A4, A3, match)"},
- {"-paperw", argInt, &paperWidth, 0,
- "paper width, in points"},
- {"-paperh", argInt, &paperHeight, 0,
- "paper height, in points"},
- {"-nocrop", argFlag, &noCrop, 0,
- "don't crop pages to CropBox"},
- {"-expand", argFlag, &expand, 0,
- "expand pages smaller than the paper size"},
- {"-noshrink", argFlag, &noShrink, 0,
- "don't shrink pages larger than the paper size"},
- {"-nocenter", argFlag, &noCenter, 0,
- "don't center pages smaller than the paper size"},
- {"-duplex", argFlag, &duplex, 0,
- "enable duplex printing"},
- {"-opw", argString, ownerPassword, sizeof(ownerPassword),
- "owner password (for encrypted files)"},
- {"-upw", argString, userPassword, sizeof(userPassword),
- "user password (for encrypted files)"},
- {"-q", argFlag, &quiet, 0,
- "don't print any messages or errors"},
- {"-v", argFlag, &printVersion, 0,
- "print copyright and version info"},
- {"-h", argFlag, &printHelp, 0,
- "print usage information"},
- {"-help", argFlag, &printHelp, 0,
- "print usage information"},
- {"--help", argFlag, &printHelp, 0,
- "print usage information"},
- {"-?", argFlag, &printHelp, 0,
- "print usage information"},
- {NULL}
-};
-
-int main(int argc, char *argv[]) {
- PDFDoc *doc;
- GooString *fileName;
- GooString *psFileName;
- PSLevel level;
- PSOutMode mode;
- GooString *ownerPW, *userPW;
- PSOutputDev *psOut;
- GBool ok;
- char *p;
- int exitCode;
-
- exitCode = 99;
-
- // parse args
- ok = parseArgs(argDesc, &argc, argv);
- if (!ok || argc < 2 || argc > 3 || printVersion || printHelp) {
- fprintf(stderr, "pdftops version %s\n", PACKAGE_VERSION);
- fprintf(stderr, "%s\n", popplerCopyright);
- fprintf(stderr, "%s\n", xpdfCopyright);
- if (!printVersion) {
- printUsage("pdftops", "<PDF-file> [<PS-file>]", argDesc);
- }
- exit(1);
- }
- if ((level1 ? 1 : 0) +
- (level1Sep ? 1 : 0) +
- (level2 ? 1 : 0) +
- (level2Sep ? 1 : 0) +
- (level3 ? 1 : 0) +
- (level3Sep ? 1 : 0) > 1) {
- fprintf(stderr, "Error: use only one of the 'level' options.\n");
- exit(1);
- }
- if ((doOrigPageSizes ? 1 : 0) +
- (doEPS ? 1 : 0) +
- (doForm ? 1 : 0) > 1) {
- fprintf(stderr, "Error: use only one of -origpagesizes, -eps, and -form\n");
- exit(1);
- }
- if (level1) {
- level = psLevel1;
- } else if (level1Sep) {
- level = psLevel1Sep;
- } else if (level2Sep) {
- level = psLevel2Sep;
- } else if (level3) {
- level = psLevel3;
- } else if (level3Sep) {
- level = psLevel3Sep;
- } else {
- level = psLevel2;
- }
- if (doForm && level < psLevel2) {
- fprintf(stderr, "Error: forms are only available with Level 2 output.\n");
- exit(1);
- }
- mode = doOrigPageSizes ? psModePSOrigPageSizes
- : doEPS ? psModeEPS
- : doForm ? psModeForm
- : psModePS;
- fileName = new GooString(argv[1]);
-
- // read config file
- globalParams = new GlobalParams();
- if (paperSize[0]) {
- if (!setPSPaperSize(paperSize, paperWidth, paperHeight)) {
- fprintf(stderr, "Invalid paper size\n");
- delete fileName;
- goto err0;
- }
- }
- if (expand) {
- globalParams->setPSExpandSmaller(gTrue);
- }
- if (noShrink) {
- globalParams->setPSShrinkLarger(gFalse);
- }
- if (noCenter) {
- globalParams->setPSCenter(gFalse);
- }
- if (level1 || level1Sep || level2 || level2Sep || level3 || level3Sep) {
- globalParams->setPSLevel(level);
- }
- if (noEmbedT1Fonts) {
- globalParams->setPSEmbedType1(!noEmbedT1Fonts);
- }
- if (noEmbedTTFonts) {
- globalParams->setPSEmbedTrueType(!noEmbedTTFonts);
- }
- if (noEmbedCIDPSFonts) {
- globalParams->setPSEmbedCIDPostScript(!noEmbedCIDPSFonts);
- }
- if (noEmbedCIDTTFonts) {
- globalParams->setPSEmbedCIDTrueType(!noEmbedCIDTTFonts);
- }
- if (noSubstFonts) {
- globalParams->setPSSubstFonts(!noSubstFonts);
- }
- if (preload) {
- globalParams->setPSPreload(preload);
- }
-#if OPI_SUPPORT
- if (doOPI) {
- globalParams->setPSOPI(doOPI);
- }
-#endif
- if (quiet) {
- globalParams->setErrQuiet(quiet);
- }
-
- // open PDF file
- if (ownerPassword[0] != '\001') {
- ownerPW = new GooString(ownerPassword);
- } else {
- ownerPW = NULL;
- }
- if (userPassword[0] != '\001') {
- userPW = new GooString(userPassword);
- } else {
- userPW = NULL;
- }
- doc = new PDFDoc(fileName, ownerPW, userPW);
- if (userPW) {
- delete userPW;
- }
- if (ownerPW) {
- delete ownerPW;
- }
- if (!doc->isOk()) {
- exitCode = 1;
- goto err1;
- }
-
-#ifdef ENFORCE_PERMISSIONS
- // check for print permission
- if (!doc->okToPrint()) {
- error(-1, "Printing this document is not allowed.");
- exitCode = 3;
- goto err1;
- }
-#endif
-
- // construct PostScript file name
- if (argc == 3) {
- psFileName = new GooString(argv[2]);
- } else {
- p = fileName->getCString() + fileName->getLength() - 4;
- if (!strcmp(p, ".pdf") || !strcmp(p, ".PDF")) {
- psFileName = new GooString(fileName->getCString(),
- fileName->getLength() - 4);
- } else {
- psFileName = fileName->copy();
- }
- psFileName->append(doEPS ? ".eps" : ".ps");
- }
-
- // get page range
- if (firstPage < 1) {
- firstPage = 1;
- }
- if (lastPage < 1 || lastPage > doc->getNumPages()) {
- lastPage = doc->getNumPages();
- }
-
- // check for multi-page EPS or form
- if ((doEPS || doForm) && firstPage != lastPage) {
- error(-1, "EPS and form files can only contain one page.");
- goto err2;
- }
-
- // write PostScript file
- psOut = new PSOutputDev(psFileName->getCString(), doc->getXRef(),
- doc->getCatalog(), NULL, firstPage, lastPage, mode,
- paperWidth,
- paperHeight,
- duplex);
- if (psOut->isOk()) {
- doc->displayPages(psOut, firstPage, lastPage, 72, 72,
- 0, noCrop, !noCrop, gTrue);
- } else {
- delete psOut;
- exitCode = 2;
- goto err2;
- }
- delete psOut;
-
- exitCode = 0;
-
- // clean up
- err2:
- delete psFileName;
- err1:
- delete doc;
- err0:
- delete globalParams;
-
- // check for memory leaks
- Object::memCheck(stderr);
- gMemReport(stderr);
-
- return exitCode;
-}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/utils/pdftotext.1 b/Build/source/libs/poppler/poppler-0.12.4/utils/pdftotext.1
deleted file mode 100644
index 4e3cb0b78d7..00000000000
--- a/Build/source/libs/poppler/poppler-0.12.4/utils/pdftotext.1
+++ /dev/null
@@ -1,126 +0,0 @@
-.\" Copyright 1997-2004 Glyph & Cog, LLC
-.TH pdftotext 1 "22 January 2004"
-.SH NAME
-pdftotext \- Portable Document Format (PDF) to text converter
-(version 3.00)
-.SH SYNOPSIS
-.B pdftotext
-[options]
-.RI [ PDF-file
-.RI [ text-file ]]
-.SH DESCRIPTION
-.B Pdftotext
-converts Portable Document Format (PDF) files to plain text.
-.PP
-Pdftotext reads the PDF file,
-.IR PDF-file ,
-and writes a text file,
-.IR text-file .
-If
-.I text-file
-is not specified, pdftotext converts
-.I file.pdf
-to
-.IR file.txt .
-If
-.I text-file
-is \'-', the text is sent to stdout.
-.SH OPTIONS
-.TP
-.BI \-f " number"
-Specifies the first page to convert.
-.TP
-.BI \-l " number"
-Specifies the last page to convert.
-.TP
-.BI \-r " number"
-Specifies the resolution, in DPI. The default is 72 DPI.
-.TP
-.BI \-x " number"
-Specifies the x-coordinate of the crop area top left corner
-.TP
-.BI \-y " number"
-Specifies the y-coordinate of the crop area top left corner
-.TP
-.BI \-W " number"
-Specifies the width of crop area in pixels (default is 0)
-.TP
-.BI \-H " number"
-Specifies the height of crop area in pixels (default is 0)
-.TP
-.B \-layout
-Maintain (as best as possible) the original physical layout of the
-text. The default is to \'undo' physical layout (columns,
-hyphenation, etc.) and output the text in reading order.
-.TP
-.B \-raw
-Keep the text in content stream order. This is a hack which often
-"undoes" column formatting, etc. Use of raw mode is no longer
-recommended.
-.TP
-.B \-htmlmeta
-Generate a simple HTML file, including the meta information. This
-simply wraps the text in <pre> and </pre> and prepends the meta
-headers.
-.TP
-.BI \-enc " encoding-name"
-Sets the encoding to use for text output. This defaults to "UTF-8".
-.TP
-.B \-listenc
-Lits the available encodings
-.TP
-.BI \-eol " unix | dos | mac"
-Sets the end-of-line convention to use for text output.
-.TP
-.B \-nopgbrk
-Don't insert page breaks (form feed characters) between pages.
-.TP
-.BI \-opw " password"
-Specify the owner password for the PDF file. Providing this will
-bypass all security restrictions.
-.TP
-.BI \-upw " password"
-Specify the user password for the PDF file.
-.TP
-.B \-q
-Don't print any messages or errors.
-.TP
-.B \-v
-Print copyright and version information.
-.TP
-.B \-h
-Print usage information.
-.RB ( \-help
-and
-.B \-\-help
-are equivalent.)
-.SH BUGS
-Some PDF files contain fonts whose encodings have been mangled beyond
-recognition. There is no way (short of OCR) to extract text from
-these files.
-.SH EXIT CODES
-The Xpdf tools use the following exit codes:
-.TP
-0
-No error.
-.TP
-1
-Error opening a PDF file.
-.TP
-2
-Error opening an output file.
-.TP
-3
-Error related to PDF permissions.
-.TP
-99
-Other error.
-.SH AUTHOR
-The pdftotext software and documentation are copyright 1996-2004 Glyph
-& Cog, LLC.
-.SH "SEE ALSO"
-.BR pdftops (1),
-.BR pdfinfo (1),
-.BR pdffonts (1),
-.BR pdftoppm (1),
-.BR pdfimages (1),
diff --git a/Build/source/libs/poppler/poppler-0.12.4/utils/pdftotext.cc b/Build/source/libs/poppler/poppler-0.12.4/utils/pdftotext.cc
deleted file mode 100644
index 4ebda19bd41..00000000000
--- a/Build/source/libs/poppler/poppler-0.12.4/utils/pdftotext.cc
+++ /dev/null
@@ -1,398 +0,0 @@
-//========================================================================
-//
-// pdftotext.cc
-//
-// Copyright 1997-2003 Glyph & Cog, LLC
-//
-// Modified for Debian by Hamish Moffatt, 22 May 2002.
-//
-//========================================================================
-
-//========================================================================
-//
-// Modified under the Poppler project - http://poppler.freedesktop.org
-//
-// All changes made under the Poppler project to this file are licensed
-// under GPL version 2 or later
-//
-// Copyright (C) 2006 Dominic Lachowicz <cinamod@hotmail.com>
-// Copyright (C) 2007-2008 Albert Astals Cid <aacid@kde.org>
-// Copyright (C) 2009 Jan Jockusch <jan@jockusch.de>
-//
-// To see a description of the changes please see the Changelog file that
-// came with your tarball or type make ChangeLog if you are building from git
-//
-//========================================================================
-
-#include "config.h"
-#include <poppler-config.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <stddef.h>
-#include <string.h>
-#include "parseargs.h"
-#include "printencodings.h"
-#include "goo/GooString.h"
-#include "goo/gmem.h"
-#include "GlobalParams.h"
-#include "Object.h"
-#include "Stream.h"
-#include "Array.h"
-#include "Dict.h"
-#include "XRef.h"
-#include "Catalog.h"
-#include "Page.h"
-#include "PDFDoc.h"
-#include "TextOutputDev.h"
-#include "CharTypes.h"
-#include "UnicodeMap.h"
-#include "Error.h"
-
-static void printInfoString(FILE *f, Dict *infoDict, char *key,
- char *text1, char *text2, UnicodeMap *uMap);
-static void printInfoDate(FILE *f, Dict *infoDict, char *key, char *fmt);
-
-static int firstPage = 1;
-static int lastPage = 0;
-static double resolution = 72.0;
-static int x = 0;
-static int y = 0;
-static int w = 0;
-static int h = 0;
-static GBool physLayout = gFalse;
-static GBool rawOrder = gFalse;
-static GBool htmlMeta = gFalse;
-static char textEncName[128] = "";
-static char textEOL[16] = "";
-static GBool noPageBreaks = gFalse;
-static char ownerPassword[33] = "\001";
-static char userPassword[33] = "\001";
-static GBool quiet = gFalse;
-static GBool printVersion = gFalse;
-static GBool printHelp = gFalse;
-static GBool printEnc = gFalse;
-
-static const ArgDesc argDesc[] = {
- {"-f", argInt, &firstPage, 0,
- "first page to convert"},
- {"-l", argInt, &lastPage, 0,
- "last page to convert"},
- {"-r", argFP, &resolution, 0,
- "resolution, in DPI (default is 72)"},
- {"-x", argInt, &x, 0,
- "x-coordinate of the crop area top left corner"},
- {"-y", argInt, &y, 0,
- "y-coordinate of the crop area top left corner"},
- {"-W", argInt, &w, 0,
- "width of crop area in pixels (default is 0)"},
- {"-H", argInt, &h, 0,
- "height of crop area in pixels (default is 0)"},
- {"-layout", argFlag, &physLayout, 0,
- "maintain original physical layout"},
- {"-raw", argFlag, &rawOrder, 0,
- "keep strings in content stream order"},
- {"-htmlmeta", argFlag, &htmlMeta, 0,
- "generate a simple HTML file, including the meta information"},
- {"-enc", argString, textEncName, sizeof(textEncName),
- "output text encoding name"},
- {"-listenc",argFlag, &printEnc, 0,
- "list available encodings"},
- {"-eol", argString, textEOL, sizeof(textEOL),
- "output end-of-line convention (unix, dos, or mac)"},
- {"-nopgbrk", argFlag, &noPageBreaks, 0,
- "don't insert page breaks between pages"},
- {"-opw", argString, ownerPassword, sizeof(ownerPassword),
- "owner password (for encrypted files)"},
- {"-upw", argString, userPassword, sizeof(userPassword),
- "user password (for encrypted files)"},
- {"-q", argFlag, &quiet, 0,
- "don't print any messages or errors"},
- {"-v", argFlag, &printVersion, 0,
- "print copyright and version info"},
- {"-h", argFlag, &printHelp, 0,
- "print usage information"},
- {"-help", argFlag, &printHelp, 0,
- "print usage information"},
- {"--help", argFlag, &printHelp, 0,
- "print usage information"},
- {"-?", argFlag, &printHelp, 0,
- "print usage information"},
- {NULL}
-};
-
-int main(int argc, char *argv[]) {
- PDFDoc *doc;
- GooString *fileName;
- GooString *textFileName;
- GooString *ownerPW, *userPW;
- TextOutputDev *textOut;
- FILE *f;
- UnicodeMap *uMap;
- Object info;
- GBool ok;
- char *p;
- int exitCode;
-
- exitCode = 99;
-
- // parse args
- ok = parseArgs(argDesc, &argc, argv);
- if (!ok || (argc < 2 && !printEnc) || argc > 3 || printVersion || printHelp) {
- fprintf(stderr, "pdftotext version %s\n", PACKAGE_VERSION);
- fprintf(stderr, "%s\n", popplerCopyright);
- fprintf(stderr, "%s\n", xpdfCopyright);
- if (!printVersion) {
- printUsage("pdftotext", "<PDF-file> [<text-file>]", argDesc);
- }
- goto err0;
- }
-
- // read config file
- globalParams = new GlobalParams();
-
- if (printEnc) {
- printEncodings();
- delete globalParams;
- goto err0;
- }
-
- fileName = new GooString(argv[1]);
-
- if (textEncName[0]) {
- globalParams->setTextEncoding(textEncName);
- }
- if (textEOL[0]) {
- if (!globalParams->setTextEOL(textEOL)) {
- fprintf(stderr, "Bad '-eol' value on command line\n");
- }
- }
- if (noPageBreaks) {
- globalParams->setTextPageBreaks(gFalse);
- }
- if (quiet) {
- globalParams->setErrQuiet(quiet);
- }
-
- // get mapping to output encoding
- if (!(uMap = globalParams->getTextEncoding())) {
- error(-1, "Couldn't get text encoding");
- delete fileName;
- goto err1;
- }
-
- // open PDF file
- if (ownerPassword[0] != '\001') {
- ownerPW = new GooString(ownerPassword);
- } else {
- ownerPW = NULL;
- }
- if (userPassword[0] != '\001') {
- userPW = new GooString(userPassword);
- } else {
- userPW = NULL;
- }
-
- if(fileName->cmp("-") != 0) {
- doc = new PDFDoc(fileName, ownerPW, userPW);
- } else {
- Object obj;
-
- obj.initNull();
- doc = new PDFDoc(new FileStream(stdin, 0, gFalse, 0, &obj), ownerPW, userPW);
- }
-
- if (userPW) {
- delete userPW;
- }
- if (ownerPW) {
- delete ownerPW;
- }
- if (!doc->isOk()) {
- exitCode = 1;
- goto err2;
- }
-
-#ifdef ENFORCE_PERMISSIONS
- // check for copy permission
- if (!doc->okToCopy()) {
- error(-1, "Copying of text from this document is not allowed.");
- exitCode = 3;
- goto err2;
- }
-#endif
-
- // construct text file name
- if (argc == 3) {
- textFileName = new GooString(argv[2]);
- } else {
- p = fileName->getCString() + fileName->getLength() - 4;
- if (!strcmp(p, ".pdf") || !strcmp(p, ".PDF")) {
- textFileName = new GooString(fileName->getCString(),
- fileName->getLength() - 4);
- } else {
- textFileName = fileName->copy();
- }
- textFileName->append(htmlMeta ? ".html" : ".txt");
- }
-
- // get page range
- if (firstPage < 1) {
- firstPage = 1;
- }
- if (lastPage < 1 || lastPage > doc->getNumPages()) {
- lastPage = doc->getNumPages();
- }
-
- // write HTML header
- if (htmlMeta) {
- if (!textFileName->cmp("-")) {
- f = stdout;
- } else {
- if (!(f = fopen(textFileName->getCString(), "wb"))) {
- error(-1, "Couldn't open text file '%s'", textFileName->getCString());
- exitCode = 2;
- goto err3;
- }
- }
- fputs("<html>\n", f);
- fputs("<head>\n", f);
- doc->getDocInfo(&info);
- if (info.isDict()) {
- printInfoString(f, info.getDict(), "Title", "<title>", "</title>\n",
- uMap);
- printInfoString(f, info.getDict(), "Subject",
- "<meta name=\"Subject\" content=\"", "\">\n", uMap);
- printInfoString(f, info.getDict(), "Keywords",
- "<meta name=\"Keywords\" content=\"", "\">\n", uMap);
- printInfoString(f, info.getDict(), "Author",
- "<meta name=\"Author\" content=\"", "\">\n", uMap);
- printInfoString(f, info.getDict(), "Creator",
- "<meta name=\"Creator\" content=\"", "\">\n", uMap);
- printInfoString(f, info.getDict(), "Producer",
- "<meta name=\"Producer\" content=\"", "\">\n", uMap);
- printInfoDate(f, info.getDict(), "CreationDate",
- "<meta name=\"CreationDate\" content=\"\">\n");
- printInfoDate(f, info.getDict(), "LastModifiedDate",
- "<meta name=\"ModDate\" content=\"\">\n");
- }
- info.free();
- fputs("</head>\n", f);
- fputs("<body>\n", f);
- fputs("<pre>\n", f);
- if (f != stdout) {
- fclose(f);
- }
- }
-
- // write text file
- textOut = new TextOutputDev(textFileName->getCString(),
- physLayout, rawOrder, htmlMeta);
- if (textOut->isOk()) {
- if ((w==0) && (h==0) && (x==0) && (y==0)) {
- doc->displayPages(textOut, firstPage, lastPage, resolution, resolution, 0,
- gTrue, gFalse, gFalse);
- } else {
- int page;
-
- for (page = firstPage; page <= lastPage; ++page) {
- doc->displayPageSlice(textOut, page, resolution, resolution, 0,
- gTrue, gFalse, gFalse,
- x, y, w, h);
- }
- }
-
- } else {
- delete textOut;
- exitCode = 2;
- goto err3;
- }
- delete textOut;
-
- // write end of HTML file
- if (htmlMeta) {
- if (!textFileName->cmp("-")) {
- f = stdout;
- } else {
- if (!(f = fopen(textFileName->getCString(), "ab"))) {
- error(-1, "Couldn't open text file '%s'", textFileName->getCString());
- exitCode = 2;
- goto err3;
- }
- }
- fputs("</pre>\n", f);
- fputs("</body>\n", f);
- fputs("</html>\n", f);
- if (f != stdout) {
- fclose(f);
- }
- }
-
- exitCode = 0;
-
- // clean up
- err3:
- delete textFileName;
- err2:
- delete doc;
- uMap->decRefCnt();
- err1:
- delete globalParams;
- err0:
-
- // check for memory leaks
- Object::memCheck(stderr);
- gMemReport(stderr);
-
- return exitCode;
-}
-
-static void printInfoString(FILE *f, Dict *infoDict, char *key,
- char *text1, char *text2, UnicodeMap *uMap) {
- Object obj;
- GooString *s1;
- GBool isUnicode;
- Unicode u;
- char buf[8];
- int i, n;
-
- if (infoDict->lookup(key, &obj)->isString()) {
- fputs(text1, f);
- s1 = obj.getString();
- if ((s1->getChar(0) & 0xff) == 0xfe &&
- (s1->getChar(1) & 0xff) == 0xff) {
- isUnicode = gTrue;
- i = 2;
- } else {
- isUnicode = gFalse;
- i = 0;
- }
- while (i < obj.getString()->getLength()) {
- if (isUnicode) {
- u = ((s1->getChar(i) & 0xff) << 8) |
- (s1->getChar(i+1) & 0xff);
- i += 2;
- } else {
- u = s1->getChar(i) & 0xff;
- ++i;
- }
- n = uMap->mapUnicode(u, buf, sizeof(buf));
- fwrite(buf, 1, n, f);
- }
- fputs(text2, f);
- }
- obj.free();
-}
-
-static void printInfoDate(FILE *f, Dict *infoDict, char *key, char *fmt) {
- Object obj;
- char *s;
-
- if (infoDict->lookup(key, &obj)->isString()) {
- s = obj.getString()->getCString();
- if (s[0] == 'D' && s[1] == ':') {
- s += 2;
- }
- fprintf(f, fmt, s);
- }
- obj.free();
-}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/utils/printencodings.cc b/Build/source/libs/poppler/poppler-0.12.4/utils/printencodings.cc
deleted file mode 100644
index dec6f98fbbd..00000000000
--- a/Build/source/libs/poppler/poppler-0.12.4/utils/printencodings.cc
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (C) 2008, Albert Astals Cid <aacid@kde.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-#include "printencodings.h"
-
-#include "GlobalParams.h"
-#include "goo/GooList.h"
-#include "goo/GooString.h"
-
-void printEncodings()
-{
- GooList *encNames = globalParams->getEncodingNames();
- printf("Available encodings are:\n");
- for (int i = 0; i < encNames->getLength(); ++i) {
- GooString *enc = (GooString*)encNames->get(i);
- printf("%s\n", enc->getCString());
- }
- delete encNames;
-}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/utils/printencodings.h b/Build/source/libs/poppler/poppler-0.12.4/utils/printencodings.h
deleted file mode 100644
index 5be2819f2f1..00000000000
--- a/Build/source/libs/poppler/poppler-0.12.4/utils/printencodings.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright (C) 2008, Albert Astals Cid <aacid@kde.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-#ifndef PRINTENCODINGS_H
-#define PRINTENCODINGS_H
-
-void printEncodings();
-
-#endif