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 SetPDFUseTextOnlyPrinting(bool enable) { |
| 126 PDFEngineExports::Get()->SetPDFUseTextOnlyPrinting(enable); |
| 127 } |
| 128 |
125 void SetPDFPostscriptPrintingLevel(int postscript_level) { | 129 void SetPDFPostscriptPrintingLevel(int postscript_level) { |
126 PDFEngineExports::Get()->SetPDFPostscriptPrintingLevel(postscript_level); | 130 PDFEngineExports::Get()->SetPDFPostscriptPrintingLevel(postscript_level); |
127 } | 131 } |
128 #endif // defined(OS_WIN) | 132 #endif // defined(OS_WIN) |
129 | 133 |
130 bool GetPDFDocInfo(const void* pdf_buffer, | 134 bool GetPDFDocInfo(const void* pdf_buffer, |
131 int buffer_size, | 135 int buffer_size, |
132 int* page_count, | 136 int* page_count, |
133 double* max_page_width) { | 137 double* max_page_width) { |
134 if (!g_sdk_initialized_via_pepper) { | 138 if (!g_sdk_initialized_via_pepper) { |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 autorotate); | 184 autorotate); |
181 bool ret = engine_exports->RenderPDFPageToBitmap( | 185 bool ret = engine_exports->RenderPDFPageToBitmap( |
182 pdf_buffer, pdf_buffer_size, page_number, settings, bitmap_buffer); | 186 pdf_buffer, pdf_buffer_size, page_number, settings, bitmap_buffer); |
183 if (!g_sdk_initialized_via_pepper) | 187 if (!g_sdk_initialized_via_pepper) |
184 ShutdownSDK(); | 188 ShutdownSDK(); |
185 | 189 |
186 return ret; | 190 return ret; |
187 } | 191 } |
188 | 192 |
189 } // namespace chrome_pdf | 193 } // namespace chrome_pdf |
OLD | NEW |