Open a PDF with a mode other than Modify then attempt to save the PDF. You will be presented with an error stating, "Cannot save a PDF document with no pages." Add a line before the save to obtain the PageCount and then a save will succeed.
By default, the _pages object is instantiated on open only when the Modify mode is specified though this object is required for the save. Grabbing the PageCount or Pages will perform the instantiation but only supposed to when CanModify evaluates to true; CanModify is currently hard coded to true.
A PR has been submitted to correct the issue at hand and observes the rules already in place and planned for CanModify.
Open a PDF with a mode other than Modify then attempt to save the PDF. You will be presented with an error stating, "Cannot save a PDF document with no pages." Add a line before the save to obtain the PageCount and then a save will succeed.
By default, the _pages object is instantiated on open only when the Modify mode is specified though this object is required for the save. Grabbing the PageCount or Pages will perform the instantiation but only supposed to when CanModify evaluates to true; CanModify is currently hard coded to true.
A PR has been submitted to correct the issue at hand and observes the rules already in place and planned for CanModify.