Java Doc for PDPageContentStream.java in  » PDF » PDFBox-0.7.3 » org » pdfbox » pdmodel » edit » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » PDF » PDFBox 0.7.3 » org.pdfbox.pdmodel.edit 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.pdfbox.pdmodel.edit.PDPageContentStream

PDPageContentStream
public class PDPageContentStream (Code)
This class will is a convenience for creating page content streams. You MUST call close() when you are finished with this object.
author:
   Ben Litchfield
version:
   $Revision: 1.18 $



Constructor Summary
public  PDPageContentStream(PDDocument document, PDPage sourcePage)
     Create a new PDPage content stream.
public  PDPageContentStream(PDDocument document, PDPage sourcePage, boolean appendContent, boolean compress)
     Create a new PDPage content stream.
Parameters:
  document - The document the page is part of.
Parameters:
  sourcePage - The page to write the contents to.
Parameters:
  appendContent - Indicates whether content will be overwritten.

Method Summary
public  voidappendRawCommands(String commands)
     This will append raw commands to the content stream.
public  voidappendRawCommands(byte[] commands)
     This will append raw commands to the content stream.
public  voidappendRawCommands(int data)
     This will append raw commands to the content stream.
public  voidbeginText()
     Begin some text operations.
public  voidclose()
     Close the content stream.
public  voiddrawImage(PDXObjectImage image, float x, float y)
     Draw an image at the x,y coordinates, with the default size of the image.
public  voiddrawImage(PDXObjectImage image, float x, float y, float width, float height)
     Draw an image at the x,y coordinates and a certain width and height.
public  voiddrawString(String text)
     This will draw a string at the current location on the screen.
public  voidendText()
     End some text operations.
public  voidfillRect(float x, float y, float width, float height)
     Draw a rectangle on the page using the current non stroking color.
public  voidmoveTextPositionByAmount(float x, float y)
     The Td operator.
public  voidsetFont(PDFont font, float fontSize)
     Set the font to draw text with.
public  voidsetNonStrokingColor(Color color)
     Set the non stroking color, specified as RGB.
public  voidsetNonStrokingColor(float[] components)
     Set the color components of current non stroking colorspace.
public  voidsetNonStrokingColor(int r, int g, int b)
     Set the non stroking color, specified as RGB, 0-255.
public  voidsetNonStrokingColor(int c, int m, int y, int k)
     Set the non stroking color, specified as CMYK, 0-255.
public  voidsetNonStrokingColor(double c, double m, double y, double k)
     Set the non stroking color, specified as CMYK, 0.0-1.0.
public  voidsetNonStrokingColor(int g)
     Set the non stroking color, specified as grayscale, 0-255.
public  voidsetNonStrokingColor(double g)
     Set the non stroking color, specified as Grayscale 0.0-1.0.
public  voidsetNonStrokingColorSpace(PDColorSpace colorSpace)
     Set the stroking color space.
public  voidsetStrokingColor(float[] components)
     Set the color components of current stroking colorspace.
public  voidsetStrokingColor(Color color)
     Set the stroking color, specified as RGB.
public  voidsetStrokingColor(int r, int g, int b)
     Set the stroking color, specified as RGB, 0-255.
public  voidsetStrokingColor(int c, int m, int y, int k)
     Set the stroking color, specified as CMYK, 0-255.
public  voidsetStrokingColor(double c, double m, double y, double k)
     Set the stroking color, specified as CMYK, 0.0-1.0.
public  voidsetStrokingColor(int g)
     Set the stroking color, specified as grayscale, 0-255.
public  voidsetStrokingColor(double g)
     Set the stroking color, specified as Grayscale 0.0-1.0.
public  voidsetStrokingColorSpace(PDColorSpace colorSpace)
     Set the stroking color space.


Constructor Detail
PDPageContentStream
public PDPageContentStream(PDDocument document, PDPage sourcePage) throws IOException(Code)
Create a new PDPage content stream.
Parameters:
  document - The document the page is part of.
Parameters:
  sourcePage - The page to write the contents to.
throws:
  IOException - If there is an error writing to the page contents.



