pdf-input-cairo.cpp revision 58142222ef8296ed3abed91c6582afc31e4464fd
/*
* Simple PDF import extension using libpoppler and Cairo's SVG surface.
*
* Authors:
* miklos erdelyi
* Abhishek Sharma
*
* Copyright (C) 2007 Authors
*
* Released under GNU GPL, read the file 'COPYING' for more information
*
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#ifdef HAVE_POPPLER_GLIB
#include "pdf-input-cairo.h"
#include "document.h"
#include <cairo-svg.h>
namespace Inkscape {
namespace Extension {
namespace Internal {
static cairo_status_t _write_ustring_cb(void *closure, const unsigned char *data, unsigned int length);
printf("Attempting to open using PdfInputCairo\n");
return NULL;
cairo_surface_t* surface = cairo_svg_surface_create_for_stream(Inkscape::Extension::Internal::_write_ustring_cb,
delete output;
return doc;
}
static cairo_status_t
{
return CAIRO_STATUS_SUCCESS;
}
#include "clear-n_.h"
void
PdfInputCairo::init(void) {
"<name>PDF Input</name>\n"
"<id>org.inkscape.input.cairo-pdf</id>\n"
"<input>\n"
"<extension>.pdf</extension>\n"
"<mimetype>application/pdf</mimetype>\n"
"<filetypename>Adobe PDF via poppler-cairo (*.pdf)</filetypename>\n"
"<filetypetooltip>PDF Document</filetypetooltip>\n"
"</input>\n"
"</inkscape-extension>", new PdfInputCairo());
} // init
} } } /* namespace Inkscape, Extension, Implementation */
#endif /* HAVE_POPPLER_GLIB */
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :