OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "pdf/pdfium/pdfium_engine.h" | 5 #include "pdf/pdfium/pdfium_engine.h" |
6 | 6 |
7 #include <math.h> | 7 #include <math.h> |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
11 #include <memory> | 11 #include <memory> |
12 #include <set> | 12 #include <set> |
13 | 13 |
14 #include "base/i18n/icu_encoding_detection.h" | 14 #include "base/i18n/encoding_detection.h" |
15 #include "base/i18n/icu_string_conversions.h" | 15 #include "base/i18n/icu_string_conversions.h" |
16 #include "base/lazy_instance.h" | 16 #include "base/lazy_instance.h" |
17 #include "base/logging.h" | 17 #include "base/logging.h" |
18 #include "base/macros.h" | 18 #include "base/macros.h" |
19 #include "base/numerics/safe_conversions.h" | 19 #include "base/numerics/safe_conversions.h" |
20 #include "base/stl_util.h" | 20 #include "base/stl_util.h" |
21 #include "base/strings/string_number_conversions.h" | 21 #include "base/strings/string_number_conversions.h" |
22 #include "base/strings/string_piece.h" | 22 #include "base/strings/string_piece.h" |
23 #include "base/strings/string_util.h" | 23 #include "base/strings/string_util.h" |
24 #include "base/strings/utf_string_conversions.h" | 24 #include "base/strings/utf_string_conversions.h" |
(...skipping 3883 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3908 FPDF_DOCUMENT doc = | 3908 FPDF_DOCUMENT doc = |
3909 FPDF_LoadMemDocument(pdf_buffer, pdf_buffer_size, nullptr); | 3909 FPDF_LoadMemDocument(pdf_buffer, pdf_buffer_size, nullptr); |
3910 if (!doc) | 3910 if (!doc) |
3911 return false; | 3911 return false; |
3912 bool success = FPDF_GetPageSizeByIndex(doc, page_number, width, height) != 0; | 3912 bool success = FPDF_GetPageSizeByIndex(doc, page_number, width, height) != 0; |
3913 FPDF_CloseDocument(doc); | 3913 FPDF_CloseDocument(doc); |
3914 return success; | 3914 return success; |
3915 } | 3915 } |
3916 | 3916 |
3917 } // namespace chrome_pdf | 3917 } // namespace chrome_pdf |
OLD | NEW |