| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/pdf.h" | 5 #include "pdf/pdf.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #if defined(OS_WIN) | 9 #if defined(OS_WIN) |
| 10 #include <windows.h> | 10 #include <windows.h> |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 | 115 |
| 116 void SetPDFEnsureTypefaceCharactersAccessible( | 116 void SetPDFEnsureTypefaceCharactersAccessible( |
| 117 PDFEnsureTypefaceCharactersAccessible func) { | 117 PDFEnsureTypefaceCharactersAccessible func) { |
| 118 PDFEngineExports::Get()->SetPDFEnsureTypefaceCharactersAccessible(func); | 118 PDFEngineExports::Get()->SetPDFEnsureTypefaceCharactersAccessible(func); |
| 119 } | 119 } |
| 120 | 120 |
| 121 void SetPDFUseGDIPrinting(bool enable) { | 121 void SetPDFUseGDIPrinting(bool enable) { |
| 122 PDFEngineExports::Get()->SetPDFUseGDIPrinting(enable); | 122 PDFEngineExports::Get()->SetPDFUseGDIPrinting(enable); |
| 123 } | 123 } |
| 124 | 124 |
| 125 void SetPDFPostscriptPrintingLevel(int postscript_level) { | 125 void SetPDFUsePrintMode(int mode) { |
| 126 PDFEngineExports::Get()->SetPDFPostscriptPrintingLevel(postscript_level); | 126 PDFEngineExports::Get()->SetPDFUsePrintMode(mode); |
| 127 } | 127 } |
| 128 #endif // defined(OS_WIN) | 128 #endif // defined(OS_WIN) |
| 129 | 129 |
| 130 bool GetPDFDocInfo(const void* pdf_buffer, | 130 bool GetPDFDocInfo(const void* pdf_buffer, |
| 131 int buffer_size, | 131 int buffer_size, |
| 132 int* page_count, | 132 int* page_count, |
| 133 double* max_page_width) { | 133 double* max_page_width) { |
| 134 if (!g_sdk_initialized_via_pepper) { | 134 if (!g_sdk_initialized_via_pepper) { |
| 135 if (!InitializeSDK()) | 135 if (!InitializeSDK()) |
| 136 return false; | 136 return false; |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 autorotate); | 180 autorotate); |
| 181 bool ret = engine_exports->RenderPDFPageToBitmap( | 181 bool ret = engine_exports->RenderPDFPageToBitmap( |
| 182 pdf_buffer, pdf_buffer_size, page_number, settings, bitmap_buffer); | 182 pdf_buffer, pdf_buffer_size, page_number, settings, bitmap_buffer); |
| 183 if (!g_sdk_initialized_via_pepper) | 183 if (!g_sdk_initialized_via_pepper) |
| 184 ShutdownSDK(); | 184 ShutdownSDK(); |
| 185 | 185 |
| 186 return ret; | 186 return ret; |
| 187 } | 187 } |
| 188 | 188 |
| 189 } // namespace chrome_pdf | 189 } // namespace chrome_pdf |
| OLD | NEW |