diff --git a/src/extension/internal/cairo-renderer-pdf-out.cpp b/src/extension/internal/cairo-renderer-pdf-out.cpp
index 96366e5928dbce6aae8a24163ad383daab7c8dfb..b44e83449323711c64434b05789d061639d77fe5 100644 (file)
/* Create new arena */
NRArena *arena = NRArena::create();
+ nr_arena_set_renderoffscreen (arena);
unsigned dkey = sp_item_display_key_new(1);
- NRArenaItem *root = sp_item_invoke_show(base, arena, dkey, SP_ITEM_SHOW_DISPLAY);
+ sp_item_invoke_show(base, arena, dkey, SP_ITEM_SHOW_DISPLAY);
/* Create renderer and context */
CairoRenderer *renderer = new CairoRenderer();
/* Release arena */
sp_item_invoke_hide(base, dkey);
- nr_arena_item_unref(root);
nr_object_unref((NRObject *) arena);
-/* end */
+
renderer->destroyContext(ctx);
delete renderer;
@@ -111,14 +111,14 @@ pdf_render_document_to_file(SPDocument *doc, gchar const *filename, unsigned int
\brief This function calls the output module with the filename
\param mod unused
\param doc Document to be saved
- \param uri Filename to save to (probably will end in .pdf)
+ \param filename Filename to save to (probably will end in .pdf)
The most interesting thing that this function does is just attach
an '>' on the front of the filename. This is the syntax used to
tell the printing system to save to file.
*/
void
-CairoRendererPdfOutput::save (Inkscape::Extension::Output *mod, SPDocument *doc, const gchar *uri)
+CairoRendererPdfOutput::save(Inkscape::Extension::Output *mod, SPDocument *doc, gchar const *filename)
{
Inkscape::Extension::Extension * ext;
unsigned int ret;
@@ -135,7 +135,7 @@ CairoRendererPdfOutput::save (Inkscape::Extension::Output *mod, SPDocument *doc,
// level = 1;
}
catch(...) {
-// g_warning("Parameter <PDFversion> might not exists");
+// g_warning("Parameter <PDFversion> might not exist");
}
bool new_textToPath = FALSE;
@@ -143,7 +143,7 @@ CairoRendererPdfOutput::save (Inkscape::Extension::Output *mod, SPDocument *doc,
new_textToPath = mod->get_param_bool("textToPath");
}
catch(...) {
- g_warning("Parameter <textToPath> might not exists");
+ g_warning("Parameter <textToPath> might not exist");
}
bool new_blurToBitmap = FALSE;
@@ -151,7 +151,7 @@ CairoRendererPdfOutput::save (Inkscape::Extension::Output *mod, SPDocument *doc,
new_blurToBitmap = mod->get_param_bool("blurToBitmap");
}
catch(...) {
- g_warning("Parameter <blurToBitmap> might not exists");
+ g_warning("Parameter <blurToBitmap> might not exist");
}
int new_bitmapResolution = 72;
@@ -159,7 +159,7 @@ CairoRendererPdfOutput::save (Inkscape::Extension::Output *mod, SPDocument *doc,
new_bitmapResolution = mod->get_param_int("resolution");
}
catch(...) {
- g_warning("Parameter <resolution> might not exists");
+ g_warning("Parameter <resolution> might not exist");
}
const gchar *new_exportId = NULL;
@@ -167,27 +167,27 @@ CairoRendererPdfOutput::save (Inkscape::Extension::Output *mod, SPDocument *doc,
new_exportId = mod->get_param_string("exportId");
}
catch(...) {
- g_warning("Parameter <exportId> might not exists");
+ g_warning("Parameter <exportId> might not exist");
}
bool new_exportDrawing = FALSE;
try {
- new_exportDrawing = mod->get_param_bool("exportDrawing");
+ new_exportDrawing = mod->get_param_bool("areaDrawing");
}
catch(...) {
- g_warning("Parameter <exportDrawing> might not exists");
+ g_warning("Parameter <areaDrawing> might not exist");
}
bool new_exportCanvas = FALSE;
try {
- new_exportCanvas = mod->get_param_bool("exportCanvas");
+ new_exportCanvas = mod->get_param_bool("areaCanvas");
}
catch(...) {
- g_warning("Parameter <exportCanvas> might not exists");
+ g_warning("Parameter <exportCanvas> might not exist");
}
gchar * final_name;
- final_name = g_strdup_printf("> %s", uri);
+ final_name = g_strdup_printf("> %s", filename);
ret = pdf_render_document_to_file(doc, final_name, level,
new_textToPath, new_blurToBitmap, new_bitmapResolution,
new_exportId, new_exportDrawing, new_exportCanvas);
@@ -195,8 +195,6 @@ CairoRendererPdfOutput::save (Inkscape::Extension::Output *mod, SPDocument *doc,
if (!ret)
throw Inkscape::Extension::Output::save_failed();
-
- return;
}
#include "clear-n_.h"
"<_item value='PDF14'>" N_("PDF 1.4") "</_item>\n"
"</param>\n"
"<param name=\"textToPath\" gui-text=\"" N_("Convert texts to paths") "\" type=\"boolean\">false</param>\n"
- "<param name=\"blurToBitmap\" gui-text=\"" N_("Convert filter effects to bitmaps") "\" type=\"boolean\">false</param>\n"
- "<param name=\"resolution\" gui-text=\"" N_("Preferred resolution (DPI) of bitmaps") "\" type=\"int\" min=\"72\" max=\"2400\">90</param>\n"
- "<param name=\"exportDrawing\" gui-text=\"" N_("Export drawing, not page") "\" type=\"boolean\">false</param>\n"
- "<param name=\"exportCanvas\" gui-text=\"" N_("Export canvas") "\" type=\"boolean\">false</param>\n"
+ "<param name=\"blurToBitmap\" gui-text=\"" N_("Rasterize filter effects") "\" type=\"boolean\">true</param>\n"
+ "<param name=\"resolution\" gui-text=\"" N_("Resolution for rasterization (dpi)") "\" type=\"int\" min=\"1\" max=\"10000\">90</param>\n"
+ "<param name=\"areaDrawing\" gui-text=\"" N_("Export drawing, not page") "\" type=\"boolean\">false</param>\n"
+ "<param name=\"areaCanvas\" gui-text=\"" N_("Export canvas") "\" type=\"boolean\">false</param>\n"
"<param name=\"exportId\" gui-text=\"" N_("Limit export to the object with ID") "\" type=\"string\"></param>\n"
"<output>\n"
"<extension>.pdf</extension>\n"