Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
Inkscape::Extension::Internal::PdfImportDialog Class Reference

PDF import using libpoppler. More...

#include <pdf-input.h>

Inheritance diagram for Inkscape::Extension::Internal::PdfImportDialog:

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
 

Detailed Description

PDF import using libpoppler.

Definition at line 102 of file pdf-input.h.

Constructor & Destructor Documentation

◆ PdfImportDialog()

◆ ~PdfImportDialog()

Inkscape::Extension::Internal::PdfImportDialog::~PdfImportDialog ( )
override

Definition at line 272 of file pdf-input.cpp.

References _poppler_doc, and _thumb_data.

Member Function Documentation

◆ _drawFunc()

void Inkscape::Extension::Internal::PdfImportDialog::_drawFunc ( const Cairo::RefPtr< Cairo::Context > &  cr,
int  width,
int  height 
)
private

◆ _onPageNumberChanged()

void Inkscape::Extension::Internal::PdfImportDialog::_onPageNumberChanged ( )
private

◆ _setFonts()

void Inkscape::Extension::Internal::PdfImportDialog::_setFonts ( const FontList fonts)
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().

◆ _setPreviewPage()

◆ getFontStrategies()

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.

◆ getImportMethod()

PdfImportType Inkscape::Extension::Internal::PdfImportDialog::getImportMethod ( )

Definition at line 300 of file pdf-input.cpp.

References _builder.

◆ getSelectedPages()

std::string Inkscape::Extension::Internal::PdfImportDialog::getSelectedPages ( )

Definition at line 292 of file pdf-input.cpp.

References _current_pages, and _page_numbers.

◆ setFontStrategies()

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().

◆ showDialog()

bool Inkscape::Extension::Internal::PdfImportDialog::showDialog ( )

Definition at line 283 of file pdf-input.cpp.

References Inkscape::UI::dialog_run().

Member Data Documentation

◆ _builder

Glib::RefPtr<Gtk::Builder> Inkscape::Extension::Internal::PdfImportDialog::_builder
private

Definition at line 124 of file pdf-input.h.

Referenced by getImportMethod(), and PdfImportDialog().

◆ _cairo_surfaces

std::unordered_map<int, std::shared_ptr<cairo_surface_t> > Inkscape::Extension::Internal::PdfImportDialog::_cairo_surfaces
private

Definition at line 152 of file pdf-input.h.

Referenced by _drawFunc(), and _setPreviewPage().

◆ _channels

std::vector<Async::Channel::Dest> Inkscape::Extension::Internal::PdfImportDialog::_channels
private

Definition at line 153 of file pdf-input.h.

Referenced by _setPreviewPage().

◆ _clip_to

Gtk::ComboBox& Inkscape::Extension::Internal::PdfImportDialog::_clip_to
private

Definition at line 128 of file pdf-input.h.

Referenced by PdfImportDialog().

◆ _current_page

Gtk::Label& Inkscape::Extension::Internal::PdfImportDialog::_current_page
private

Definition at line 135 of file pdf-input.h.

Referenced by _setPreviewPage().

◆ _current_pages

std::string Inkscape::Extension::Internal::PdfImportDialog::_current_pages
private

Definition at line 140 of file pdf-input.h.

Referenced by _onPageNumberChanged(), getSelectedPages(), and PdfImportDialog().

◆ _embed_images

Gtk::CheckButton& Inkscape::Extension::Internal::PdfImportDialog::_embed_images
private

Definition at line 129 of file pdf-input.h.

Referenced by PdfImportDialog().

◆ _font_col

FontModelColumns* Inkscape::Extension::Internal::PdfImportDialog::_font_col
private

Definition at line 137 of file pdf-input.h.

Referenced by _setFonts(), getFontStrategies(), and setFontStrategies().

◆ _font_list

FontList Inkscape::Extension::Internal::PdfImportDialog::_font_list
private

Definition at line 141 of file pdf-input.h.

Referenced by _setFonts(), and PdfImportDialog().

◆ _font_model

Glib::RefPtr<Gtk::ListStore> Inkscape::Extension::Internal::PdfImportDialog::_font_model
private

Definition at line 136 of file pdf-input.h.

Referenced by _setFonts(), getFontStrategies(), PdfImportDialog(), and setFontStrategies().

◆ _import_pages

Gtk::CheckButton& Inkscape::Extension::Internal::PdfImportDialog::_import_pages
private

Definition at line 130 of file pdf-input.h.

Referenced by PdfImportDialog().

◆ _mesh_label

Gtk::Label& Inkscape::Extension::Internal::PdfImportDialog::_mesh_label
private

