OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium 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 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 // NOTE: External docs refer to this file as "fpdfview.h", so do not rename | 7 // NOTE: External docs refer to this file as "fpdfview.h", so do not rename |
8 // despite lack of consistency with other public files. | 8 // despite lack of consistency with other public files. |
9 | 9 |
10 #ifndef PUBLIC_FPDFVIEW_H_ | 10 #ifndef PUBLIC_FPDFVIEW_H_ |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 // Set the policy for the sandbox environment. | 206 // Set the policy for the sandbox environment. |
207 // Parameters: | 207 // Parameters: |
208 // policy - The specified policy for setting, for example: | 208 // policy - The specified policy for setting, for example: |
209 // FPDF_POLICY_MACHINETIME_ACCESS. | 209 // FPDF_POLICY_MACHINETIME_ACCESS. |
210 // enable - True to enable, false to disable the policy. | 210 // enable - True to enable, false to disable the policy. |
211 // Return value: | 211 // Return value: |
212 // None. | 212 // None. |
213 DLLEXPORT void STDCALL FPDF_SetSandBoxPolicy(FPDF_DWORD policy, | 213 DLLEXPORT void STDCALL FPDF_SetSandBoxPolicy(FPDF_DWORD policy, |
214 FPDF_BOOL enable); | 214 FPDF_BOOL enable); |
215 | 215 |
216 #if defined(_WIN32) && defined(PDFIUM_PRINT_TEXT_WITH_GDI) | 216 #if defined(_WIN32) |
| 217 #if defined(PDFIUM_PRINT_TEXT_WITH_GDI) |
217 // Pointer to a helper function to make |font| with |text| of |text_length| | 218 // Pointer to a helper function to make |font| with |text| of |text_length| |
218 // accessible when printing text with GDI. This is useful in sandboxed | 219 // accessible when printing text with GDI. This is useful in sandboxed |
219 // environments where PDFium's access to GDI may be restricted. | 220 // environments where PDFium's access to GDI may be restricted. |
220 typedef void (*PDFiumEnsureTypefaceCharactersAccessible)(const LOGFONT* font, | 221 typedef void (*PDFiumEnsureTypefaceCharactersAccessible)(const LOGFONT* font, |
221 const wchar_t* text, | 222 const wchar_t* text, |
222 size_t text_length); | 223 size_t text_length); |
223 | 224 |
224 // Function: FPDF_SetTypefaceAccessibleFunc | 225 // Function: FPDF_SetTypefaceAccessibleFunc |
225 // Set the function pointer that makes GDI fonts available in sandboxed | 226 // Set the function pointer that makes GDI fonts available in sandboxed |
226 // environments. Experimental API. | 227 // environments. Experimental API. |
227 // Parameters: | 228 // Parameters: |
228 // func - A function pointer. See description above. | 229 // func - A function pointer. See description above. |
229 // Return value: | 230 // Return value: |
230 // None. | 231 // None. |
231 DLLEXPORT void STDCALL | 232 DLLEXPORT void STDCALL |
232 FPDF_SetTypefaceAccessibleFunc(PDFiumEnsureTypefaceCharactersAccessible func); | 233 FPDF_SetTypefaceAccessibleFunc(PDFiumEnsureTypefaceCharactersAccessible func); |
233 | 234 |
234 // Function: FPDF_SetPrintTextWithGDI | 235 // Function: FPDF_SetPrintTextWithGDI |
235 // Set whether to use GDI to draw fonts when printing on Windows. | 236 // Set whether to use GDI to draw fonts when printing on Windows. |
236 // Experimental API. | 237 // Experimental API. |
237 // Parameters: | 238 // Parameters: |
238 // use_gdi - Set to true to enable printing text with GDI. | 239 // use_gdi - Set to true to enable printing text with GDI. |
239 // Return value: | 240 // Return value: |
240 // None. | 241 // None. |
241 DLLEXPORT void STDCALL FPDF_SetPrintTextWithGDI(FPDF_BOOL use_gdi); | 242 DLLEXPORT void STDCALL FPDF_SetPrintTextWithGDI(FPDF_BOOL use_gdi); |
242 #endif | 243 #endif // PDFIUM_PRINT_TEXT_WITH_GDI |
| 244 |
| 245 // Function: FPDF_SetPrintPostscriptLevel |
| 246 // Set postscript printing level when printing on Windows. |
| 247 // Experimental API. |
| 248 // Parameters: |
| 249 // postscript_level - 0 to disable postscript printing, |
| 250 // 2 to print with postscript level 2, |
| 251 // 3 to print with postscript level 3. |
| 252 // All other values are invalid. |
| 253 // Return value: |
| 254 // True if successful, false if unsucessful (typically invalid input). |
| 255 DLLEXPORT FPDF_BOOL STDCALL FPDF_SetPrintPostscriptLevel(FPDF_BOOL use_gdi); |
| 256 #endif // defined(_WIN32) |
243 | 257 |
244 // Function: FPDF_LoadDocument | 258 // Function: FPDF_LoadDocument |
245 // Open and load a PDF document. | 259 // Open and load a PDF document. |
246 // Parameters: | 260 // Parameters: |
247 // file_path - Path to the PDF file (including extension). | 261 // file_path - Path to the PDF file (including extension). |
248 // password - A string used as the password for the PDF file. | 262 // password - A string used as the password for the PDF file. |
249 // If no password is needed, empty or NULL can be used. | 263 // If no password is needed, empty or NULL can be used. |
250 // Return value: | 264 // Return value: |
251 // A handle to the loaded document, or NULL on failure. | 265 // A handle to the loaded document, or NULL on failure. |
252 // Comments: | 266 // Comments: |
(...skipping 762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1015 // Function: FPDF_BStr_Clear | 1029 // Function: FPDF_BStr_Clear |
1016 // Helper function to clear a byte string. | 1030 // Helper function to clear a byte string. |
1017 DLLEXPORT FPDF_RESULT STDCALL FPDF_BStr_Clear(FPDF_BSTR* str); | 1031 DLLEXPORT FPDF_RESULT STDCALL FPDF_BStr_Clear(FPDF_BSTR* str); |
1018 #endif // PDF_ENABLE_XFA | 1032 #endif // PDF_ENABLE_XFA |
1019 | 1033 |
1020 #ifdef __cplusplus | 1034 #ifdef __cplusplus |
1021 } | 1035 } |
1022 #endif | 1036 #endif |
1023 | 1037 |
1024 #endif // PUBLIC_FPDFVIEW_H_ | 1038 #endif // PUBLIC_FPDFVIEW_H_ |
OLD | NEW |