PDPageContentStream
public PDPageContentStream(PDDocument document, PDPage sourcePage, boolean appendContent, boolean compress) throws IOException(Code)
Create a new PDPage content stream.
Parameters:
  document - The document the page is part of.
Parameters:
  sourcePage - The page to write the contents to.
Parameters:
  appendContent - Indicates whether content will be overwritten. If false all previous content is deleted.
Parameters:
  compress - Tell if the content stream should compress the page contents.
throws:
  IOException - If there is an error writing to the page contents.




Method Detail
appendRawCommands
public void appendRawCommands(String commands) throws IOException(Code)
This will append raw commands to the content stream.
Parameters:
  commands - The commands to append to the stream.
throws:
  IOException - If an error occurs while writing to the stream.



appendRawCommands
public void appendRawCommands(byte[] commands) throws IOException(Code)
This will append raw commands to the content stream.
Parameters:
  commands - The commands to append to the stream.
throws:
  IOException - If an error occurs while writing to the stream.



appendRawCommands
public void appendRawCommands(int data) throws IOException(Code)
This will append raw commands to the content stream.
Parameters:
  data - Append a raw byte to the stream.
throws:
  IOException - If an error occurs while writing to the stream.



beginText
public void beginText() throws IOException(Code)
Begin some text operations.
throws:
  IOException - If there is an error writing to the stream or if you attempt to nest beginText calls.



close
public void close() throws IOException(Code)
Close the content stream. This must be called when you are done with this object.
throws:
  IOException - If the underlying stream has a problem being written to.



drawImage
public void drawImage(PDXObjectImage image, float x, float y) throws IOException(Code)
Draw an image at the x,y coordinates, with the default size of the image.
Parameters:
  image - The image to draw.
Parameters:
  x - The x-coordinate to draw the image.
Parameters:
  y - The y-coordinate to draw the image.
throws:
  IOException - If there is an error writing to the stream.



drawImage
public void drawImage(PDXObjectImage image, float x, float y, float width, float height) throws IOException(Code)
Draw an image at the x,y coordinates and a certain width and height.
Parameters:
  image - The image to draw.
Parameters:
  x - The x-coordinate to draw the image.
Parameters:
  y - The y-coordinate to draw the image.
Parameters:
  width - The width of the image to draw.
Parameters:
  height - The height of the image to draw.
throws:
  IOException - If there is an error writing to the stream.



drawString
public void drawString(String text) throws IOException(Code)
This will draw a string at the current location on the screen.
Parameters:
  text - The text to draw.
throws:
  IOException - If an io exception occurs.



endText
public void endText() throws IOException(Code)
End some text operations.
throws:
  IOException - If there is an error writing to the stream or if you attempt to nest endText calls.



fillRect
public void fillRect(float x, float y, float width, float height) throws IOException(Code)
Draw a rectangle on the page using the current non stroking color.
Parameters:
  x - The lower left x coordinate.
Parameters:
  y - The lower left y coordinate.
Parameters:
  width - The width of the rectangle.
Parameters:
  height - The height of the rectangle.
throws:
  IOException - If there is an error while drawing on the screen.



moveTextPositionByAmount
public void moveTextPositionByAmount(float x, float y) throws IOException(Code)
The Td operator.
Parameters:
  x - The x coordinate.
Parameters:
  y - The y coordinate.
throws:
  IOException - If there is an error writing to the stream.



setFont
public void setFont(PDFont font, float fontSize) throws IOException(Code)
Set the font to draw text with.
Parameters:
  font - The font to use.
Parameters:
  fontSize - The font size to draw the text.
throws:
  IOException - If there is an error writing the font information.



setNonStrokingColor
public void setNonStrokingColor(Color color) throws IOException(Code)
Set the non stroking color, specified as RGB.
Parameters:
  color - The color to set.
throws:
  IOException - If an IO error occurs while writing to the stream.



setNonStrokingColor
public void setNonStrokingColor(float[] components) throws IOException(Code)
Set the color components of current non stroking colorspace.
Parameters:
  components - The components to set for the current color.
throws:
  IOException - If there is an error while writing to the stream.



setNonStrokingColor
public void setNonStrokingColor(int r, int g, int b) throws IOException(Code)
Set the non stroking color, specified as RGB, 0-255.
Parameters:
  r - The red value.
