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

Unified Diff: pdf/pdfium/pdfium_engine.cc

Issue 335583004: Added a test that currently is able to print to pdf. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Made observer_ in UIDoneLoadingMessageHandler point to a constant address. Created 6 years, 5 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
« no previous file with comments | « pdf/pdfium/pdfium_engine.h ('k') | printing/units.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pdf/pdfium/pdfium_engine.cc
diff --git a/pdf/pdfium/pdfium_engine.cc b/pdf/pdfium/pdfium_engine.cc
index 45651319d29051a840585cdc2076b9e225458e68..a72c410240f266c5fe06981efac188ea0149bf32 100644
--- a/pdf/pdfium/pdfium_engine.cc
+++ b/pdf/pdfium/pdfium_engine.cc
@@ -3384,4 +3384,19 @@ bool PDFiumEngineExports::GetPDFDocInfo(const void* pdf_buffer,
return true;
}
+bool PDFiumEngineExports::GetPDFPageSizeByIndex(
+ const void* pdf_buffer,
+ int buffer_size,
+ int index,
+ double* width,
+ double* height) {
+ FPDF_DOCUMENT doc = FPDF_LoadMemDocument(pdf_buffer, buffer_size, NULL);
+ bool success = false;
+ if (!doc)
+ return success;
+ success = FPDF_GetPageSizeByIndex(doc, index, width, height) != 0;
+ FPDF_CloseDocument(doc);
+ return success;
+}
+
} // namespace chrome_pdf
« no previous file with comments | « pdf/pdfium/pdfium_engine.h ('k') | printing/units.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698