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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 // Set the policy for the sandbox environment. | 204 // Set the policy for the sandbox environment. |
205 // Parameters: | 205 // Parameters: |
206 // policy - The specified policy for setting, for example: | 206 // policy - The specified policy for setting, for example: |
207 // FPDF_POLICY_MACHINETIME_ACCESS. | 207 // FPDF_POLICY_MACHINETIME_ACCESS. |
208 // enable - True to enable, false to disable the policy. | 208 // enable - True to enable, false to disable the policy. |
209 // Return value: | 209 // Return value: |
210 // None. | 210 // None. |
211 DLLEXPORT void STDCALL FPDF_SetSandBoxPolicy(FPDF_DWORD policy, | 211 DLLEXPORT void STDCALL FPDF_SetSandBoxPolicy(FPDF_DWORD policy, |
212 FPDF_BOOL enable); | 212 FPDF_BOOL enable); |
213 | 213 |
| 214 #if defined(_WIN32) && defined(PDFIUM_PRINT_TEXT_WITH_GDI) |
| 215 // Pointer to a helper function to make |font| with |text| of |text_length| |
| 216 // accessible when printing text with GDI. This is useful in sandboxed |
| 217 // environments where PDFium's access to GDI may be restricted. |
| 218 typedef void (*PDFiumEnsureTypefaceCharactersAccessible)(const LOGFONT* font, |
| 219 const wchar_t* text, |
| 220 size_t text_length); |
| 221 |
| 222 // Function: FPDF_SetTypefaceAccessibleFunc |
| 223 // Set the function pointer that makes GDI fonts available in sandboxed |
| 224 // environments. Experimental API. |
| 225 // Parameters: |
| 226 // func - A function pointer. See description above. |
| 227 // Return value: |
| 228 // None. |
| 229 DLLEXPORT void STDCALL |
| 230 FPDF_SetTypefaceAccessibleFunc(PDFiumEnsureTypefaceCharactersAccessible func); |
| 231 |
| 232 // Function: FPDF_SetPrintTextWithGDI |
| 233 // Set whether to use GDI to draw fonts when printing on Windows. |
| 234 // Experimental API. |
| 235 // Parameters: |
| 236 // use_gdi - Set to true to enable printing text with GDI. |
| 237 // Return value: |
| 238 // None. |
| 239 DLLEXPORT void STDCALL FPDF_SetPrintTextWithGDI(FPDF_BOOL use_gdi); |
| 240 #endif |
| 241 |
214 // Function: FPDF_LoadDocument | 242 // Function: FPDF_LoadDocument |
215 // Open and load a PDF document. | 243 // Open and load a PDF document. |
216 // Parameters: | 244 // Parameters: |
217 // file_path - Path to the PDF file (including extension). | 245 // file_path - Path to the PDF file (including extension). |
218 // password - A string used as the password for the PDF file. | 246 // password - A string used as the password for the PDF file. |
219 // If no password is needed, empty or NULL can be used. | 247 // If no password is needed, empty or NULL can be used. |
220 // Return value: | 248 // Return value: |
221 // A handle to the loaded document, or NULL on failure. | 249 // A handle to the loaded document, or NULL on failure. |
222 // Comments: | 250 // Comments: |
223 // Loaded document can be closed by FPDF_CloseDocument(). | 251 // Loaded document can be closed by FPDF_CloseDocument(). |
(...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
941 // Function: FPDF_BStr_Clear | 969 // Function: FPDF_BStr_Clear |
942 // Helper function to clear a byte string. | 970 // Helper function to clear a byte string. |
943 DLLEXPORT FPDF_RESULT STDCALL FPDF_BStr_Clear(FPDF_BSTR* str); | 971 DLLEXPORT FPDF_RESULT STDCALL FPDF_BStr_Clear(FPDF_BSTR* str); |
944 #endif // PDF_ENABLE_XFA | 972 #endif // PDF_ENABLE_XFA |
945 | 973 |
946 #ifdef __cplusplus | 974 #ifdef __cplusplus |
947 } | 975 } |
948 #endif | 976 #endif |
949 | 977 |
950 #endif // PUBLIC_FPDFVIEW_H_ | 978 #endif // PUBLIC_FPDFVIEW_H_ |
OLD | NEW |