public class GeneratorBase extends ImageWriter
Summary description for GeneratorBase.
Modifier and Type | Field and Description |
---|---|
int |
BookmarkDesPage |
com.aspose.ms.System.Collections.ArrayList |
BookmarkLinkActions |
IsCoreFontUsed, isFontNotFoundExceptionThrown, IsUnderlineWritten, LastRequestedFontWasNonTruetypeItalicButWasSubtitutedWithTrueTypeNonItalic, MustUseFontMapFile, textRotatingAngle
clipObjects, ClippingArea, HasUnicodeInBookmark, IsUnicodeWithWordSpacing, JavaScripts, XmpMetadata, XmpMetadataID
LastObjIdOfEveryPage
Constructor and Description |
---|
GeneratorBase() |
GeneratorBase(IFontUriResolver externalFontResolver,
IResourceLoader externalResourceLoader) |
Modifier and Type | Method and Description |
---|---|
int |
addBookmark(String text,
int parent,
boolean childrenVisible,
float yPos)
Adds bookmark into PDF page.
|
void |
addFileLink(float[] position,
String fileName,
com.aspose.ms.System.Collections.ArrayList linkActions)
Adds a file link into a Pdf document.
|
void |
addFormField(aspose.pdf.form.PdfFormField field) |
void |
addNote(float[] position,
float[] windowPosition,
String content,
String heading,
String icon,
boolean open,
Attachment attachment)
Adds note into a Pdf document.
|
void |
addPageLink(float[] position,
int pageNumber,
int destinationType,
float targePosX,
float targetPosY,
com.aspose.ms.System.Collections.ArrayList linkActions)
Adds page link into a Pdf document.
|
void |
addPdfLink(float[] position,
String filename,
int pageNumber,
int destinationType,
com.aspose.ms.System.Collections.ArrayList linkActions,
boolean inNewWindow)
Adds a link to another Pdf document.
|
void |
addWebLink(float[] position,
String url,
com.aspose.ms.System.Collections.ArrayList linkActions)
Adds a web link into a Pdf document.
|
void |
arc(float[] arcData)
Draws a counterclockwise circular arc segment.
|
void |
attachFile(float[] position,
String[] fileInfo)
Attachs a file onto the Pdf document.
|
void |
attachFile(float[] position,
String[] fileInfo,
com.aspose.ms.System.IO.Stream stream)
Attachs a file or stream onto the Pdf document.
|
void |
circle(float x,
float y,
float r)
Draws a circle on given position with given radius.
|
void |
clip()
Uses the current path as clipping path.
|
void |
curveTo(float[] positionData)
Draws a curve from the current point, using three more control points.
|
void |
ellipse(float x1,
float y1,
float x2,
float y2) |
void |
encryptDocument(boolean strength,
String userPassword,
String ownerPassword,
int permissions) |
void |
fillStroke()
Fills the interior of the path with the current fill color and stroke.
|
String |
getPdfFileName() |
void |
rectangle(float[] rectangleData)
Draws a rectangle on specified position.
|
void |
rotate(float phi)
Rotates the user coordinate system by the given angle.
|
void |
roundRectangle(float x,
float y,
float w,
float h,
float r) |
void |
scale(float sx,
float sy)
Scales the coordinate system according to given ratio.
|
void |
setBorderColor(float[] value) |
void |
setBorderWidth(float value) |
void |
setColors(GeneratorBase gen,
GraphInfo graphInfo) |
void |
setFillRule(String value) |
void |
setFlatness(float value) |
void |
setLineCapMode(int value) |
void |
setLineJoinMode(int value) |
void |
setLineWidth(float value)
Sets the line width before draw a line.
|
void |
setMiterLimit(float value) |
void |
setOpenActionType(int value) |
void |
setOpenType(int value) |
void |
setPdfFileName(String value) |
void |
setpolyDash(PolyDashArray polyDashArray)
Sets a more complicated dash pattern defined by an array.
|
int |
setStandardFontAsCurrentOneAndGetItsSlot() |
void |
skew(float alpha,
float beta)
Skews the coordinate system according to the given degrees..
|
void |
strokeAndFill(GraphInfo graphInfo) |
void |
translate(float tx,
float ty)
Translates the origin of the coordinate system.
|
openImage, putImageInfoToOutStream, tryLoadCcitImage, tryLoadImageToResources
addPatternInResource, adjustPatternMatrix, beginTilingPattern, endTilingPattern, setColor, writeShadingGradientPattern
doReverse, doReverse, findOrLoadFont, findOrLoadRelevantFont, getFontDescender, getFontStreams, getLeading, getLengthOfBiggestWordLoadFontIfNecessary, getStringWidth, getTextRise, getTtFontFileName, isFontWarning, isFontWarning, isNeedInitRes, isNeedInitRes, isOverline, isOverline, isStrikeout, isStrikeout, isUnderline, isUnderline, loadSuitableCustomFontIfAbsentYet, loadSuitableFontIfNotYetAndGetStringWidth, reverseStringAndReturnEmptyStringIfNull, setCharSpacing, setCurrentFont, setCustomFonts, setDefaultFontName, setFont, setFontStreams, setFontStretch, setFontWeight, setHorizScaling, setLeading, setOverlineOffset, setSegmentDefaultFontName, setTextRenderingMode, setTextRise, setUnderlineOffset, setWordSpacing, showBoxedText, showOnPosition
adjustBuffer, adjustBuffer1, beginContentsSection, beginDict, beginObj, beginPage, beginPath, beginStream, close, closePath, compress, endContentSection, endDict, endObj, endPage, endPath, endStream, endText, getBuffer, isIdentityMatrix, lineTo, moveTo, newXobject, open, open, putToStream, putToStream, restoreState, restoreToState, saveState, setClippingArea, setDash, setFileName, setLineCap, stroke, writeEnquotedSting
allocID, checkScope, getCommon, getCompatibility, getCompressionLevel, getConformance, getCurrentMCID, getDocInfo, getDocObject, getDocResource, getEncryptionInfo, getHyperTextInfo, getLinearized, getPageInfo, getPageLayoutInfo, getState, isBuffered, isBuffered, setCompressionLevel, setConformance, setCurrentMCID, setCurrentStructElement, setLinearized
public int BookmarkDesPage
public com.aspose.ms.System.Collections.ArrayList BookmarkLinkActions
public GeneratorBase()
public GeneratorBase(IFontUriResolver externalFontResolver, IResourceLoader externalResourceLoader)
public String getPdfFileName()
public void setPdfFileName(String value)
public int setStandardFontAsCurrentOneAndGetItsSlot()
public int addBookmark(String text, int parent, boolean childrenVisible, float yPos)
Adds bookmark into PDF page.
text
- The text of the bookmark.parent
- The parent page ID.childrenVisible
- Whether the children are visible.yPos
- The y position that the bookmark point to.public void addPdfLink(float[] position, String filename, int pageNumber, int destinationType, com.aspose.ms.System.Collections.ArrayList linkActions, boolean inNewWindow)
Adds a link to another Pdf document.
position
- The annot position array.It should contains four float
value which means lower-left-x,lower-left-y,upper-right-x and
upper-right-y.filename
- The name of the file to be linked.pageNumber
- The page number to be linked.destinationType
- The type of the destination.public void addNote(float[] position, float[] windowPosition, String content, String heading, String icon, boolean open, Attachment attachment)
Adds note into a Pdf document.
position
- The annot position array.It should contains four float
value which means lower-left-x,lower-left-y,upper-right-x and
upper-right-y.windowPosition
- content
- The content of the note.heading
- The heading of the note.icon
- The note icon type.It can be
"comment","insert","note","paragraph", "newparagraph","key","help".open
- Whether to open the note when open page.public void attachFile(float[] position, String[] fileInfo)
Attachs a file onto the Pdf document.
position
- The annot position array.It should contains four float
value which means lower-left-x,lower-left-y,upper-right-x and
upper-right-y.fileInfo
- The file info array. The first member is the name of the
file to be attach. The senond member is the additional description of the
file. The third member is the author of the file. The fourth member is
the MIME type of the file to be attached. The last member is the type of
annot icon. It can be "graph","paperdip","pushpin","tag".public void attachFile(float[] position, String[] fileInfo, com.aspose.ms.System.IO.Stream stream)
Attachs a file or stream onto the Pdf document.
position
- The annot position array.It should contains four float
value which means lower-left-x,lower-left-y,upper-right-x and
upper-right-y.fileInfo
- The file info array. The first member is the name of the
file to be attach. The senond member is the additional description of the
file. The third member is the author of the file. The fourth member is
the MIME type of the file to be attached. The last member is the type of
annot icon. It can be "graph","paperdip","pushpin","tag".stream
- The stream you want to attache to the Pdf document. It is
null if you want to create attachement from file.public void addPageLink(float[] position, int pageNumber, int destinationType, float targePosX, float targetPosY, com.aspose.ms.System.Collections.ArrayList linkActions)
Adds page link into a Pdf document.
position
- The annot position array.It should contains four float
value which means lower-left-x,lower-left-y,upper-right-x and
upper-right-y.pageNumber
- The page number to be linked.destinationType
- The link destination type. It can be
"retain","fitpage", fitwidth","fitheight","fitbox".public void addFileLink(float[] position, String fileName, com.aspose.ms.System.Collections.ArrayList linkActions)
Adds a file link into a Pdf document.
position
- The annot position array.It should contains four float
value which means lower-left-x,lower-left-y,upper-right-x and
upper-right-y.fileName
- The name of the file to be linked.public void addWebLink(float[] position, String url, com.aspose.ms.System.Collections.ArrayList linkActions)
Adds a web link into a Pdf document.
position
- The annot position array.It should contains four float
value which means lower-left-x,lower-left-y,upper-right-x and
upper-right-y.url
- The url of the web link.public void setBorderWidth(float value)
public void setBorderColor(float[] value)
public void setOpenActionType(int value)
public void setOpenType(int value)
public void encryptDocument(boolean strength, String userPassword, String ownerPassword, int permissions)
@param strength
userPassword
- ownerPassword
- permissions
- public void addFormField(aspose.pdf.form.PdfFormField field)
public void curveTo(float[] positionData)
Draws a curve from the current point, using three more control points.
positionData
- The coordinates array,size is 6,which contains the coordinates of
the three control points.public void circle(float x, float y, float r)
Draws a circle on given position with given radius.
x
- The x-coordinate of the center of the circle.y
- The y-coordinate of the center of the circle.r
- The radius of the circle.public void ellipse(float x1, float y1, float x2, float y2)
public void arc(float[] arcData)
Draws a counterclockwise circular arc segment.
arcData
- An array with five float object that indicates the arc info.
public void rectangle(float[] rectangleData)
Draws a rectangle on specified position.
rectangleData
- An array contains four float number which indicate the rectangle info.
public void roundRectangle(float x, float y, float w, float h, float r)
public void setpolyDash(PolyDashArray polyDashArray)
Sets a more complicated dash pattern defined by an array.
dashData
- An array which contains alternating values for black and white dash lengths.public void setFlatness(float value)
public void setLineWidth(float value)
DocumentWriter
Sets the line width before draw a line.
setLineWidth
in class DocumentWriter
value
- the width value.public void setLineJoinMode(int value)
public void setLineCapMode(int value)
public void setMiterLimit(float value)
public void setFillRule(String value)
public void translate(float tx, float ty)
Translates the origin of the coordinate system.
tx
- The x-coordinate of the new origin of the coordinate system,measured in the old coordinate system.ty
- The y-coordinate of the new origin of the coordinate system,measured in the old coordinate system.public void fillStroke()
Fills the interior of the path with the current fill color and stroke.
public void clip()
Uses the current path as clipping path.
public void scale(float sx, float sy)
Scales the coordinate system according to given ratio.
sx
- The scale ratio on x diration.sy
- The scale ratio on y diration.public void rotate(float phi)
Rotates the user coordinate system by the given angle.
phi
- The rotation angle in degrees.public void skew(float alpha, float beta)
Skews the coordinate system according to the given degrees..
alpha
- The degree in x direction.beta
- The degree in y direction.
public void setColors(GeneratorBase gen, GraphInfo graphInfo)
public void strokeAndFill(GraphInfo graphInfo)
Copyright © 2016 Aspose. All Rights Reserved.