diff options
Diffstat (limited to 'kfile-plugins/pdf')
-rw-r--r-- | kfile-plugins/pdf/CMakeLists.txt | 36 | ||||
-rw-r--r-- | kfile-plugins/pdf/Makefile.am | 22 | ||||
-rw-r--r-- | kfile-plugins/pdf/configure.in.in | 16 | ||||
-rw-r--r-- | kfile-plugins/pdf/kfile_pdf.cpp | 104 | ||||
-rw-r--r-- | kfile-plugins/pdf/kfile_pdf.desktop | 64 | ||||
-rw-r--r-- | kfile-plugins/pdf/kfile_pdf.h | 39 |
6 files changed, 0 insertions, 281 deletions
diff --git a/kfile-plugins/pdf/CMakeLists.txt b/kfile-plugins/pdf/CMakeLists.txt deleted file mode 100644 index c75dcf3f..00000000 --- a/kfile-plugins/pdf/CMakeLists.txt +++ /dev/null @@ -1,36 +0,0 @@ -################################################# -# -# (C) 2010-2011 Calvin Morrison -# mutantturkey@gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -include_directories( - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_BINARY_DIR} - ${TDE_INCLUDE_DIR} - ${TQT_INCLUDE_DIRS} - ${CMAKE_SOURCE_DIR}/kfile-plugins/dependencies/poppler-tqt -) - -link_directories( - ${TQT_LIBRARY_DIRS} -) - - -#### other data ################################# - -install( FILES kfile_pdf.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) - - -#### kfile_pdf (module) ######################### - -tde_add_kpart( kfile_pdf AUTOMOC - SOURCES kfile_pdf.cpp - LINK kio-shared -L${CMAKE_BINARY_DIR}/kfile-plugins/dependencies/poppler-tqt -lpoppler-tqt - DESTINATION ${PLUGIN_INSTALL_DIR} -) diff --git a/kfile-plugins/pdf/Makefile.am b/kfile-plugins/pdf/Makefile.am deleted file mode 100644 index 0b5bf202..00000000 --- a/kfile-plugins/pdf/Makefile.am +++ /dev/null @@ -1,22 +0,0 @@ -## Makefile.am for the pdf file meta info plugin - -# set the include path for X, qt and KDE -INCLUDES = $(all_includes) -I$(top_srcdir)/kfile-plugins/dependencies/poppler-tqt - -# these are the headers for your project -noinst_HEADERS = kfile_pdf.h - -kde_module_LTLIBRARIES = kfile_pdf.la - -kfile_pdf_la_SOURCES = kfile_pdf.cpp -kfile_pdf_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN) -kfile_pdf_la_LIBADD = $(LIB_KIO) -L$(top_builddir)/kfile-plugins/dependencies/poppler-tqt/ -lpoppler-tqt - -# let automoc handle all of the meta source files (moc) -METASOURCES = AUTO - -messages: - $(XGETTEXT) *.cpp -o $(podir)/kfile_pdf.pot - -services_DATA = kfile_pdf.desktop -servicesdir = $(kde_servicesdir) diff --git a/kfile-plugins/pdf/configure.in.in b/kfile-plugins/pdf/configure.in.in deleted file mode 100644 index ec2fff51..00000000 --- a/kfile-plugins/pdf/configure.in.in +++ /dev/null @@ -1,16 +0,0 @@ -AC_ARG_WITH([poppler], - [AC_HELP_STRING([--with-poppler], - [Enable PDF support through poppler @<:@default=check@:>@])], - [], with_poppler=check) - -## Compile the pdf meta info plugin only if Poppler is available -#if test "x$with_poppler" != xno; then -# PKG_CHECK_MODULES(POPPLER, poppler-qt >= 0.3.1, have_poppler=yes, have_poppler=no) -# -# if test "x$with_poppler" != xcheck && test "x$have_poppler" != xyes; then -# AC_MSG_ERROR([--with-poppler was given, but test for poppler failed]) -# fi -#fi - -have_poppler=yes -AM_CONDITIONAL(include_PDF, test "x$have_poppler" = xyes) diff --git a/kfile-plugins/pdf/kfile_pdf.cpp b/kfile-plugins/pdf/kfile_pdf.cpp deleted file mode 100644 index a3dcbde7..00000000 --- a/kfile-plugins/pdf/kfile_pdf.cpp +++ /dev/null @@ -1,104 +0,0 @@ -/* This file is part of the KDE project - * Copyright (C) 2001, 2002 Rolf Magnus <ramagnus@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 version 2. - * - * 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; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - * - * $Id$ - */ - -#include "kfile_pdf.h" - -#include <kgenericfactory.h> -#include <kdebug.h> - -typedef KGenericFactory<KPdfPlugin> PdfFactory; - -K_EXPORT_COMPONENT_FACTORY(kfile_pdf, PdfFactory("kfile_pdf")) - -KPdfPlugin::KPdfPlugin(TQObject *parent, const char *name, const TQStringList &preferredItems) - : KFilePlugin(parent, name, preferredItems) -{ - kdDebug(7034) << "pdf plugin\n"; - - // set up our mime type - KFileMimeTypeInfo* info = addMimeTypeInfo( "application/pdf" ); - - // general group - KFileMimeTypeInfo::GroupInfo* group = addGroupInfo(info, "General", i18n("General")); - - KFileMimeTypeInfo::ItemInfo* item; - - item = addItemInfo(group, "Title", i18n("Title"), TQVariant::String); - setHint(item, KFileMimeTypeInfo::Name); - item = addItemInfo(group, "Subject", i18n("Subject"), TQVariant::String); - setHint(item, KFileMimeTypeInfo::Description); - item = addItemInfo(group, "Author", i18n("Author"), TQVariant::String); - setHint(item, KFileMimeTypeInfo::Author); - addItemInfo(group, "Keywords", i18n("Key Words"), TQVariant::String); - addItemInfo(group, "Creator", i18n("Creator"), TQVariant::String); - addItemInfo(group, "Producer", i18n("Producer"), TQVariant::String); - addItemInfo(group, "CreationDate", i18n("Creation Date"), TQVariant::DateTime); - addItemInfo(group, "ModificationDate", i18n("Modified"), TQVariant::DateTime); - addItemInfo(group, "Pages", i18n("Pages"), TQVariant::Int); - addItemInfo(group, "Protected", i18n("Protected"), TQVariant::String); - addItemInfo(group, "Linearized", i18n("Linearized"), TQVariant::String); - addItemInfo(group, "Version", i18n("Version"), TQVariant::String); -} - -bool KPdfPlugin::readInfo( KFileMetaInfo& info, uint /* what */) -{ - Poppler::Document *doc = Poppler::Document::load(info.path()); - if (!doc || doc->isLocked()) - { - delete doc; - return false; - } - - KFileMetaInfoGroup generalGroup = appendGroup(info, "General"); - - appendItem(generalGroup, "Title", doc->getInfo("Title") ); - appendItem(generalGroup, "Subject", doc->getInfo("Subject") ); - appendItem(generalGroup, "Author", doc->getInfo("Author") ); - appendItem(generalGroup, "Keywords", doc->getInfo("Keywords") ); - appendItem(generalGroup, "Creator", doc->getInfo("Creator") ); - appendItem(generalGroup, "Producer", doc->getInfo("Producer") ); - - appendItem(generalGroup, "CreationDate", doc->getDate("CreationDate") ); - appendItem(generalGroup, "ModificationDate", doc->getDate("ModDate") ); - appendItem(generalGroup, "Pages", doc->getNumPages() ); - - TQString enc; - if (doc->isEncrypted()) - { - enc = i18n("Yes (Can Print:%1 Can Copy:%2 Can Change:%3 Can Add notes:%4)") - .arg(doc->okToPrint() ? i18n("Yes") : i18n("No")) - .arg(doc->okToCopy() ? i18n("Yes") : i18n("No")) - .arg(doc->okToChange() ? i18n("Yes") : i18n("No")) - .arg(doc->okToAddNotes() ? i18n("Yes") : i18n("No")); - } - else enc = i18n("No"); - - appendItem(generalGroup, "Protected", enc ); - appendItem(generalGroup, "Linearized", doc->isLinearized() ? i18n("Yes") : i18n("No") ); - TQString versionString = TQString("%1").arg( doc->getPDFVersion(), 0, 'f', 1 ); - appendItem(generalGroup, "Version", versionString ); - - delete doc; - - return true; -} - -#include "kfile_pdf.moc" - diff --git a/kfile-plugins/pdf/kfile_pdf.desktop b/kfile-plugins/pdf/kfile_pdf.desktop deleted file mode 100644 index 0af41176..00000000 --- a/kfile-plugins/pdf/kfile_pdf.desktop +++ /dev/null @@ -1,64 +0,0 @@ -[Desktop Entry] -Type=Service -Name=PDF Info -Name[af]=Pdf Inligting -Name[ar]=معلومات PDF -Name[br]=Titouroù PDF -Name[ca]=Informació de PDF -Name[cs]=PDF info -Name[cy]=Gybodaeth PDF -Name[da]=PDF-info -Name[de]=PDF-Info -Name[el]=Πληροφορίες PDF -Name[eo]=PDF-informo -Name[es]=Info PDF -Name[et]=PDF info -Name[fa]=اطلاعات PDF -Name[fi]=PDF-tiedot -Name[fr]=Informations PDF -Name[gl]=Inf. PDF -Name[he]=מידע PDF -Name[hi]=PDF जानकारी -Name[hr]=PDF Informacije -Name[hu]=PDF-jellemzők -Name[is]=PDF upplýsingar -Name[it]=Informazioni PDF -Name[ja]=PDF 情報 -Name[kk]=PDF мәліметі -Name[km]=ព័ត៌មាន PDF -Name[lt]=PDF informacija -Name[ms]=Maklumat PDF -Name[nds]=PDF-Info -Name[ne]=PDF सूचना -Name[nl]=PDF-info -Name[nn]=PDF-info -Name[nso]=Tshedimoso ya PDF -Name[pa]=PDF ਜਾਣਕਾਰੀ -Name[pl]=Informacja o pliku PDF -Name[pt]=Informação do PDF -Name[pt_BR]=Informação sobre PDF -Name[ro]=Informaţii PDF -Name[ru]=Информация о PDF -Name[se]=PDF-dieđut -Name[sl]=Podatki o PDF -Name[sr]=PDF информације -Name[sr@Latn]=PDF informacije -Name[sv]=PDF-information -Name[ta]=PDF தகவல் -Name[tg]=Иттилоот оиди PDF -Name[th]=ข้อมูลแฟ้ม PDF -Name[tr]=PDF Bilgisi -Name[uk]=Інформація про PDF -Name[uz]=PDF haqida maʼlumot -Name[uz@cyrillic]=PDF ҳақида маълумот -Name[ven]=Mafhungo a PDF -Name[wa]=Informåcion sol documint PDF -Name[xh]=PDF Ulwazi -Name[zh_CN]=PDF 信息 -Name[zh_HK]=PDF 資訊 -Name[zh_TW]=PDF 資訊 -Name[zu]=Ulwazi lwe-PDF -ServiceTypes=KFilePlugin -X-TDE-Library=kfile_pdf -MimeType=application/pdf -PreferredItems=Title,Subject,Author,Keywords,Creator,Producer,CreationDate,ModificationDate,Pages,Protected,Linearized,Version diff --git a/kfile-plugins/pdf/kfile_pdf.h b/kfile-plugins/pdf/kfile_pdf.h deleted file mode 100644 index e732e2be..00000000 --- a/kfile-plugins/pdf/kfile_pdf.h +++ /dev/null @@ -1,39 +0,0 @@ -/* This file is part of the KDE project - * Copyright (C) 2001, 2002 Rolf Magnus <ramagnus@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 version 2. - * - * 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; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - * - * $Id$ - */ - -#ifndef __KFILE_PDF_H__ -#define __KFILE_PDF_H__ - -#include <kfilemetainfo.h> -#include <poppler-qt.h> - -class TQStringList; - -class KPdfPlugin: public KFilePlugin -{ -Q_OBJECT - -public: - KPdfPlugin( TQObject *parent, const char *name, const TQStringList& preferredItems ); - - virtual bool readInfo(KFileMetaInfo& info, uint what); -}; - -#endif |