Definition at line 132 of file pdf-input.h.

Referenced by PdfImportDialog().

◆ _mesh_slider

Gtk::Scale& Inkscape::Extension::Internal::PdfImportDialog::_mesh_slider
private

Definition at line 131 of file pdf-input.h.

Referenced by PdfImportDialog().

◆ _mod

Input* Inkscape::Extension::Internal::PdfImportDialog::_mod
private

Definition at line 122 of file pdf-input.h.

Referenced by PdfImportDialog().

◆ _next_page

Gtk::Button& Inkscape::Extension::Internal::PdfImportDialog::_next_page
private

Definition at line 133 of file pdf-input.h.

Referenced by _setPreviewPage(), and PdfImportDialog().

◆ _page_numbers

Gtk::Entry& Inkscape::Extension::Internal::PdfImportDialog::_page_numbers
private

Definition at line 126 of file pdf-input.h.

Referenced by _onPageNumberChanged(), getSelectedPages(), and PdfImportDialog().

◆ _pdf_doc

std::shared_ptr<PDFDoc> Inkscape::Extension::Internal::PdfImportDialog::_pdf_doc
private

Definition at line 139 of file pdf-input.h.

Referenced by _setPreviewPage(), and PdfImportDialog().

◆ _poppler_doc

PopplerDocument* Inkscape::Extension::Internal::PdfImportDialog::_poppler_doc = nullptr
private

Definition at line 154 of file pdf-input.h.

Referenced by _setPreviewPage(), PdfImportDialog(), and ~PdfImportDialog().

◆ _prev_page

Gtk::Button& Inkscape::Extension::Internal::PdfImportDialog::_prev_page
private

Definition at line 134 of file pdf-input.h.

Referenced by _setPreviewPage(), and PdfImportDialog().

◆ _preview_area

Gtk::DrawingArea& Inkscape::Extension::Internal::PdfImportDialog::_preview_area
private

Definition at line 127 of file pdf-input.h.

Referenced by _setPreviewPage(), and PdfImportDialog().

◆ _preview_height

int Inkscape::Extension::Internal::PdfImportDialog::_preview_height
private

Definition at line 148 of file pdf-input.h.

Referenced by _setPreviewPage(), and PdfImportDialog().

◆ _preview_page

int Inkscape::Extension::Internal::PdfImportDialog::_preview_page = 1
private

Definition at line 143 of file pdf-input.h.

Referenced by _drawFunc(), _setPreviewPage(), and PdfImportDialog().

◆ _preview_rendering_in_progress

bool Inkscape::Extension::Internal::PdfImportDialog::_preview_rendering_in_progress = false
private

Definition at line 151 of file pdf-input.h.

Referenced by _setPreviewPage().

◆ _preview_width

int Inkscape::Extension::Internal::PdfImportDialog::_preview_width
private

Definition at line 148 of file pdf-input.h.

Referenced by _setPreviewPage(), and PdfImportDialog().

◆ _previewed_page

Page* Inkscape::Extension::Internal::PdfImportDialog::_previewed_page
private

Definition at line 144 of file pdf-input.h.

Referenced by _setPreviewPage().

◆ _render_thumb

bool Inkscape::Extension::Internal::PdfImportDialog::_render_thumb
private

Definition at line 149 of file pdf-input.h.

Referenced by _drawFunc(), _setPreviewPage(), and PdfImportDialog().

◆ _thumb_data

unsigned char* Inkscape::Extension::Internal::PdfImportDialog::_thumb_data
private

Definition at line 145 of file pdf-input.h.

Referenced by _drawFunc(), _setPreviewPage(), PdfImportDialog(), and ~PdfImportDialog().

◆ _thumb_height

int Inkscape::Extension::Internal::PdfImportDialog::_thumb_height
private

Definition at line 146 of file pdf-input.h.

Referenced by _drawFunc(), and _setPreviewPage().

◆ _thumb_rowstride

int Inkscape::Extension::Internal::PdfImportDialog::_thumb_rowstride
private

Definition at line 147 of file pdf-input.h.

Referenced by _drawFunc(), and _setPreviewPage().

◆ _thumb_width

int Inkscape::Extension::Internal::PdfImportDialog::_thumb_width
private

Definition at line 146 of file pdf-input.h.

Referenced by _drawFunc(), and _setPreviewPage().

◆ _total_pages

int Inkscape::Extension::Internal::PdfImportDialog::_total_pages = 0
private

Definition at line 142 of file pdf-input.h.

Referenced by _onPageNumberChanged(), _setPreviewPage(), and PdfImportDialog().


The documentation for this class was generated from the following files: