[poppler] poppler/qt4/src: poppler-document.cc, 1.2, 1.3 poppler-qt4.h, 1.2, 1.3

Brad Hards bradh at freedesktop.org
Tue Jul 5 05:25:13 PDT 2005


Update of /cvs/poppler/poppler/qt4/src
In directory gabe:/tmp/cvs-serv25970/qt4/src

Modified Files:
	poppler-document.cc poppler-qt4.h 
Log Message:
Add Qt4 bindings for new user permission properties.


Index: poppler-document.cc
===================================================================
RCS file: /cvs/poppler/poppler/qt4/src/poppler-document.cc,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- poppler-document.cc	4 Jul 2005 08:16:17 -0000	1.2
+++ poppler-document.cc	5 Jul 2005 12:25:11 -0000	1.3
@@ -280,6 +280,11 @@
 	return m_doc->doc.okToPrint();
     }
 
+    bool Document::okToPrintHighRes() const
+    {
+	return m_doc->doc.okToPrintHighRes();
+    }
+
     bool Document::okToChange() const
     {
 	return m_doc->doc.okToChange();
@@ -295,6 +300,26 @@
 	return m_doc->doc.okToAddNotes();
     }
 
+    bool Document::okToFillForm() const
+    {
+	return m_doc->doc.okToFillForm();
+    }
+
+    bool Document::okToCreateFormFields() const
+    {
+	return ( okToFillForm() && okToChange() );
+    }
+
+    bool Document::okToExtractForAccessibility() const
+    {
+	return m_doc->doc.okToAccessibility();
+    }
+
+    bool Document::okToAssemble() const
+    {
+	return m_doc->doc.okToAssemble();
+    }
+
     double Document::pdfVersion() const
     {
 	return m_doc->doc.getPDFVersion();

Index: poppler-qt4.h
===================================================================
RCS file: /cvs/poppler/poppler/qt4/src/poppler-qt4.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- poppler-qt4.h	4 Jul 2005 08:16:17 -0000	1.2
+++ poppler-qt4.h	5 Jul 2005 12:25:11 -0000	1.3
@@ -296,23 +296,64 @@
 
 	/**
 	   Test if the permissions on the document allow it to be
-	   changed
+	   printed at high resolution
 	*/
-	bool okToChange() const;
+	bool okToPrintHighRes() const;
 
 	/**
 	   Test if the permissions on the document allow it to be
-	   copied
+	   changed.
+
+	   \note depending on the type of change, it may be more
+	   appropriate to check other properties as well.
+	*/
+	bool okToChange() const;
+
+	/**
+	   Test if the permissions on the document allow the
+	   contents to be copied / extracted
 	*/
 	bool okToCopy() const;
 
 	/**
-	   Test if the permissions on the document allow notes to be
-	   added
+	   Test if the permissions on the document allow annotations
+	   to be added or modified, and interactive form fields (including
+	   signature fields) to be completed.
 	*/
 	bool okToAddNotes() const;
 
 	/**
+	   Test if the permissions on the document allow interactive
+	   form fields (including signature fields) to be completed.
+
+	   \note this can be true even if okToAddNotes() is false - this
+	   means that only form completion is permitted.
+	*/
+	bool okToFillForm() const;
+
+	/**
+	   Test if the permissions on the document allow interactive
+	   form fields (including signature fields) to be set, created and
+	   modified
+	*/
+	bool okToCreateFormFields() const;
+
+	/**
+	   Test if the permissions on the document allow content extraction
+	   (text and perhaps other content) for accessibility usage (eg for
+	   a screen reader)
+	*/
+	bool okToExtractForAccessibility() const;
+
+	/**
+	   Test if the permissions on the document allow it to be
+	   "assembled" - insertion, rotation and deletion of pages;
+	   or creation of bookmarks and thumbnail images. This can
+	   be true even if okToChange is false.
+	*/
+	bool okToAssemble() const;
+
+	/**
 	   The version of the PDF specification that the document
 	   conforms to
 	*/



More information about the poppler mailing list