Chromium Code Reviews| 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; |
|
Dan Beam
2014/07/09 02:08:32
if (!doc)
return false;
bool success = FPDF_Get
|
| + success = FPDF_GetPageSizeByIndex(doc, index, width, height) != 0; |
| + FPDF_CloseDocument(doc); |
| + return success; |
| +} |
| + |
| } // namespace chrome_pdf |