Inkscape
Vector Graphics Editor
|
PDF import using libpoppler. More...
#include <pdf-input.h>
Public Member Functions | |
PdfImportDialog (std::shared_ptr< PDFDoc > doc, const gchar *uri, Input *mod) | |
The PDF import dialog FIXME: Probably this should be placed into src/ui/dialog. | |
~PdfImportDialog () override | |
bool | showDialog () |
std::string | getSelectedPages () |
PdfImportType | getImportMethod () |
FontStrategies | getFontStrategies () |
Saves each decided font strategy to the Svg Builder object. | |
void | setFontStrategies (const FontStrategies &fs) |
Update the font strats. | |
Private Member Functions | |
void | _setPreviewPage (int page) |
Renders the given page's thumbnail using Cairo. | |
void | _setFonts (const FontList &fonts) |
Set a full list of all fonts in use for the whole PDF document. | |
void | _drawFunc (const Cairo::RefPtr< Cairo::Context > &cr, int width, int height) |
void | _onPageNumberChanged () |
Private Attributes | |
Input * | _mod |
Glib::RefPtr< Gtk::Builder > | _builder |
Gtk::Entry & | _page_numbers |
Gtk::DrawingArea & | _preview_area |
Gtk::ComboBox & | _clip_to |
Gtk::CheckButton & | _embed_images |
Gtk::CheckButton & | _import_pages |
Gtk::Scale & | _mesh_slider |
Gtk::Label & | _mesh_label |
Gtk::Button & | _next_page |
Gtk::Button & | _prev_page |
Gtk::Label & | _current_page |
Glib::RefPtr< Gtk::ListStore > | _font_model |
FontModelColumns * | _font_col |
std::shared_ptr< PDFDoc > | _pdf_doc |
std::string | _current_pages |
FontList | _font_list |
int | _total_pages = 0 |
int | _preview_page = 1 |
Page * | _previewed_page |
unsigned char * | _thumb_data |
int | _thumb_width |
int | _thumb_height |
int | _thumb_rowstride |
int | _preview_width |
int | _preview_height |
bool | _render_thumb |
bool | _preview_rendering_in_progress = false |
std::unordered_map< int, std::shared_ptr< cairo_surface_t > > | _cairo_surfaces |
std::vector< Async::Channel::Dest > | _channels |
PopplerDocument * | _poppler_doc = nullptr |
PDF import using libpoppler.
Definition at line 102 of file pdf-input.h.
Inkscape::Extension::Internal::PdfImportDialog::PdfImportDialog | ( | std::shared_ptr< PDFDoc > | doc, |
const gchar * | uri, | ||
Input * | mod | ||
) |
The PDF import dialog FIXME: Probably this should be placed into src/ui/dialog.
Definition at line 143 of file pdf-input.cpp.
References _builder, _clip_to, _current_pages, _drawFunc(), _embed_images, _font_list, _font_model, _import_pages, _mesh_label, _mesh_slider, _mod, _next_page, _onPageNumberChanged(), _page_numbers, _pdf_doc, _poppler_doc, _prev_page, _preview_area, _preview_height, _preview_page, _preview_width, _render_thumb, _setFonts(), _setPreviewPage(), _thumb_data, _total_pages, Inkscape::Extension::Internal::SvgBuilder::autoFontStrategies(), Inkscape::UI::create_builder(), floor(), Inkscape::Extension::Extension::get_param_float(), Inkscape::UI::get_widget(), getPdfFonts(), Inkscape::UI::pack_start(), Inkscape::Extension::Internal::pref_to_font_strategy(), Inkscape::Extension::Extension::set_param_bool(), Inkscape::Extension::Extension::set_param_float(), Inkscape::Extension::Extension::set_param_optiongroup(), setFontStrategies(), and sp_transientize().
|
override |
Definition at line 272 of file pdf-input.cpp.
References _poppler_doc, and _thumb_data.
|
private |
Definition at line 440 of file pdf-input.cpp.
References _cairo_surfaces, _preview_page, _render_thumb, _thumb_data, _thumb_height, _thumb_rowstride, _thumb_width, and Inkscape::Extension::Internal::copy_cairo_surface_to_pixbuf().
Referenced by PdfImportDialog().
|
private |
Definition at line 306 of file pdf-input.cpp.
References _current_pages, _page_numbers, _setPreviewPage(), _total_pages, and Inkscape::parseIntRange().
Referenced by PdfImportDialog().
|
private |
Set a full list of all fonts in use for the whole PDF document.
Definition at line 318 of file pdf-input.cpp.
References _font_col, _font_list, _font_model, and data.
Referenced by PdfImportDialog().
|
private |
Renders the given page's thumbnail using Cairo.
Definition at line 486 of file pdf-input.cpp.
References _cairo_surfaces, _channels, _current_page, _next_page, _pdf_doc, _poppler_doc, _prev_page, _preview_area, _preview_height, _preview_page, _preview_rendering_in_progress, _preview_width, _previewed_page, _render_thumb, _thumb_data, _thumb_height, _thumb_rowstride, _thumb_width, _total_pages, cairo_set_source_rgba(), Inkscape::Async::Channel::create(), Inkscape::Async::fire_and_forget(), height, page, and width.
Referenced by _onPageNumberChanged(), and PdfImportDialog().
FontStrategies Inkscape::Extension::Internal::PdfImportDialog::getFontStrategies | ( | ) |
Saves each decided font strategy to the Svg Builder object.
Definition at line 356 of file pdf-input.cpp.
References _font_col, _font_model, and child.
PdfImportType Inkscape::Extension::Internal::PdfImportDialog::getImportMethod | ( | ) |
Definition at line 300 of file pdf-input.cpp.
References _builder.
std::string Inkscape::Extension::Internal::PdfImportDialog::getSelectedPages | ( | ) |
Definition at line 292 of file pdf-input.cpp.
References _current_pages, and _page_numbers.
void Inkscape::Extension::Internal::PdfImportDialog::setFontStrategies | ( | const FontStrategies & | fs | ) |
Update the font strats.
Definition at line 369 of file pdf-input.cpp.
References _font_col, _font_model, AS_SHAPES, AS_SUB, AS_TEXT, child, and DELETE_TEXT.
Referenced by PdfImportDialog().
bool Inkscape::Extension::Internal::PdfImportDialog::showDialog | ( | ) |
Definition at line 283 of file pdf-input.cpp.
References Inkscape::UI::dialog_run().
|
private |
Definition at line 124 of file pdf-input.h.
Referenced by getImportMethod(), and PdfImportDialog().
|
private |
Definition at line 152 of file pdf-input.h.
Referenced by _drawFunc(), and _setPreviewPage().
|
private |
Definition at line 153 of file pdf-input.h.
Referenced by _setPreviewPage().
|
private |
Definition at line 128 of file pdf-input.h.
Referenced by PdfImportDialog().
|
private |
Definition at line 135 of file pdf-input.h.
Referenced by _setPreviewPage().
|
private |
Definition at line 140 of file pdf-input.h.
Referenced by _onPageNumberChanged(), getSelectedPages(), and PdfImportDialog().
|
private |
Definition at line 129 of file pdf-input.h.
Referenced by PdfImportDialog().
|
private |
Definition at line 137 of file pdf-input.h.
Referenced by _setFonts(), getFontStrategies(), and setFontStrategies().
|
private |
Definition at line 141 of file pdf-input.h.
Referenced by _setFonts(), and PdfImportDialog().
|
private |
Definition at line 136 of file pdf-input.h.
Referenced by _setFonts(), getFontStrategies(), PdfImportDialog(), and setFontStrategies().
|
private |
Definition at line 130 of file pdf-input.h.
Referenced by PdfImportDialog().
|
private |
Definition at line 132 of file pdf-input.h.
Referenced by PdfImportDialog().
|
private |
Definition at line 131 of file pdf-input.h.
Referenced by PdfImportDialog().
|
private |
Definition at line 122 of file pdf-input.h.
Referenced by PdfImportDialog().
|
private |
Definition at line 133 of file pdf-input.h.
Referenced by _setPreviewPage(), and PdfImportDialog().
|
private |
Definition at line 126 of file pdf-input.h.
Referenced by _onPageNumberChanged(), getSelectedPages(), and PdfImportDialog().
|
private |
Definition at line 139 of file pdf-input.h.
Referenced by _setPreviewPage(), and PdfImportDialog().
|
private |
Definition at line 154 of file pdf-input.h.
Referenced by _setPreviewPage(), PdfImportDialog(), and ~PdfImportDialog().
|
private |
Definition at line 134 of file pdf-input.h.
Referenced by _setPreviewPage(), and PdfImportDialog().
|
private |
Definition at line 127 of file pdf-input.h.
Referenced by _setPreviewPage(), and PdfImportDialog().
|
private |
Definition at line 148 of file pdf-input.h.
Referenced by _setPreviewPage(), and PdfImportDialog().
|
private |
Definition at line 143 of file pdf-input.h.
Referenced by _drawFunc(), _setPreviewPage(), and PdfImportDialog().
|
private |
Definition at line 151 of file pdf-input.h.
Referenced by _setPreviewPage().
|
private |
Definition at line 148 of file pdf-input.h.
Referenced by _setPreviewPage(), and PdfImportDialog().
|
private |
Definition at line 144 of file pdf-input.h.
Referenced by _setPreviewPage().
|
private |
Definition at line 149 of file pdf-input.h.
Referenced by _drawFunc(), _setPreviewPage(), and PdfImportDialog().
|
private |
Definition at line 145 of file pdf-input.h.
Referenced by _drawFunc(), _setPreviewPage(), PdfImportDialog(), and ~PdfImportDialog().
|
private |
Definition at line 146 of file pdf-input.h.
Referenced by _drawFunc(), and _setPreviewPage().
|
private |
Definition at line 147 of file pdf-input.h.
Referenced by _drawFunc(), and _setPreviewPage().
|
private |
Definition at line 146 of file pdf-input.h.
Referenced by _drawFunc(), and _setPreviewPage().
|
private |
Definition at line 142 of file pdf-input.h.
Referenced by _onPageNumberChanged(), _setPreviewPage(), and PdfImportDialog().