Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(393)

Unified Diff: pdf/pdfium/pdfium_engine.cc

Issue 2114583002: Windows: Make it possible to print text with GDI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pdf/pdfium/pdfium_engine.cc
diff --git a/pdf/pdfium/pdfium_engine.cc b/pdf/pdfium/pdfium_engine.cc
index 7688a7dacda3fcdc30bdf5e68a4f5ee8bc2a1bf3..9b66ae212442881f6d8c040f230bc7148c07ecb9 100644
--- a/pdf/pdfium/pdfium_engine.cc
+++ b/pdf/pdfium/pdfium_engine.cc
@@ -63,6 +63,11 @@ using printing::ConvertUnitDouble;
using printing::kPointsPerInch;
using printing::kPixelsPerInch;
+#if defined(OS_WIN)
+extern PDFEnsureTypefaceCharactersAccessible g_pdfium_typeface_accessible_func;
+extern bool g_pdfium_print_text_with_gdi;
+#endif
+
namespace chrome_pdf {
namespace {
@@ -3838,6 +3843,15 @@ bool PDFiumEngineExports::RenderPDFPageToDC(const void* pdf_buffer,
FPDF_CloseDocument(doc);
return true;
}
+
+void PDFiumEngineExports::SetPDFEnsureTypefaceCharactersAccessible(
+ PDFEnsureTypefaceCharactersAccessible func) {
+ g_pdfium_typeface_accessible_func = func;
+}
+
+void PDFiumEngineExports::SetPDFUseGDIPrinting(bool enable) {
+ g_pdfium_print_text_with_gdi = enable;
+}
#endif // defined(OS_WIN)
bool PDFiumEngineExports::RenderPDFPageToBitmap(

Powered by Google App Engine
This is Rietveld 408576698