You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

DSCConstants.java 9.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  1. /*
  2. * Copyright 1999-2005 The Apache Software Foundation.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. /* $Id$ */
  17. package org.apache.fop.render.ps;
  18. /**
  19. * This class defines constants with Strings for the DSC specification.
  20. *
  21. * @author <a href="mailto:fop-dev@xmlgraphics.apache.org">Apache FOP Development Team</a>
  22. * @version $Id: DSCConstants.java,v 1.2 2003/03/07 09:46:30 jeremias Exp $
  23. */
  24. public class DSCConstants {
  25. // ----==== General Header Comments ====----
  26. /** Lead-in for a DSC-conformant PostScript file */
  27. public static final String PS_ADOBE_30 = "%!PS-Adobe-3.0";
  28. /** Lead-in for an EPS file */
  29. public static final String EPSF_30 = "EPSF-3.0";
  30. /** Bounding box for the document */
  31. public static final String BBOX = "BoundingBox";
  32. /** High-resolution bounding box for the document */
  33. public static final String HIRES_BBOX = "HiResBoundingBox";
  34. /** Copyright information associated with the document or resource */
  35. public static final String COPYRIGHT = "Copyright";
  36. /** Creator of the document */
  37. public static final String CREATOR = "Creator";
  38. /** Date and time when the document was created */
  39. public static final String CREATION_DATE = "CreationDate";
  40. /** Type of data */
  41. public static final String DOCUMENT_DATA = "BoundingBox";
  42. /** Use for inidicating an emulator being invoked in the document */
  43. public static final String EMULATION = "Emulation";
  44. /** Explicit end of comments */
  45. public static final String END_COMMENTS = "EndComments";
  46. /** Required PostScript Level 1 extension for this document */
  47. public static final String EXTENSIONS = "Extensions";
  48. /** Indicates who is this document printed for */
  49. public static final String FOR = "For";
  50. /** Indicates the PostScript language level used in the document */
  51. public static final String LANGUAGE_LEVEL = "LanguageLevel";
  52. /** Indicates the orientation of the document */
  53. public static final String ORIENTATION = "Orientation";
  54. /** Number of pages in the document */
  55. public static final String PAGES = "Pages";
  56. /** Indicates the order of the pages */
  57. public static final String PAGE_ORDER = "PageOrder";
  58. /** Indicates how the document should be routed back to its owner */
  59. public static final String ROUTING = "Routing";
  60. /** Title of the document */
  61. public static final String TITLE = "Title";
  62. /** Version of the document */
  63. public static final String VERSION = "Version";
  64. // ----==== General Body Comments ====----
  65. /** Indicates a continued line */
  66. public static final String NEXT_LINE = "+ ";
  67. //Skipping BeginBinary/EndBinary. They are deprecated.
  68. /** Indicates the start of a data section*/
  69. public static final String BEGIN_DATA = "BeginData";
  70. /** Indicates the end of a data section*/
  71. public static final String END_DATA = "EndData";
  72. /** Indicates the start of the defaults section */
  73. public static final String BEGIN_DEFAULTS = "BeginDefaults";
  74. /** Indicates the end of the defaults section */
  75. public static final String END_DEFAULTS = "EndDefaults";
  76. /** Indicates the start of a non-PostScript section */
  77. public static final String BEGIN_EMULATION = "BeginEmulation";
  78. /** Indicates the end of a non-PostScript section */
  79. public static final String END_EMULATION = "EndEmulation";
  80. /** Indicates the start of a preview section (EPS only)*/
  81. public static final String BEGIN_PREVIEW = "BeginPreview";
  82. /** Indicates the end of a preview section (EPS only)*/
  83. public static final String END_PREVIEW = "EndPreview";
  84. /** Indicates the start of the prolog */
  85. public static final String BEGIN_PROLOG = "BeginProlog";
  86. /** Indicates the end of the prolog */
  87. public static final String END_PROLOG = "EndProlog";
  88. /** Indicates the start of the document setup */
  89. public static final String BEGIN_SETUP = "BeginSetup";
  90. /** Indicates the end of the document setup */
  91. public static final String END_SETUP = "EndSetup";
  92. // ----==== General Page Comments ====----
  93. /** Indicates the start of a graphic object */
  94. public static final String BEGIN_OBJECT = "BeginObject";
  95. /** Indicates the end of a graphic object */
  96. public static final String END_OBJECT = "EndObject";
  97. /** Indicates the start of the page setup section */
  98. public static final String BEGIN_PAGE_SETUP = "BeginPageSetup";
  99. /** Indicates the end of the page setup section */
  100. public static final String END_PAGE_SETUP = "EndPageSetup";
  101. /** Indicates a page number */
  102. public static final String PAGE = "Page";
  103. /** Bounding box for a page */
  104. public static final String PAGE_BBOX = "PageBoundingBox";
  105. /** High-resolution bounding box for a page */
  106. public static final String PAGE_HIRES_BBOX = "PageHiResBoundingBox";
  107. /** Bounding box for a page */
  108. public static final String PAGE_ORIENTATION = "PageOrientation";
  109. // ----==== General Trailer Comments ====----
  110. /** Indicates the start of the page trailer */
  111. public static final String PAGE_TRAILER = "PageTrailer";
  112. /** Indicates the start of the document trailer */
  113. public static final String TRAILER = "Trailer";
  114. /** Indicates the end of a page (NON-STANDARD!) */
  115. public static final String END_PAGE = "EndPage";
  116. /** Indicates the end of the document */
  117. public static final String EOF = "EOF";
  118. // ----==== Requirements Conventions ====----
  119. /**@todo Add the missing comments */
  120. /**
  121. * This comment indicates all types of paper media (paper sizes, weight, color)
  122. * this document requires.
  123. */
  124. public static final String DOCUMENT_MEDIA = "DocumentMedia";
  125. /** This comment provides a list of resources the document needs */
  126. public static final String DOCUMENT_NEEDED_RESOURCES = "DocumentNeededResources";
  127. /** This comment provides a list of resources the document includes */
  128. public static final String DOCUMENT_SUPPLIED_RESOURCES = "DocumentSuppliedResources";
  129. //Skipping %%DocumentPrinterRequired
  130. //Skipping %%DocumentNeededFiles -> deprecated
  131. //Skipping %%DocumentSuppliedFiles -> deprecated
  132. //Skipping %%DocumentFonts -> deprecated
  133. //Skipping %%DocumentNeededFonts -> deprecated
  134. //Skipping %%DocumentSuppliedFonts -> deprecated
  135. //Skipping %%DocumentNeededProcSets -> deprecated
  136. //Skipping %%DocumentSuppliedProcSets -> deprecated
  137. //Skipping %%OperatorIntervention
  138. //Skipping %%OperatorMessage
  139. //Skipping %%ProofMode
  140. /**
  141. * This comment describes document requirements, such as duplex printing,
  142. * hole punching, collating, or other physical document processing needs.
  143. */
  144. public static final String REQUIREMENTS = "Requirements";
  145. //Skipping %%VMlocation
  146. //Skipping %%VMusage
  147. // ----==== Requirement Body Comments ====----
  148. /** Indicates the start of an embedded document */
  149. public static final String BEGIN_DOCUMENT = "BeginDocument";
  150. /** Indicates the end of an embedded document */
  151. public static final String END_DOCUMENT = "EndDocument";
  152. /** Indicates a referenced embedded document */
  153. public static final String INCLUDE_DOCUMENT = "IncludeDocument";
  154. /** Indicates the start of a PPD feature */
  155. public static final String BEGIN_FEATURE = "BeginFeature";
  156. /** Indicates the end of a PPD feature */
  157. public static final String END_FEATURE = "EndFeature";
  158. /** Indicates a referenced a PPD feature */
  159. public static final String INCLUDE_FEATURE = "IncludeFeature";
  160. //Skipping BeginFile/EndFile/IncludeFile. They are deprecated.
  161. //Skipping BeginFont/EndFont/IncludeFont. They are deprecated.
  162. //Skipping BeginProcSet/EndProcSet/IncludeProcSet. They are deprecated.
  163. /** Indicates the start of a resource (font, file, procset) */
  164. public static final String BEGIN_RESOURCE = "BeginResource";
  165. /** Indicates the end of a resource (font, file, procset) */
  166. public static final String END_RESOURCE = "EndResource";
  167. /** Indicates a referenced a resource (font, file, procset) */
  168. public static final String INCLUDE_RESOURCE = "IncludeResource";
  169. // ----==== Requirement Page Comments ====----
  170. //Skipping %%PageFonts -> deprecated
  171. //Skipping %%PageFiles -> deprecated
  172. /** Indicates that the paper attributes denoted by medianame are invoked on this page. */
  173. public static final String PAGE_MEDIA = "PageMedia";
  174. /**
  175. * This is the page-level invocation of a combination of the options listed in
  176. * the %%Requirements: comment.
  177. */
  178. public static final String PAGE_REQUIREMENTS = "PageRequirements";
  179. /**
  180. * This comment indicates the names and values of all resources that are needed
  181. * or supplied on the present page.
  182. */
  183. public static final String PAGE_RESOURCES = "PageResources";
  184. }