Commit 839a798e authored by Brad Hards's avatar Brad Hards
Browse files

Add Qt4 bindings for new user permission properties.

parent e10f6990
2005-07-05 Brad Hards <bradh@frogmouth.net>
* qt4/src/poppler-document.cc (Poppler):
* qt4/src/poppler-qt4.h: Add Qt4 bindings for the
additional user permission properties.
* poppler/XRef.h:
* poppler/Xref.cc:
* poppler/PDFDoc.h: Add some more user permissions properties -
......
......@@ -280,6 +280,11 @@ namespace Poppler {
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 @@ namespace Poppler {
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();
......
......@@ -296,22 +296,63 @@ namespace Poppler {
/**
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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment