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
3 * found in the LICENSE file.
7 * Definition of the PPP_Printing interface.
10 // Note: This version should always match the PPB_Printing_Dev interface.
16 * Specifies a contiguous range of page numbers to be printed.
17 * The page numbers use a zero-based index.
20 struct PP_PrintPageNumberRange_Dev
{
21 uint32_t first_page_number
;
22 uint32_t last_page_number
;
25 interface PPP_Printing_Dev
{
27 * Returns a bit field representing the supported print output formats. For
28 * example, if only PDF and PostScript are supported,
29 * QuerySupportedFormats returns a value equivalent to:
30 * (PP_PRINTOUTPUTFORMAT_PDF | PP_PRINTOUTPUTFORMAT_POSTSCRIPT)
32 uint32_t QuerySupportedFormats
([in] PP_Instance instance
);
35 * Begins a print session with the given print settings. Calls to PrintPages
36 * can only be made after a successful call to Begin. Returns the number of
37 * pages required for the print output at the given page size (0 indicates
40 int32_t Begin
([in] PP_Instance instance
,
41 [in] PP_PrintSettings_Dev print_settings
);
44 * Prints the specified pages using the format specified in Begin.
45 * Returns a PPB_Buffer resource that represents the printed output. Returns
48 PP_Resource PrintPages
([in] PP_Instance instance
,
49 [in] PP_PrintPageNumberRange_Dev page_ranges
,
50 [in] uint32_t page_range_count
);
52 /** Ends the print session. Further calls to PrintPages will fail. */
53 void End
([in] PP_Instance instance
);
56 * Returns true if the current content should be printed into the full page
57 * and not scaled down to fit within the printer's printable area.
59 PP_Bool IsScalingDisabled
([in] PP_Instance instance
);