On Thu, 2020-03-05 at 18:02 +0100, Michal Sudolsky wrote: > Seems currently the only option how to open pdf encrypted with > password is to try-catch around "Load" function and in case of > specific exception call "SetPassword" to finalise loading. But as > name suggests exceptions should be used for exceptional things which > do not occur very often also because they are relatively slow. But > podofo requires exception mechanism for such regular workflow as > opening password protected documents. > > Better would be to signal this in different way (return value?) or > have possibility to set password before loading pdf. There is also > interesting function "QuickEncryptedCheck" in parser but it accepts > only file names.
Hi, okay, that sounds correct. I'm not sure whether your mail is complete, it seems to be cut for some reason. Having there a way to know whether password is needed is required, no doubt. I would not drop the current call-flow though, as many library users rely on it. Bye, zyx _______________________________________________ Podofo-users mailing list Podofo-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/podofo-users