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 | 8 |
9 #include "base/json/json_writer.h" | 9 #include "base/json/json_writer.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 #include "ppapi/cpp/dev/memory_dev.h" | 27 #include "ppapi/cpp/dev/memory_dev.h" |
28 #include "ppapi/cpp/input_event.h" | 28 #include "ppapi/cpp/input_event.h" |
29 #include "ppapi/cpp/instance.h" | 29 #include "ppapi/cpp/instance.h" |
30 #include "ppapi/cpp/module.h" | 30 #include "ppapi/cpp/module.h" |
31 #include "ppapi/cpp/private/pdf.h" | 31 #include "ppapi/cpp/private/pdf.h" |
32 #include "ppapi/cpp/trusted/browser_font_trusted.h" | 32 #include "ppapi/cpp/trusted/browser_font_trusted.h" |
33 #include "ppapi/cpp/url_response_info.h" | 33 #include "ppapi/cpp/url_response_info.h" |
34 #include "ppapi/cpp/var.h" | 34 #include "ppapi/cpp/var.h" |
35 #include "ppapi/cpp/var_dictionary.h" | 35 #include "ppapi/cpp/var_dictionary.h" |
36 #include "printing/units.h" | 36 #include "printing/units.h" |
37 #include "third_party/pdfium/fpdfsdk/include/fpdf_ext.h" | |
38 #include "third_party/pdfium/fpdfsdk/include/fpdf_flatten.h" | |
39 #include "third_party/pdfium/fpdfsdk/include/fpdf_searchex.h" | |
40 #include "third_party/pdfium/fpdfsdk/include/fpdf_sysfontinfo.h" | |
41 #include "third_party/pdfium/fpdfsdk/include/fpdf_transformpage.h" | |
42 #include "third_party/pdfium/fpdfsdk/include/fpdfedit.h" | |
43 #include "third_party/pdfium/fpdfsdk/include/fpdfppo.h" | |
44 #include "third_party/pdfium/fpdfsdk/include/fpdfsave.h" | |
45 #include "third_party/pdfium/fpdfsdk/include/pdfwindow/PDFWindow.h" | 37 #include "third_party/pdfium/fpdfsdk/include/pdfwindow/PDFWindow.h" |
46 #include "third_party/pdfium/fpdfsdk/include/pdfwindow/PWL_FontMap.h" | 38 #include "third_party/pdfium/fpdfsdk/include/pdfwindow/PWL_FontMap.h" |
| 39 #include "third_party/pdfium/public/fpdf_edit.h" |
| 40 #include "third_party/pdfium/public/fpdf_ext.h" |
| 41 #include "third_party/pdfium/public/fpdf_flatten.h" |
| 42 #include "third_party/pdfium/public/fpdf_ppo.h" |
| 43 #include "third_party/pdfium/public/fpdf_save.h" |
| 44 #include "third_party/pdfium/public/fpdf_searchex.h" |
| 45 #include "third_party/pdfium/public/fpdf_sysfontinfo.h" |
| 46 #include "third_party/pdfium/public/fpdf_transformpage.h" |
47 #include "ui/events/keycodes/keyboard_codes.h" | 47 #include "ui/events/keycodes/keyboard_codes.h" |
48 | 48 |
49 using printing::ConvertUnit; | 49 using printing::ConvertUnit; |
50 using printing::ConvertUnitDouble; | 50 using printing::ConvertUnitDouble; |
51 using printing::kPointsPerInch; | 51 using printing::kPointsPerInch; |
52 using printing::kPixelsPerInch; | 52 using printing::kPixelsPerInch; |
53 | 53 |
54 namespace chrome_pdf { | 54 namespace chrome_pdf { |
55 | 55 |
56 namespace { | 56 namespace { |
(...skipping 3959 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4016 double* height) { | 4016 double* height) { |
4017 FPDF_DOCUMENT doc = FPDF_LoadMemDocument(pdf_buffer, pdf_buffer_size, NULL); | 4017 FPDF_DOCUMENT doc = FPDF_LoadMemDocument(pdf_buffer, pdf_buffer_size, NULL); |
4018 if (!doc) | 4018 if (!doc) |
4019 return false; | 4019 return false; |
4020 bool success = FPDF_GetPageSizeByIndex(doc, page_number, width, height) != 0; | 4020 bool success = FPDF_GetPageSizeByIndex(doc, page_number, width, height) != 0; |
4021 FPDF_CloseDocument(doc); | 4021 FPDF_CloseDocument(doc); |
4022 return success; | 4022 return success; |
4023 } | 4023 } |
4024 | 4024 |
4025 } // namespace chrome_pdf | 4025 } // namespace chrome_pdf |
OLD | NEW |