mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
Proper fix for podofo 0.9.6
This commit is contained in:
parent
dc130d90cd
commit
8b03d1d61a
@ -42,7 +42,7 @@ PDFDoc_load(PDFDoc *self, PyObject *args) {
|
||||
#if PODOFO_VERSION <= 0x000905
|
||||
self->doc->Load(buffer, (long)size);
|
||||
#else
|
||||
self->doc->LoadBuffer(buffer, (long)size);
|
||||
self->doc->LoadFromBuffer(buffer, (long)size);
|
||||
#endif
|
||||
} catch(const PdfError & err) {
|
||||
podofo_set_exception(err);
|
||||
@ -60,11 +60,7 @@ PDFDoc_open(PDFDoc *self, PyObject *args) {
|
||||
|
||||
if (PyArg_ParseTuple(args, "s", &fname)) {
|
||||
try {
|
||||
#if PODOFO_VERSION <= 0x000905
|
||||
self->doc->Load(fname);
|
||||
#else
|
||||
self->doc->LoadFromFile(fname);
|
||||
#endif
|
||||
} catch(const PdfError & err) {
|
||||
podofo_set_exception(err);
|
||||
return NULL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user