com.mindfusion.diagramming.export
Class PdfExporter

java.lang.Object
  extended by com.mindfusion.diagramming.export.PdfExporter

public class PdfExporter
extends java.lang.Object

Exports JDiagram diagrams to Adobe Portable Document Format (PDF) files.


Constructor Summary
PdfExporter()
          Initializes a new instance of the PdfExporter class.
 
Method Summary
 void export(Diagram diagram, java.lang.String filePath)
          Creates a PDF file representing the specified JDiagram diagram.
 AutoScale getAutoScale()
          Gets a value indicating whether the diagram should be scaled to fit one or more pages of the PDF document.
 int getHyperLinkStyle()
           
 float getMarginBottom()
           
 float getMarginLeft()
          Gets the left margin for the PDF pages, measured in Inches.
 float getMarginRight()
           
 float getMarginTop()
           
 PageOrientation getPageOrientation()
          Gets the orientation of the PDF pages.
 PageSizesEnum getPageSize()
          Gets the size of the PDF pages.
 float getScale()
          Gets the scale of the PDF output relatively to the original on-screen size of the diagram.
 boolean isAutoOrientation()
           
 void setAutoOrientation(boolean autoOrientation)
           
 void setAutoScale(AutoScale autoScale)
          Sets a value indicating whether the diagram should be scaled to fit one or more pages of the PDF document.
 void setHyperLinkStyle(int value)
           
 void setMarginBottom(float marginBottom)
          Sets the value of bottom margin of the destination pdf document
 void setMarginLeft(float marginLeft)
          Sets the left margin for the PDF pages.
 void setMarginRight(float marginRigth)
          Sets the value of right margin of the destination pdf document
 void setMarginTop(float marginTop)
          Sets the value of top margin of the destination pdf document
 void setPageOrientation(PageOrientation pageOrientation)
          Sets the orientation of the PDF pages.
 void setPageSize(PageSizesEnum pageSize)
          Sets the size of the PDF pages.
 void setScale(float scale)
          Sets the scale of the PDF output relatively to the original on-screen size of the diagram.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PdfExporter

public PdfExporter()
Initializes a new instance of the PdfExporter class.

Method Detail

export

public void export(Diagram diagram,
                   java.lang.String filePath)
Creates a PDF file representing the specified JDiagram diagram.

Parameters:
diagram - A reference to the Diagram that will be exported.
filePath - The full path to the PDF file.
See Also:
PDF Reference, Fifth Edition, version 1.6 (PDF, 8.7M)

getAutoScale

public AutoScale getAutoScale()
Gets a value indicating whether the diagram should be scaled to fit one or more pages of the PDF document.

Returns:
A member of the AutoScale enumeration. The default is None.

setAutoScale

public void setAutoScale(AutoScale autoScale)
Sets a value indicating whether the diagram should be scaled to fit one or more pages of the PDF document.

Parameters:
autoScale - A member of the AutoScale enumeration. The default is None.

getScale

public float getScale()
Gets the scale of the PDF output relatively to the original on-screen size of the diagram.

Returns:
A float value specifying the scale as percent of the original size. The default is 100.

setScale

public void setScale(float scale)
Sets the scale of the PDF output relatively to the original on-screen size of the diagram.

Parameters:
scale - A float value specifying the scale as percent of the original size. The default is 100.

getPageSize

public PageSizesEnum getPageSize()
Gets the size of the PDF pages.

Returns:
A PageSizesEnum member. The default value is DiagramSize.

setPageSize

public void setPageSize(PageSizesEnum pageSize)
Sets the size of the PDF pages.

Parameters:
pageSize - A PageSizesEnum member. The default value is DiagramSize.

isAutoOrientation

public boolean isAutoOrientation()
Returns:
TRUE if orientation of the page in destination PDF to be estimated from the proportion of the w/h of the source diagram

setAutoOrientation

public void setAutoOrientation(boolean autoOrientation)
Parameters:
autoOrientation - TRUE if orientation of the page in destination PDF to be estimated from the proportion of the w/h of the source diagram

getPageOrientation

public PageOrientation getPageOrientation()
Gets the orientation of the PDF pages.

Returns:
Orientation of the page of the destination PDF documents
See Also:
com.mindfusion.diagramming.pdf.PageOrientation definition

setPageOrientation

public void setPageOrientation(PageOrientation pageOrientation)
Sets the orientation of the PDF pages.

Parameters:
Orientation - of the page of the destination PDF documents
See Also:
com.mindfusion.diagramming.pdf.PageOrientation definition

getMarginLeft

public float getMarginLeft()
Gets the left margin for the PDF pages, measured in Inches.


setMarginLeft

public void setMarginLeft(float marginLeft)
Sets the left margin for the PDF pages.

Parameters:
marginLeft - value of margin measured in Inches.

getMarginTop

public float getMarginTop()
Returns:
the value of top margin of the destination pdf document measured in Inches

setMarginTop

public void setMarginTop(float marginTop)
Sets the value of top margin of the destination pdf document

Parameters:
marginTop - value of margin measured in Inches

getMarginRight

public float getMarginRight()
Returns:
the value of right margin of the destination pdf document measured in Inches

setMarginRight

public void setMarginRight(float marginRigth)
Sets the value of right margin of the destination pdf document

Parameters:
marginRigth - value of margin measured in Inches

getMarginBottom

public float getMarginBottom()
Returns:
the value of bottom margin of the destination pdf document measured in Inches

setMarginBottom

public void setMarginBottom(float marginBottom)
Sets the value of bottom margin of the destination pdf document

Parameters:
marginBottom - value of margin measured in Inches

getHyperLinkStyle

public int getHyperLinkStyle()

setHyperLinkStyle

public void setHyperLinkStyle(int value)