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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 } | 116 } |
117 | 117 |
118 void SetPDFEnsureTypefaceCharactersAccessible( | 118 void SetPDFEnsureTypefaceCharactersAccessible( |
119 PDFEnsureTypefaceCharactersAccessible func) { | 119 PDFEnsureTypefaceCharactersAccessible func) { |
120 PDFEngineExports::Get()->SetPDFEnsureTypefaceCharactersAccessible(func); | 120 PDFEngineExports::Get()->SetPDFEnsureTypefaceCharactersAccessible(func); |
121 } | 121 } |
122 | 122 |
123 void SetPDFUseGDIPrinting(bool enable) { | 123 void SetPDFUseGDIPrinting(bool enable) { |
124 PDFEngineExports::Get()->SetPDFUseGDIPrinting(enable); | 124 PDFEngineExports::Get()->SetPDFUseGDIPrinting(enable); |
125 } | 125 } |
| 126 |
| 127 void SetPDFPostscriptPrintingLevel(int postscript_level) { |
| 128 PDFEngineExports::Get()->SetPDFPostscriptPrintingLevel(postscript_level); |
| 129 } |
126 #endif // defined(OS_WIN) | 130 #endif // defined(OS_WIN) |
127 | 131 |
128 bool GetPDFDocInfo(const void* pdf_buffer, | 132 bool GetPDFDocInfo(const void* pdf_buffer, |
129 int buffer_size, | 133 int buffer_size, |
130 int* page_count, | 134 int* page_count, |
131 double* max_page_width) { | 135 double* max_page_width) { |
132 if (!g_sdk_initialized_via_pepper) { | 136 if (!g_sdk_initialized_via_pepper) { |
133 if (!InitializeSDK()) | 137 if (!InitializeSDK()) |
134 return false; | 138 return false; |
135 } | 139 } |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 autorotate); | 182 autorotate); |
179 bool ret = engine_exports->RenderPDFPageToBitmap( | 183 bool ret = engine_exports->RenderPDFPageToBitmap( |
180 pdf_buffer, pdf_buffer_size, page_number, settings, bitmap_buffer); | 184 pdf_buffer, pdf_buffer_size, page_number, settings, bitmap_buffer); |
181 if (!g_sdk_initialized_via_pepper) | 185 if (!g_sdk_initialized_via_pepper) |
182 ShutdownSDK(); | 186 ShutdownSDK(); |
183 | 187 |
184 return ret; | 188 return ret; |
185 } | 189 } |
186 | 190 |
187 } // namespace chrome_pdf | 191 } // namespace chrome_pdf |
OLD | NEW |