Index: pdf/pdfium/pdfium_engine.cc |
diff --git a/pdf/pdfium/pdfium_engine.cc b/pdf/pdfium/pdfium_engine.cc |
index 5ee7e623ac43e20b3098cb3097ff2bec45443f99..38cd58d34032f929780695141518597461e9ef5b 100644 |
--- a/pdf/pdfium/pdfium_engine.cc |
+++ b/pdf/pdfium/pdfium_engine.cc |
@@ -2270,6 +2270,10 @@ pp::Rect PDFiumEngine::GetPageRect(int index) { |
return rc; |
} |
+pp::Rect PDFiumEngine::GetPageBoundsRect(int index) { |
+ return pages_[index]->rect(); |
+} |
+ |
pp::Rect PDFiumEngine::GetPageContentsRect(int index) { |
return GetScreenRect(pages_[index]->rect()); |
} |
@@ -2303,6 +2307,31 @@ std::string PDFiumEngine::GetPageAsJSON(int index) { |
return page_json; |
} |
+int PDFiumEngine::GetCharCount(int page_index) { |
+ CHECK(page_index >= 0 && page_index < static_cast<int>(pages_.size())); |
raymes
2016/05/30 04:17:37
nit: DCHECK?
dmazzoni
2016/05/31 21:45:01
Done.
|
+ return pages_[page_index]->GetCharCount(); |
+} |
+ |
+double PDFiumEngine::GetCharWidth(int page_index, int char_index) { |
+ CHECK(page_index >= 0 && page_index < static_cast<int>(pages_.size())); |
+ return pages_[page_index]->GetCharWidth(char_index); |
+} |
+ |
+uint32_t PDFiumEngine::GetCharUnicode(int page_index, int char_index) { |
+ CHECK(page_index >= 0 && page_index < static_cast<int>(pages_.size())); |
+ return pages_[page_index]->GetCharUnicode(char_index); |
+} |
+ |
+void PDFiumEngine::GetTextRunInfo(int page_index, |
+ int start_char_index, |
+ uint32_t* out_len, |
+ double* out_font_size, |
+ pp::FloatRect* out_bounds) { |
+ CHECK(page_index >= 0 && page_index < static_cast<int>(pages_.size())); |
+ return pages_[page_index]->GetTextRunInfo( |
+ start_char_index, out_len, out_font_size, out_bounds); |
+} |
+ |
bool PDFiumEngine::GetPrintScaling() { |
return !!FPDF_VIEWERREF_GetPrintScaling(doc_); |
} |