diff options
author | Adrian Johnson <ajohnson@redneon.com> | 2013-08-03 09:05:21 +0930 |
---|---|---|
committer | Adrian Johnson <ajohnson@redneon.com> | 2013-08-24 14:44:19 +0930 |
commit | 8f7155e7e3180bb1966a5e7df6af6acdd479939b (patch) | |
tree | 6bf3e75e00728cdba688d5cd43b64541ab8f4667 /utils/JSInfo.h | |
parent | c2453fc1307ebb222747f976e1311ecc5e99abfa (diff) |
pdfinfo: indicate if pdf contains javascript
Diffstat (limited to 'utils/JSInfo.h')
-rw-r--r-- | utils/JSInfo.h | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/utils/JSInfo.h b/utils/JSInfo.h new file mode 100644 index 00000000..fed3f68a --- /dev/null +++ b/utils/JSInfo.h @@ -0,0 +1,50 @@ +//======================================================================== +// +// JSInfo.h +// +// This file is licensed under the GPLv2 or later +// +// Copyright (C) 2013 Adrian Johnson <ajohnson@redneon.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 +// +//======================================================================== + +#ifndef JS_INFO_H +#define JS_INFO_H + +#include "Object.h" +#include "PDFDoc.h" +#include "goo/gtypes.h" + +#include "Link.h" + +class PDFDoc; + +class JSInfo { +public: + + // Constructor. + JSInfo(PDFDoc *doc, int firstPage = 0); + + // Destructor. + ~JSInfo(); + + // scan for JS in the PDF + void scanJS(int nPages); + + // return true if PDF contains JavaScript + GBool containsJS(); + +private: + + PDFDoc *doc; + int currentPage; + GBool hasJS; + + void scanLinkAction(LinkAction *link); + +}; + +#endif |