<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 14 Mar 2023 at 14:51, Andreas Matthias <<a href="mailto:andreas.matthias@gmail.com">andreas.matthias@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div style="font-family:arial,sans-serif;font-size:small">1)<br></div><div style="font-family:arial,sans-serif;font-size:small">I have a user password protected PDF and try to unencrypt it with a wrong(!) password.</div><div style="font-family:arial,sans-serif;font-size:small">To my understanding pdfe.getstatus() should return -1 but actually it returns -2 in the</div><div style="font-family:arial,sans-serif;font-size:small">following example. Did I misunderstand the meaning of -1?<br></div><div style="font-family:arial,sans-serif;font-size:small"></div><div style="font-family:arial,sans-serif;font-size:small"><br></div><div style="font-family:arial,sans-serif;font-size:small">\directlua{<br>  doc = pdfe.open('foo.pdf')<br>  pdfe.unencrypt(doc, 'wrong_password', nil)<br>  stat = pdfe.getstatus(doc)<br>  print('Status:', stat) -- returns -2<br>}<br>\bye</div><div style="font-family:arial,sans-serif;font-size:small"><br></div><br><div style="font-family:arial,sans-serif;font-size:small">2)</div><div style="font-family:arial,sans-serif;font-size:small">If a PDF has been unencrypted successfully, pdfe.getstatus() returns 1. I guess it's</div><div style="font-family:arial,sans-serif;font-size:small">a typo in the documentation (§14.2.2) that says it should return 2.<br></div><div style="font-family:arial,sans-serif;font-size:small"><br></div></div></blockquote><div><br></div><div>I will check it for the next 1.16.1 release.<br><br>--<br>luigi<br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div style="font-family:arial,sans-serif;font-size:small"></div><div style="font-family:arial,sans-serif;font-size:small">Cheers</div><div style="font-family:arial,sans-serif;font-size:small">Andreas</div><div style="font-family:arial,sans-serif;font-size:small"><br></div></div>
</blockquote></div></div>