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

Side by Side Diff: pdf/pdf.cc

Issue 2114583002: Windows: Make it possible to print text with GDI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase again, resolve conflicts Created 4 years, 4 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/pdf.h ('k') | pdf/pdf_engine.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/pdf.h" 5 #include "pdf/pdf.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #if defined(OS_WIN) 9 #if defined(OS_WIN)
10 #include <windows.h> 10 #include <windows.h>
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 fit_to_bounds, stretch_to_bounds, keep_aspect_ratio, center_in_bounds, 108 fit_to_bounds, stretch_to_bounds, keep_aspect_ratio, center_in_bounds,
109 autorotate); 109 autorotate);
110 bool ret = engine_exports->RenderPDFPageToDC(pdf_buffer, buffer_size, 110 bool ret = engine_exports->RenderPDFPageToDC(pdf_buffer, buffer_size,
111 page_number, settings, dc); 111 page_number, settings, dc);
112 if (!g_sdk_initialized_via_pepper) 112 if (!g_sdk_initialized_via_pepper)
113 ShutdownSDK(); 113 ShutdownSDK();
114 114
115 return ret; 115 return ret;
116 } 116 }
117 117
118 void SetPDFEnsureTypefaceCharactersAccessible(
119 PDFEnsureTypefaceCharactersAccessible func) {
120 PDFEngineExports::Get()->SetPDFEnsureTypefaceCharactersAccessible(func);
121 }
122
123 void SetPDFUseGDIPrinting(bool enable) {
124 PDFEngineExports::Get()->SetPDFUseGDIPrinting(enable);
125 }
118 #endif // defined(OS_WIN) 126 #endif // defined(OS_WIN)
119 127
120 bool GetPDFDocInfo(const void* pdf_buffer, 128 bool GetPDFDocInfo(const void* pdf_buffer,
121 int buffer_size, int* page_count, 129 int buffer_size, int* page_count,
122 double* max_page_width) { 130 double* max_page_width) {
123 if (!g_sdk_initialized_via_pepper) { 131 if (!g_sdk_initialized_via_pepper) {
124 if (!InitializeSDK()) 132 if (!InitializeSDK())
125 return false; 133 return false;
126 } 134 }
127 PDFEngineExports* engine_exports = PDFEngineExports::Get(); 135 PDFEngineExports* engine_exports = PDFEngineExports::Get();
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 autorotate); 175 autorotate);
168 bool ret = engine_exports->RenderPDFPageToBitmap( 176 bool ret = engine_exports->RenderPDFPageToBitmap(
169 pdf_buffer, pdf_buffer_size, page_number, settings, bitmap_buffer); 177 pdf_buffer, pdf_buffer_size, page_number, settings, bitmap_buffer);
170 if (!g_sdk_initialized_via_pepper) 178 if (!g_sdk_initialized_via_pepper)
171 ShutdownSDK(); 179 ShutdownSDK();
172 180
173 return ret; 181 return ret;
174 } 182 }
175 183
176 } // namespace chrome_pdf 184 } // namespace chrome_pdf
OLDNEW
« no previous file with comments | « pdf/pdf.h ('k') | pdf/pdf_engine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698