Closed ReMiOS closed 1 year ago
I've added support for the 4 modes you mentioned, password stuff is also in progress!
Great, i've tested the mode settings and they work nicely
also like the workaround to use a integer instead of the "python string" to "c++ char *"
Added a test pdf with userpassword = password ownerpassword = password2
Tried the "add-password-support" Branch, but it looks the password option does not pass any value to PDFDoc.cc
both variables ownerPassword and userPassword in PDFDoc.cc are NULL when values are given to _loader = PdfLoader('PWDtest.pdf',"password2","password" ) in test a python script
type: class GString * __ptr64
value: 0000000000000000
When i put in the values manually in PdfLoader.cc the PDF gets decoded correctly
GString *ownerPasswordGS = new GString("password2");
GString *userPassword = new GString("password");
doc = new PDFDoc(fileName, ownerPasswordGS , userPassword);
since both owner and userpass are used in the test PDF only one pass also works
doc = new PDFDoc(fileName, ownerPasswordGS , NULL);
doc = new PDFDoc(fileName, NULL , userPassword);
Thanks for your help ! Also PDF files with password work now :)
Since some PDF files are protected with a password an option to provide a password would be useful.
By default this wrapper library uses textOutTableLayout, which is best in most cases. However sometimes i have better results using textOutLinePrinter or textOutSimpleLayout Is it possible to add this option as a config option ?
from: pdftotext.cc
# Update:
I've managed to make some changes and now the page layout is selectable with option mode (defaults to table) Since i have little experience in C++ there's probably a nicer way to achieve this... I don't see on how to add an option for the ownerPassword and userPassword, any help is appreciated :)
PdfLoader.h
PdfLoader.cc
PdfLoaderWrapper.cc
pdf_loader.pxi
pdf_loader.py