diff --git a/po/de.po b/po/de.po index f8a4c1f4..41376fc9 100644 --- a/po/de.po +++ b/po/de.po @@ -251,9 +251,9 @@ msgstr "" #: ..//ui/settings.glade.h:65 msgid "" -"Put a rouler on your screen to callibrate the zoom level to fit your " -"screen\n" -"The units are cm for the rouler, dpi for the slider" +"Put a ruler on your screen to calibrate the zoom level to fit your " +"screen. Takes effect after restarting xournalpp.\n" +"The units are cm for the ruler, dpi for the slider." msgstr "" "Legen Sie einen Massstab auf den Bildschirm um die\n" "Bildschirm DPI zu kallibrieren" diff --git a/po/xournalpp.pot b/po/xournalpp.pot index 362dba9b..2e30ba21 100644 --- a/po/xournalpp.pot +++ b/po/xournalpp.pot @@ -208,9 +208,9 @@ msgstr "" #: ..//ui/settings.glade.h:65 msgid "" -"Put a rouler on your screen to callibrate the zoom level to fit your " -"screen\n" -"The units are cm for the rouler, dpi for the slider" +"Put a ruler on your screen to calibrate the zoom level to fit your " +"screen. Takes effect after restarting xournalpp.\n" +"The units are cm for the ruler, dpi for the slider." msgstr "" #: ..//ui/settings.glade.h:67 diff --git a/src/pdf/popplerdirect/poppler/XojPopplerPage.cpp b/src/pdf/popplerdirect/poppler/XojPopplerPage.cpp index ea4a9cc9..69e86274 100644 --- a/src/pdf/popplerdirect/poppler/XojPopplerPage.cpp +++ b/src/pdf/popplerdirect/poppler/XojPopplerPage.cpp @@ -4,6 +4,7 @@ #include #include #include "../workaround/workaround.h" +#include "../../../control/settings/Settings.h" XojPopplerPage::XojPopplerPage(PDFDoc* doc, GMutex* docMutex, CairoOutputDev* outputDev, Page* page, int index) @@ -19,6 +20,17 @@ XojPopplerPage::XojPopplerPage(PDFDoc* doc, GMutex* docMutex, this->renderMutex = g_mutex_new(); this->docMutex = docMutex; + + /* + //Set up DPI + String settingsname = String::format("%s%c%s%c%s", g_get_home_dir(), G_DIR_SEPARATOR, + CONFIG_DIR, G_DIR_SEPARATOR, + SETTINGS_XML_FILE); + Settings* mysettings = new Settings(settingsname); + mysettings->load(); + this->pdfDpi = (double) mysettings->getDisplayDpi(); + */ + } XojPopplerPage::~XojPopplerPage() @@ -103,6 +115,7 @@ void XojPopplerPage::render(cairo_t* cr, bool forPrinting) g_mutex_lock(this->docMutex); this->page->displaySlice(this->outputDev, 72.0, 72.0, 0, + //this->page->displaySlice(this->outputDev, this->pdfDpi, this->pdfDpi, 0, false, /* useMediaBox */ true, /* Crop */ -1, -1, -1, -1, forPrinting, this->doc->getCatalog(), NULL, NULL, @@ -128,6 +141,7 @@ void XojPopplerPage::initTextPage() g_mutex_lock(this->docMutex); TextOutputDev* textDev = new TextOutputDev(NULL, true, false, false); Gfx* gfx = this->page->createGfx(textDev, 72.0, 72.0, 0, + //Gfx* gfx = this->page->createGfx(textDev, this->pdfDpi, this->pdfDpi, 0, false, /* useMediaBox */ true, /* Crop */ -1, -1, -1, -1, false, /* printing */ diff --git a/ui/settings.glade b/ui/settings.glade index c41efdf2..ed9c996c 100644 --- a/ui/settings.glade +++ b/ui/settings.glade @@ -921,8 +921,8 @@ Xournal file with the same name it will open it</i> True False - <i>Put a ruler on your screen to calibrate the zoom level to fit your screen. -The units are cm for the rouler, dpi for the slider</i> + <i>Put a ruler on your screen to calibrate the zoom level to fit your screen. Takes effect after restarting xournalpp. +The units are cm for the ruler, dpi for the slider.</i> True center True