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

Side by Side Diff: pdf/pdf.h

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/BUILD.gn ('k') | pdf/pdf.cc » ('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 #ifndef PDF_PDF_H_ 5 #ifndef PDF_PDF_H_
6 #define PDF_PDF_H_ 6 #define PDF_PDF_H_
7 7
8 #include "ppapi/c/ppb.h" 8 #include "ppapi/c/ppb.h"
9 #include "ppapi/cpp/module.h" 9 #include "ppapi/cpp/module.h"
10 10
11 #if defined(OS_WIN)
12 #include <windows.h>
13 #endif
14
15 #if defined(OS_WIN)
16 typedef void (*PDFEnsureTypefaceCharactersAccessible)(const LOGFONT* font,
17 const wchar_t* text,
18 size_t text_length);
19 #endif
20
11 namespace chrome_pdf { 21 namespace chrome_pdf {
12 22
13 class PDFModule : public pp::Module { 23 class PDFModule : public pp::Module {
14 public: 24 public:
15 PDFModule(); 25 PDFModule();
16 ~PDFModule() override; 26 ~PDFModule() override;
17 27
18 // pp::Module implementation. 28 // pp::Module implementation.
19 bool Init() override; 29 bool Init() override;
20 pp::Instance* CreateInstance(PP_Instance instance) override; 30 pp::Instance* CreateInstance(PP_Instance instance) override;
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 int dpi, 70 int dpi,
61 int bounds_origin_x, 71 int bounds_origin_x,
62 int bounds_origin_y, 72 int bounds_origin_y,
63 int bounds_width, 73 int bounds_width,
64 int bounds_height, 74 int bounds_height,
65 bool fit_to_bounds, 75 bool fit_to_bounds,
66 bool stretch_to_bounds, 76 bool stretch_to_bounds,
67 bool keep_aspect_ratio, 77 bool keep_aspect_ratio,
68 bool center_in_bounds, 78 bool center_in_bounds,
69 bool autorotate); 79 bool autorotate);
70 #endif 80
81 void SetPDFEnsureTypefaceCharactersAccessible(
82 PDFEnsureTypefaceCharactersAccessible func);
83
84 void SetPDFUseGDIPrinting(bool enable);
85 #endif // defined(OS_WIN)
86
71 // |page_count| and |max_page_width| are optional and can be NULL. 87 // |page_count| and |max_page_width| are optional and can be NULL.
72 // Returns false if the document is not valid. 88 // Returns false if the document is not valid.
73 bool GetPDFDocInfo(const void* pdf_buffer, 89 bool GetPDFDocInfo(const void* pdf_buffer,
74 int buffer_size, int* page_count, 90 int buffer_size, int* page_count,
75 double* max_page_width); 91 double* max_page_width);
76 92
77 // Gets the dimensions of a specific page in a document. 93 // Gets the dimensions of a specific page in a document.
78 // |pdf_buffer| is the buffer that contains the entire PDF document to be 94 // |pdf_buffer| is the buffer that contains the entire PDF document to be
79 // rendered. 95 // rendered.
80 // |pdf_buffer_size| is the size of |pdf_buffer| in bytes. 96 // |pdf_buffer_size| is the size of |pdf_buffer| in bytes.
(...skipping 23 matching lines...) Expand all
104 int page_number, 120 int page_number,
105 void* bitmap_buffer, 121 void* bitmap_buffer,
106 int bitmap_width, 122 int bitmap_width,
107 int bitmap_height, 123 int bitmap_height,
108 int dpi, 124 int dpi,
109 bool autorotate); 125 bool autorotate);
110 126
111 } // namespace chrome_pdf 127 } // namespace chrome_pdf
112 128
113 #endif // PDF_PDF_H_ 129 #endif // PDF_PDF_H_
OLDNEW
« no previous file with comments | « pdf/BUILD.gn ('k') | pdf/pdf.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698