Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

PrintSetup.java 8.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303
  1. /* ====================================================================
  2. Licensed to the Apache Software Foundation (ASF) under one or more
  3. contributor license agreements. See the NOTICE file distributed with
  4. this work for additional information regarding copyright ownership.
  5. The ASF licenses this file to You under the Apache License, Version 2.0
  6. (the "License"); you may not use this file except in compliance with
  7. the License. You may obtain a copy of the License at
  8. http://www.apache.org/licenses/LICENSE-2.0
  9. Unless required by applicable law or agreed to in writing, software
  10. distributed under the License is distributed on an "AS IS" BASIS,
  11. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. See the License for the specific language governing permissions and
  13. limitations under the License.
  14. ==================================================================== */
  15. package org.apache.poi.ss.usermodel;
  16. public interface PrintSetup {
  17. /** Whatever the printer's default paper size is */
  18. public static final short PRINTER_DEFAULT_PAPERSIZE = 0;
  19. /** US Letter 8 1/2 x 11 in */
  20. public static final short LETTER_PAPERSIZE = 1;
  21. /** US Letter Small 8 1/2 x 11 in */
  22. public static final short LETTER_SMALL_PAGESIZE = 2;
  23. /** US Tabloid 11 x 17 in */
  24. public static final short TABLOID_PAPERSIZE = 3;
  25. /** US Ledger 17 x 11 in */
  26. public static final short LEDGER_PAPERSIZE = 4;
  27. /** US Legal 8 1/2 x 14 in */
  28. public static final short LEGAL_PAPERSIZE = 5;
  29. /** US Statement 5 1/2 x 8 1/2 in */
  30. public static final short STATEMENT_PAPERSIZE = 6;
  31. /** US Executive 7 1/4 x 10 1/2 in */
  32. public static final short EXECUTIVE_PAPERSIZE = 7;
  33. /** A3 - 297x420 mm */
  34. public static final short A3_PAPERSIZE = 8;
  35. /** A4 - 210x297 mm */
  36. public static final short A4_PAPERSIZE = 9;
  37. /** A4 Small - 210x297 mm */
  38. public static final short A4_SMALL_PAPERSIZE = 10;
  39. /** A5 - 148x210 mm */
  40. public static final short A5_PAPERSIZE = 11;
  41. /** B4 (JIS) 250x354 mm */
  42. public static final short B4_PAPERSIZE = 12;
  43. /** B5 (JIS) 182x257 mm */
  44. public static final short B5_PAPERSIZE = 13;
  45. /** Folio 8 1/2 x 13 in */
  46. public static final short FOLIO8_PAPERSIZE = 14;
  47. /** Quarto 215x275 mm */
  48. public static final short QUARTO_PAPERSIZE = 15;
  49. /** 10 x 14 in */
  50. public static final short TEN_BY_FOURTEEN_PAPERSIZE = 16;
  51. /** 11 x 17 in */
  52. public static final short ELEVEN_BY_SEVENTEEN_PAPERSIZE = 17;
  53. /** US Note 8 1/2 x 11 in */
  54. public static final short NOTE8_PAPERSIZE = 18;
  55. /** US Envelope #9 3 7/8 x 8 7/8 */
  56. public static final short ENVELOPE_9_PAPERSIZE = 19;
  57. /** US Envelope #10 4 1/8 x 9 1/2 */
  58. public static final short ENVELOPE_10_PAPERSIZE = 20;
  59. /** Envelope DL 110x220 mm */
  60. public static final short ENVELOPE_DL_PAPERSIZE = 27;
  61. /** Envelope C5 162x229 mm */
  62. public static final short ENVELOPE_CS_PAPERSIZE = 28;
  63. public static final short ENVELOPE_C5_PAPERSIZE = 28;
  64. /** Envelope C3 324x458 mm */
  65. public static final short ENVELOPE_C3_PAPERSIZE = 29;
  66. /** Envelope C4 229x324 mm */
  67. public static final short ENVELOPE_C4_PAPERSIZE = 30;
  68. /** Envelope C6 114x162 mm */
  69. public static final short ENVELOPE_C6_PAPERSIZE = 31;
  70. public static final short ENVELOPE_MONARCH_PAPERSIZE = 37;
  71. /** A4 Extra - 9.27 x 12.69 in */
  72. public static final short A4_EXTRA_PAPERSIZE = 53;
  73. /** A4 Transverse - 210x297 mm */
  74. public static final short A4_TRANSVERSE_PAPERSIZE = 55;
  75. /** A4 Plus - 210x330 mm */
  76. public static final short A4_PLUS_PAPERSIZE = 60;
  77. /** US Letter Rotated 11 x 8 1/2 in */
  78. public static final short LETTER_ROTATED_PAPERSIZE = 75;
  79. /** A4 Rotated - 297x210 mm */
  80. public static final short A4_ROTATED_PAPERSIZE = 77;
  81. /**
  82. * Set the paper size.
  83. * @param size the paper size.
  84. */
  85. void setPaperSize(short size);
  86. /**
  87. * Set the scale.
  88. * @param scale the scale to use
  89. */
  90. void setScale(short scale);
  91. /**
  92. * Set the page numbering start.
  93. * @param start the page numbering start
  94. */
  95. void setPageStart(short start);
  96. /**
  97. * Set the number of pages wide to fit the sheet in
  98. * @param width the number of pages
  99. */
  100. void setFitWidth(short width);
  101. /**
  102. * Set the number of pages high to fit the sheet in
  103. * @param height the number of pages
  104. */
  105. void setFitHeight(short height);
  106. /**
  107. * Set whether to go left to right or top down in ordering
  108. * @param ltor left to right
  109. */
  110. void setLeftToRight(boolean ltor);
  111. /**
  112. * Set whether to print in landscape
  113. * @param ls landscape
  114. */
  115. void setLandscape(boolean ls);
  116. /**
  117. * Valid settings. I'm not for sure.
  118. * @param valid Valid
  119. */
  120. void setValidSettings(boolean valid);
  121. /**
  122. * Set whether it is black and white
  123. * @param mono Black and white
  124. */
  125. void setNoColor(boolean mono);
  126. /**
  127. * Set whether it is in draft mode
  128. * @param d draft
  129. */
  130. void setDraft(boolean d);
  131. /**
  132. * Print the include notes
  133. * @param printnotes print the notes
  134. */
  135. void setNotes(boolean printnotes);
  136. /**
  137. * Set no orientation. ?
  138. * @param orientation Orientation.
  139. */
  140. void setNoOrientation(boolean orientation);
  141. /**
  142. * Set whether to use page start
  143. * @param page Use page start
  144. */
  145. void setUsePage(boolean page);
  146. /**
  147. * Sets the horizontal resolution.
  148. * @param resolution horizontal resolution
  149. */
  150. void setHResolution(short resolution);
  151. /**
  152. * Sets the vertical resolution.
  153. * @param resolution vertical resolution
  154. */
  155. void setVResolution(short resolution);
  156. /**
  157. * Sets the header margin.
  158. * @param headermargin header margin
  159. */
  160. void setHeaderMargin(double headermargin);
  161. /**
  162. * Sets the footer margin.
  163. * @param footermargin footer margin
  164. */
  165. void setFooterMargin(double footermargin);
  166. /**
  167. * Sets the number of copies.
  168. * @param copies number of copies
  169. */
  170. void setCopies(short copies);
  171. /**
  172. * Returns the paper size.
  173. * @return paper size
  174. */
  175. short getPaperSize();
  176. /**
  177. * Returns the scale.
  178. * @return scale
  179. */
  180. short getScale();
  181. /**
  182. * Returns the page start.
  183. * @return page start
  184. */
  185. short getPageStart();
  186. /**
  187. * Returns the number of pages wide to fit sheet in.
  188. * @return number of pages wide to fit sheet in
  189. */
  190. short getFitWidth();
  191. /**
  192. * Returns the number of pages high to fit the sheet in.
  193. * @return number of pages high to fit the sheet in
  194. */
  195. short getFitHeight();
  196. /**
  197. * Returns the left to right print order.
  198. * @return left to right print order
  199. */
  200. boolean getLeftToRight();
  201. /**
  202. * Returns the landscape mode.
  203. * @return landscape mode
  204. */
  205. boolean getLandscape();
  206. /**
  207. * Returns the valid settings.
  208. * @return valid settings
  209. */
  210. boolean getValidSettings();
  211. /**
  212. * Returns the black and white setting.
  213. * @return black and white setting
  214. */
  215. boolean getNoColor();
  216. /**
  217. * Returns the draft mode.
  218. * @return draft mode
  219. */
  220. boolean getDraft();
  221. /**
  222. * Returns the print notes.
  223. * @return print notes
  224. */
  225. boolean getNotes();
  226. /**
  227. * Returns the no orientation.
  228. * @return no orientation
  229. */
  230. boolean getNoOrientation();
  231. /**
  232. * Returns the use page numbers.
  233. * @return use page numbers
  234. */
  235. boolean getUsePage();
  236. /**
  237. * Returns the horizontal resolution.
  238. * @return horizontal resolution
  239. */
  240. short getHResolution();
  241. /**
  242. * Returns the vertical resolution.
  243. * @return vertical resolution
  244. */
  245. short getVResolution();
  246. /**
  247. * Returns the header margin.
  248. * @return header margin
  249. */
  250. double getHeaderMargin();
  251. /**
  252. * Returns the footer margin.
  253. * @return footer margin
  254. */
  255. double getFooterMargin();
  256. /**
  257. * Returns the number of copies.
  258. * @return number of copies
  259. */
  260. short getCopies();
  261. }