Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(166)

Side by Side Diff: fpdfsdk/fpdfview.cpp

Issue 2113563003: Implement CGdiPrinterDriver::DrawDeviceText(). (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: rebase Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « core/fxge/win32/win32_int.h ('k') | public/fpdfview.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "public/fpdfview.h" 7 #include "public/fpdfview.h"
8 8
9 #include <memory> 9 #include <memory>
10 10
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 break; 327 break;
328 } 328 }
329 SetLastError(err_code); 329 SetLastError(err_code);
330 } 330 }
331 331
332 DLLEXPORT void STDCALL FPDF_SetSandBoxPolicy(FPDF_DWORD policy, 332 DLLEXPORT void STDCALL FPDF_SetSandBoxPolicy(FPDF_DWORD policy,
333 FPDF_BOOL enable) { 333 FPDF_BOOL enable) {
334 return FSDK_SetSandBoxPolicy(policy, enable); 334 return FSDK_SetSandBoxPolicy(policy, enable);
335 } 335 }
336 336
337 #if defined(_WIN32) && defined(PDFIUM_PRINT_TEXT_WITH_GDI)
338 DLLEXPORT void STDCALL
339 FPDF_SetTypefaceAccessibleFunc(PDFiumEnsureTypefaceCharactersAccessible func) {
340 g_pdfium_typeface_accessible_func = func;
341 }
342
343 DLLEXPORT void STDCALL FPDF_SetPrintTextWithGDI(FPDF_BOOL use_gdi) {
344 g_pdfium_print_text_with_gdi = !!use_gdi;
345 }
346 #endif
347
337 DLLEXPORT FPDF_DOCUMENT STDCALL FPDF_LoadDocument(FPDF_STRING file_path, 348 DLLEXPORT FPDF_DOCUMENT STDCALL FPDF_LoadDocument(FPDF_STRING file_path,
338 FPDF_BYTESTRING password) { 349 FPDF_BYTESTRING password) {
339 // NOTE: the creation of the file needs to be by the embedder on the 350 // NOTE: the creation of the file needs to be by the embedder on the
340 // other side of this API. 351 // other side of this API.
341 IFX_FileRead* pFileAccess = FX_CreateFileRead((const FX_CHAR*)file_path); 352 IFX_FileRead* pFileAccess = FX_CreateFileRead((const FX_CHAR*)file_path);
342 if (!pFileAccess) { 353 if (!pFileAccess) {
343 return nullptr; 354 return nullptr;
344 } 355 }
345 356
346 CPDF_Parser* pParser = new CPDF_Parser; 357 CPDF_Parser* pParser = new CPDF_Parser;
(...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after
1108 if (!buffer) { 1119 if (!buffer) {
1109 *buflen = len; 1120 *buflen = len;
1110 } else if (*buflen >= len) { 1121 } else if (*buflen >= len) {
1111 memcpy(buffer, utf16Name.c_str(), len); 1122 memcpy(buffer, utf16Name.c_str(), len);
1112 *buflen = len; 1123 *buflen = len;
1113 } else { 1124 } else {
1114 *buflen = -1; 1125 *buflen = -1;
1115 } 1126 }
1116 return (FPDF_DEST)pDestObj; 1127 return (FPDF_DEST)pDestObj;
1117 } 1128 }
OLDNEW
« no previous file with comments | « core/fxge/win32/win32_int.h ('k') | public/fpdfview.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698