mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Get creating outlines working again
This commit is contained in:
parent
0517092f52
commit
541c1d2036
@ -24,9 +24,8 @@ create_outline(PDFDoc *self, PyObject *args) {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
PdfString title = podofo_convert_pystring(title_buf);
|
PdfString title = podofo_convert_pystring(title_buf);
|
||||||
PdfOutlines *outlines = self->doc->GetOutlines();
|
PdfOutlines &outlines = self->doc->GetOrCreateOutlines();
|
||||||
if (outlines == NULL) {PyErr_NoMemory(); return NULL;}
|
ans->item = outlines.CreateRoot(title);
|
||||||
ans->item = outlines->CreateRoot(title);
|
|
||||||
if (ans->item == NULL) {PyErr_NoMemory(); return NULL;}
|
if (ans->item == NULL) {PyErr_NoMemory(); return NULL;}
|
||||||
ans->doc = self->doc;
|
ans->doc = self->doc;
|
||||||
auto page = get_page(self->doc, pagenum -1);
|
auto page = get_page(self->doc, pagenum -1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user