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

Side by Side Diff: pdf/pdfium/pdfium_engine.cc

Issue 2970473002: Add generic text printing (Closed)
Patch Set: Change enum names Created 3 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 | « pdf/pdfium/pdfium_engine.h ('k') | printing/pdf_render_settings.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/pdfium/pdfium_engine.h" 5 #include "pdf/pdfium/pdfium_engine.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 4136 matching lines...) Expand 10 before | Expand all | Expand 10 after
4147 void PDFiumEngineExports::SetPDFEnsureTypefaceCharactersAccessible( 4147 void PDFiumEngineExports::SetPDFEnsureTypefaceCharactersAccessible(
4148 PDFEnsureTypefaceCharactersAccessible func) { 4148 PDFEnsureTypefaceCharactersAccessible func) {
4149 FPDF_SetTypefaceAccessibleFunc( 4149 FPDF_SetTypefaceAccessibleFunc(
4150 reinterpret_cast<PDFiumEnsureTypefaceCharactersAccessible>(func)); 4150 reinterpret_cast<PDFiumEnsureTypefaceCharactersAccessible>(func));
4151 } 4151 }
4152 4152
4153 void PDFiumEngineExports::SetPDFUseGDIPrinting(bool enable) { 4153 void PDFiumEngineExports::SetPDFUseGDIPrinting(bool enable) {
4154 FPDF_SetPrintTextWithGDI(enable); 4154 FPDF_SetPrintTextWithGDI(enable);
4155 } 4155 }
4156 4156
4157 void PDFiumEngineExports::SetPDFPostscriptPrintingLevel(int postscript_level) { 4157 void PDFiumEngineExports::SetPDFUsePrintMode(int mode) {
4158 FPDF_SetPrintPostscriptLevel(postscript_level); 4158 FPDF_SetPrintMode(mode);
4159 } 4159 }
4160
4161 #endif // defined(OS_WIN) 4160 #endif // defined(OS_WIN)
4162 4161
4163 bool PDFiumEngineExports::RenderPDFPageToBitmap( 4162 bool PDFiumEngineExports::RenderPDFPageToBitmap(
4164 const void* pdf_buffer, 4163 const void* pdf_buffer,
4165 int pdf_buffer_size, 4164 int pdf_buffer_size,
4166 int page_number, 4165 int page_number,
4167 const RenderingSettings& settings, 4166 const RenderingSettings& settings,
4168 void* bitmap_buffer) { 4167 void* bitmap_buffer) {
4169 FPDF_DOCUMENT doc = 4168 FPDF_DOCUMENT doc =
4170 FPDF_LoadMemDocument(pdf_buffer, pdf_buffer_size, nullptr); 4169 FPDF_LoadMemDocument(pdf_buffer, pdf_buffer_size, nullptr);
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
4230 FPDF_DOCUMENT doc = 4229 FPDF_DOCUMENT doc =
4231 FPDF_LoadMemDocument(pdf_buffer, pdf_buffer_size, nullptr); 4230 FPDF_LoadMemDocument(pdf_buffer, pdf_buffer_size, nullptr);
4232 if (!doc) 4231 if (!doc)
4233 return false; 4232 return false;
4234 bool success = FPDF_GetPageSizeByIndex(doc, page_number, width, height) != 0; 4233 bool success = FPDF_GetPageSizeByIndex(doc, page_number, width, height) != 0;
4235 FPDF_CloseDocument(doc); 4234 FPDF_CloseDocument(doc);
4236 return success; 4235 return success;
4237 } 4236 }
4238 4237
4239 } // namespace chrome_pdf 4238 } // namespace chrome_pdf
OLDNEW
« no previous file with comments | « pdf/pdfium/pdfium_engine.h ('k') | printing/pdf_render_settings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698