Parameters:
  g - The green value.
Parameters:
  b - The blue value.
throws:
  IOException - If an IO error occurs while writing to the stream.



setNonStrokingColor
public void setNonStrokingColor(int c, int m, int y, int k) throws IOException(Code)
Set the non stroking color, specified as CMYK, 0-255.
Parameters:
  c - The cyan value.
Parameters:
  m - The magenta value.
Parameters:
  y - The yellow value.
Parameters:
  k - The black value.
throws:
  IOException - If an IO error occurs while writing to the stream.



setNonStrokingColor
public void setNonStrokingColor(double c, double m, double y, double k) throws IOException(Code)
Set the non stroking color, specified as CMYK, 0.0-1.0.
Parameters:
  c - The cyan value.
Parameters:
  m - The magenta value.
Parameters:
  y - The yellow value.
Parameters:
  k - The black value.
throws:
  IOException - If an IO error occurs while writing to the stream.



setNonStrokingColor
public void setNonStrokingColor(int g) throws IOException(Code)
Set the non stroking color, specified as grayscale, 0-255.
Parameters:
  g - The gray value.
throws:
  IOException - If an IO error occurs while writing to the stream.



setNonStrokingColor
public void setNonStrokingColor(double g) throws IOException(Code)
Set the non stroking color, specified as Grayscale 0.0-1.0.
Parameters:
  g - The gray value.
throws:
  IOException - If an IO error occurs while writing to the stream.



setNonStrokingColorSpace
public void setNonStrokingColorSpace(PDColorSpace colorSpace) throws IOException(Code)
Set the stroking color space. This will add the colorspace to the PDResources if necessary.
Parameters:
  colorSpace - The colorspace to write.
throws:
  IOException - If there is an error writing the colorspace.



setStrokingColor
public void setStrokingColor(float[] components) throws IOException(Code)
Set the color components of current stroking colorspace.
Parameters:
  components - The components to set for the current color.
throws:
  IOException - If there is an error while writing to the stream.



setStrokingColor
public void setStrokingColor(Color color) throws IOException(Code)
Set the stroking color, specified as RGB.
Parameters:
  color - The color to set.
throws:
  IOException - If an IO error occurs while writing to the stream.



setStrokingColor
public void setStrokingColor(int r, int g, int b) throws IOException(Code)
Set the stroking color, specified as RGB, 0-255.
Parameters:
  r - The red value.
Parameters:
  g - The green value.
Parameters:
  b - The blue value.
throws:
  IOException - If an IO error occurs while writing to the stream.



setStrokingColor
public void setStrokingColor(int c, int m, int y, int k) throws IOException(Code)
Set the stroking color, specified as CMYK, 0-255.
Parameters:
  c - The cyan value.
Parameters:
  m - The magenta value.
Parameters:
  y - The yellow value.
Parameters:
  k - The black value.
throws:
  IOException - If an IO error occurs while writing to the stream.



setStrokingColor
public void setStrokingColor(double c, double m, double y, double k) throws IOException(Code)
Set the stroking color, specified as CMYK, 0.0-1.0.
Parameters:
  c - The cyan value.
Parameters:
  m - The magenta value.
Parameters:
  y - The yellow value.
Parameters:
  k - The black value.
throws:
  IOException - If an IO error occurs while writing to the stream.



setStrokingColor
public void setStrokingColor(int g) throws IOException(Code)
Set the stroking color, specified as grayscale, 0-255.
Parameters:
  g - The gray value.
throws:
  IOException - If an IO error occurs while writing to the stream.



setStrokingColor
public void setStrokingColor(double g) throws IOException(Code)
Set the stroking color, specified as Grayscale 0.0-1.0.
Parameters:
  g - The gray value.
throws:
  IOException - If an IO error occurs while writing to the stream.



setStrokingColorSpace
public void setStrokingColorSpace(PDColorSpace colorSpace) throws IOException(Code)
Set the stroking color space. This will add the colorspace to the PDResources if necessary.
Parameters:
  colorSpace - The colorspace to write.
throws:
  IOException - If there is an error writing the colorspace.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.