19#ifdef CAIRO_HAS_PDF_SURFACE
83 drawing.
setRoot(
root->invoke_show(drawing, dkey, SP_ITEM_SHOW_DISPLAY));
102 root->invoke_hide(dkey);
128 const gchar *new_level =
mod->get_param_optiongroup(
"PDFversion");
129 if((new_level !=
nullptr) && (g_ascii_strcasecmp(
"PDF-1.5", new_level) == 0)) {
134 g_warning(
"Parameter <PDFversion> might not exist");
140 flags.
text_to_path = (strcmp(
mod->get_param_optiongroup(
"textToPath"),
"paths") == 0);
143 g_warning(
"Parameter <textToPath> might not exist");
148 flags.
text_to_latex = (strcmp(
mod->get_param_optiongroup(
"textToPath"),
"LaTeX") == 0);
151 g_warning(
"Parameter <textToLaTeX> might not exist");
159 g_warning(
"Parameter <blurToBitmap> might not exist");
162 int new_bitmapResolution = 72;
164 new_bitmapResolution =
mod->get_param_int(
"resolution");
167 g_warning(
"Parameter <resolution> might not exist");
174 g_warning(
"Parameter <stretch> might not exist");
180 final_name = g_strdup_printf(
"> %s", filename);
211 "<inkscape-extension xmlns=\"" INKSCAPE_EXTENSION_URI
"\">\n"
212 "<name>Portable Document Format</name>\n"
213 "<id>org.inkscape.output.pdf.cairorenderer</id>\n"
214 "<param name=\"PDFversion\" gui-text=\"" N_(
"Restrict to PDF version:")
"\" type=\"optiongroup\" appearance=\"combo\" >\n"
215 "<option value='PDF-1.5'>" N_(
"PDF 1.5")
"</option>\n"
216 "<option value='PDF-1.4'>" N_(
"PDF 1.4")
"</option>\n"
218 "<param name=\"textToPath\" gui-text=\"" N_(
"Text output options:")
"\" type=\"optiongroup\" appearance=\"radio\">\n"
219 "<option value=\"embed\">" N_(
"Embed fonts")
"</option>\n"
220 "<option value=\"paths\">" N_(
"Convert text to paths")
"</option>\n"
221 "<option value=\"LaTeX\">" N_(
"Omit text in PDF and create LaTeX file")
"</option>\n"
223 "<param name=\"blurToBitmap\" gui-text=\"" N_(
"Rasterize filter effects")
"\" type=\"bool\">true</param>\n"
224 "<param name=\"resolution\" gui-text=\"" N_(
"Resolution for rasterization (dpi):")
"\" type=\"int\" min=\"1\" max=\"10000\">96</param>\n"
225 "<spacer size=\"10\" />"
226 "<param name=\"stretch\" gui-text=\"" N_(
"Rounding compensation:")
"\" gui-description=\""
227 N_(
"Exporting to PDF rounds the document size to the next whole number in pt units. Compensation may stretch the drawing slightly (up to 0.35mm for width and/or height). When not compensating, object sizes will be preserved strictly, but this can sometimes cause white gaps along the page margins.")
228 "\" type=\"optiongroup\" appearance=\"radio\" >\n"
229 "<option value=\"relative\">" N_(
"Compensate for rounding (recommended)")
"</option>"
230 "<option value=\"absolute\">" N_(
"Do not compensate")
"</option>"
231 "</param><separator/>"
232 "<hbox indent=\"1\"><image>info-outline</image><spacer/><vbox><spacer/>"
233 "<label>" N_(
"When exporting from the Export dialog, you can choose objects to export. 'Save a copy' / 'Save as' will export all pages.")
"</label>"
234 "<spacer size=\"5\" />"
235 "<label>" N_(
"The page bleed can be set with the Page tool.")
"</label>"
237 "<output is_exported='true' priority='5'>\n"
238 "<extension>.pdf</extension>\n"
239 "<mimetype>application/pdf</mimetype>\n"
240 "<filetypename>PDF (*.pdf)</filetypename>\n"
241 "<filetypetooltip>PDF File</filetypetooltip>\n"
243 "</inkscape-extension>", std::make_unique<CairoRendererPdfOutput>());
3x3 affine transformation matrix.
Declaration of CairoRenderContext, a class used for rendering with Cairo.
Declaration of CairoRenderer, a class used for rendering via a CairoRenderContext.
void setRoot(DrawingItem *root)
Extension * get(const gchar *key) const
This function looks up a Inkscape::Extension::Extension by using its unique id. It then returns a ref...
The object that is the basis for the Extension system.
char const * get_param_optiongroup(char const *name, char const *alt) const
Like get_param_optiongroup but with a default on param_not_exist error.
bool setPdfTarget(gchar const *utf8_fn)
void setPDFLevel(unsigned int level)
void setFilterToBitmap(bool filtertobitmap)
void setOmitText(bool omittext)
void setTextToPath(bool texttopath)
bool finish(bool finish_surface=true)
void setBitmapResolution(unsigned resolution)
static void init()
A function allocate a copy of this function.
void save(Inkscape::Extension::Output *mod, SPDocument *doc, gchar const *filename) override
This function calls the output module with the filename.
bool check(Inkscape::Extension::Extension *module) override
Verify any dependencies.
bool renderPages(CairoRenderContext *ctx, SPDocument *doc, bool stretch_to_fit)
Handle multiple pages, pushing each out to cairo as needed using renderItem()
CairoRenderContext createContext()
bool setupDocument(CairoRenderContext *ctx, SPDocument *doc, SPItem const *base=nullptr)
Initializes the CairoRenderContext according to the specified SPDocument.
Generic failure for an undescribed reason.
Typed SVG document implementation.
SPRoot * getRoot()
Returns our SPRoot.
int ensureUpToDate()
Repeatedly works on getting the document updated, since sometimes it takes more than one pass to get ...
static unsigned int display_key_new(unsigned numkeys)
Allocates unique integer keys.
A way to clear the N_ macro, which is defined as an inline function.
Declaration of LaTeXTextRenderer, used for rendering the accompanying LaTeX file when exporting to PD...
bool latex_render_document_text_to_file(SPDocument *doc, gchar const *filename, bool pdflatex)
This method is called by the PDF, EPS and PS output extensions.
static bool pdf_render_document_to_file(SPDocument *doc, gchar const *filename, unsigned int level, PDFOptions flags, int resolution)
DB db
This is the actual database object.
void build_from_mem(gchar const *buffer, std::unique_ptr< Implementation::Implementation > in_imp)
Create a module from a buffer holding an XML description.
CMYK to sRGB conversion routines.
void convert_text_to_curves(SPDocument *)
Convert all text in the document to path, in-place.
Some things pertinent to all visible shapes: SPItem, SPItemView, SPItemCtx.
SPRoot: SVG <svg> implementation.
bool text_to_path
Convert text to paths?
bool stretch_to_fit
Compensate for Cairo's page size rounding to integers (in pt)?
bool rasterize_filters
Rasterize filter effects?
bool text_to_latex
Put text in a LaTeX document?