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

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

Issue 2642493002: Add hooks to PDFium PostScript code (Closed)
Patch Set: Created 3 years, 11 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') | no next file » | 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 4085 matching lines...) Expand 10 before | Expand all | Expand 10 after
4096 4096
4097 void PDFiumEngineExports::SetPDFEnsureTypefaceCharactersAccessible( 4097 void PDFiumEngineExports::SetPDFEnsureTypefaceCharactersAccessible(
4098 PDFEnsureTypefaceCharactersAccessible func) { 4098 PDFEnsureTypefaceCharactersAccessible func) {
4099 FPDF_SetTypefaceAccessibleFunc( 4099 FPDF_SetTypefaceAccessibleFunc(
4100 reinterpret_cast<PDFiumEnsureTypefaceCharactersAccessible>(func)); 4100 reinterpret_cast<PDFiumEnsureTypefaceCharactersAccessible>(func));
4101 } 4101 }
4102 4102
4103 void PDFiumEngineExports::SetPDFUseGDIPrinting(bool enable) { 4103 void PDFiumEngineExports::SetPDFUseGDIPrinting(bool enable) {
4104 FPDF_SetPrintTextWithGDI(enable); 4104 FPDF_SetPrintTextWithGDI(enable);
4105 } 4105 }
4106
4107 void PDFiumEngineExports::SetPDFPostscriptPrintingLevel(
4108 int postscript_level) {
4109 FPDF_SetPrintPostscriptLevel(postscript_level);
4110 }
4111
4106 #endif // defined(OS_WIN) 4112 #endif // defined(OS_WIN)
4107 4113
4108 bool PDFiumEngineExports::RenderPDFPageToBitmap( 4114 bool PDFiumEngineExports::RenderPDFPageToBitmap(
4109 const void* pdf_buffer, 4115 const void* pdf_buffer,
4110 int pdf_buffer_size, 4116 int pdf_buffer_size,
4111 int page_number, 4117 int page_number,
4112 const RenderingSettings& settings, 4118 const RenderingSettings& settings,
4113 void* bitmap_buffer) { 4119 void* bitmap_buffer) {
4114 FPDF_DOCUMENT doc = 4120 FPDF_DOCUMENT doc =
4115 FPDF_LoadMemDocument(pdf_buffer, pdf_buffer_size, nullptr); 4121 FPDF_LoadMemDocument(pdf_buffer, pdf_buffer_size, nullptr);
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
4176 FPDF_DOCUMENT doc = 4182 FPDF_DOCUMENT doc =
4177 FPDF_LoadMemDocument(pdf_buffer, pdf_buffer_size, nullptr); 4183 FPDF_LoadMemDocument(pdf_buffer, pdf_buffer_size, nullptr);
4178 if (!doc) 4184 if (!doc)
4179 return false; 4185 return false;
4180 bool success = FPDF_GetPageSizeByIndex(doc, page_number, width, height) != 0; 4186 bool success = FPDF_GetPageSizeByIndex(doc, page_number, width, height) != 0;
4181 FPDF_CloseDocument(doc); 4187 FPDF_CloseDocument(doc);
4182 return success; 4188 return success;
4183 } 4189 }
4184 4190
4185 } // namespace chrome_pdf 4191 } // namespace chrome_pdf
OLDNEW
« no previous file with comments | « pdf/pdfium/pdfium_engine.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698