Aspose.PDF C++ version crash while adding watermarks

Hi,
found a crash situation while testing Aspose.PDF for C++; adding Watermarks to each page works fine on file “Example1.pdf” but fails on “pdr_small.pdf”.
The "pdr_small"document contains 6 pages but the line of code “doc->get_Pages()->idx_get(5)” throws an exception.
Please note that the same operation on "pdr_small"document works fine using the Java version of the library.
Attached you can find a zip file containing: a screenshot of the code performing this operation, the correct resulting pdf (Example6.pdf) created with this code from file “Example1.pdf” (included) and the failing PDF file “pdr_small”.

Aspose.PDF CPP Watermarks issue.zip (343.7 KB)

Aspose.PDF c++ library version used: 25.5.

Thank you for your support,
Best Regards

@gianfranco.dancelli
The unlicensed version of the library allows work only with a maximum of 4-page documents.
You may obtain a temporary license to have full functionality.
Then, please use the following code snippet to set a license

            using namespace System;
            using namespace Aspose::Pdf;
...
            auto lic = MakeObject<License>();
            lic->SetLicense(u"path to your license file");
...

Hi,
and thanks for the info.