Commit faccb408 authored by Sebastian Ramacher's avatar Sebastian Ramacher

Merge remote-tracking branch 'origin/develop' into develop

parents 2504b2e7 42926213
......@@ -73,3 +73,16 @@ pdf_document_get_information(zathura_document_t* document, void* data, zathura_e
return list;
}
zathura_error_t
pdf_page_get_label(zathura_page_t* page, void* data, char** label)
{
if (page == NULL || data == NULL || label == NULL) {
return ZATHURA_ERROR_INVALID_ARGUMENTS;
}
PopplerPage* poppler_page = data;
*label = poppler_page_get_label(poppler_page);
return ZATHURA_ERROR_OK;
}
......@@ -21,7 +21,8 @@ ZATHURA_PLUGIN_REGISTER_WITH_FUNCTIONS(
.page_images_get = pdf_page_images_get,
.page_get_text = pdf_page_get_text,
.page_render_cairo = pdf_page_render_cairo,
.page_image_get_cairo = pdf_page_image_get_cairo
.page_image_get_cairo = pdf_page_image_get_cairo,
.page_get_label = pdf_page_get_label
}),
ZATHURA_PLUGIN_MIMETYPES({
"application/pdf"
......
......@@ -187,4 +187,16 @@ GIRARA_HIDDEN char* pdf_page_get_text(zathura_page_t* page, void* poppler_page,
GIRARA_HIDDEN zathura_error_t pdf_page_render_cairo(zathura_page_t* page, void*
poppler_page, cairo_t* cairo, bool printing);
/**
* Get the page label
*
* @param page Page
* @param poppler_page Internal page representation
* @param label Label
* @return ZATHURA_ERROR_OK when no error occurred, otherwise see
* zathura_error_t
*/
GIRARA_HIDDEN zathura_error_t pdf_page_get_label(zathura_page_t* page,
void* data, char** label);
#endif // PDF_H
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment