PdfProcessor: Throw exception for encrypted/password protected files
This commit is contained in:
parent
cb8909bfa7
commit
2d6994b1f5
@ -13,6 +13,11 @@ QVector<PageData> PdfProcessor::process(const QByteArray &data) const
|
|||||||
{
|
{
|
||||||
throw QSSGeneralException("Failed to process pdf data");
|
throw QSSGeneralException("Failed to process pdf data");
|
||||||
}
|
}
|
||||||
|
if(doc->isEncrypted() || doc->isLocked())
|
||||||
|
{
|
||||||
|
throw QSSGeneralException("Doc is encrypted/locked");
|
||||||
|
}
|
||||||
|
|
||||||
QRectF entirePage;
|
QRectF entirePage;
|
||||||
|
|
||||||
auto pagecount = doc->numPages();
|
auto pagecount = doc->numPages();
|
||||||
|
Loading…
Reference in New Issue
Block a user