|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.aspose.pdf.elements.Pdf
public class Pdf
Represents the Pdf document.
Constructor Summary | |
---|---|
Pdf()
Initialize a new instance of the Pdf class. |
Method Summary | |
---|---|
void |
addAuthor(java.lang.String author)
Sets a string that indicates the author name of the Pdf document. |
void |
addCreator(java.lang.String creator)
Sets a string that indicates the creator of the Pdf document. |
void |
addKeywords(java.lang.String keyWords)
Sets a string that indicates key words of the Pdf document. |
void |
addProducer(java.lang.String producer)
Sets a string that indicates Producer of the Pdf document. |
void |
addSubject(java.lang.String subject)
Sets a string that indicates the subject of the Pdf document. |
void |
addTitle(java.lang.String title)
Sets a string that indicates the title of the Pdf document. |
static Pdf |
bindXML(java.io.InputStream xmlStream)
Reads info from an xml document. |
static Pdf |
bindXMLByDom(java.io.InputStream xmlStream)
Reads info from an xml document. |
Color |
getBackgroundColor()
Gets a Color object that indicates the background color of the pdf. |
java.lang.String |
getBackgroundImageFile()
Gets a string that indicates the background image file name. |
float |
getBackgroundImageFixedHeight()
Gets a float value that indicates the fixed height of the background image. |
float |
getBackgroundImageFixedWidth()
Gets a float value that indicates the fixed width of the background image. |
int |
getBookMarkLevel()
Gets or sets a int value that indicates how many levels of Heading of the pdf document is to be bookmarked. The default value is 0, which means every heading of the PDF is to be taged as a bookmark. |
DestinationType |
getDestinationType()
Gets a DestinationType value that indicates the document open action. |
int |
getFirstLineIndent()
Gets an int value that indicates the indent of the first line. |
GraphInfo |
getGraphInfo()
Gets a GraphInfo object that indicates the graph info in the Pdf document. |
java.lang.String |
getHeadingCaption(int headingLevel,
int headingType,
boolean isPrefixed)
Gets the heading caption at a heading level. |
HeadingInfo |
getHeadingInfo()
Gets the heading info object of the pdf document. |
JavaScripts |
getJavaScripts()
Gets a JavaScripts object that indicates the JavaScripts to be added into the PDF. |
java.lang.Object |
getObjectByID(java.lang.String ID)
Gets a object with specified ID in the document. |
OpenType |
getOpenType()
Gets an OpenType that indicates the document open type. |
int |
getPageDuration()
Gets a int value that indicates the duration in seconds for the current page. This property is used when using auto advancing in presentation mode. |
PageSetup |
getPageSetup()
Gets a PageSetup object that indicates the page setup info in the Pdf document. |
PageTransitionType |
getPageTransition()
Gets a PageTransitionType that indicates the pdf document page transition type. |
Sections |
getSections()
Gets a Sections collection that indicates all sections in the Pdf document. |
Security |
getSecurity()
Gets a Security object that indicates the document security information. |
float |
getSpaceBetweenParagraphs()
Gets a float value that indicates the space between two consecutive paragraphs. |
TextInfo |
getTextInfo()
Gets a TextInfo object that indicates the text info in the Pdf document. |
boolean |
isBackgroundImageBlackWhite()
Gets a bool value that indicates whether the image is forced to be black-and-white. |
boolean |
isBookmarked()
Gets or sets a bool value that indicates whether the pdf document is bookmarked when generating PDF document. The default value is false. |
boolean |
isImageLeftSpaceReserved()
Get the value which indicates whether the space in one page which is left by an Image(because the space is not enough to hold it) is reserved. |
boolean |
isImagesInXmlDeleteNeeded()
Gets a boolean value that indicates whether images used in XML be deleted when the PDF document is generated. |
boolean |
isPageNumberRestarted()
Gets a bool value that indicates whether the page number is restarted in new section. |
boolean |
isSpaced()
Gets a bool value that indicates whether the spaces at the begin of the text and returns in the text be shown. |
void |
resetNumber(int position)
Resets all heading number after given position. |
void |
save(java.io.OutputStream out)
Saves the converted pdf stream. |
void |
setBackgroundColor(Color color)
Sets a Color object that indicates the background color of the pdf. |
void |
setBackgroundImageBlackWhite(boolean backgroundImageBlackWhite)
Sets a bool value that indicates whether the image is forced to be black-and-white. |
void |
setBackgroundImageFile(java.lang.String imageFile)
Sets a string that indicates the background image file name. |
void |
setBackgroundImageFixedHeight(float imageFixedHeight)
Sets a float value that indicates the fixed height of the background image. |
void |
setBackgroundImageFixedWidth(float imageFixedWidth)
Sets a float value that indicates the fixed width of the background image. |
void |
setBookmarked(boolean isBookmarked)
|
void |
setBookMarkLevel(int bookMarkLevel)
|
void |
setDestinationType(DestinationType type)
Sets a DestinationType value that indicates the document open action. |
void |
setFirstLineIndent(int indent)
Sets an int value that indicates the indent of the first line. |
void |
setGraphInfo(GraphInfo graphInfo)
Sets a GraphInfo object that indicates the graph info in the Pdf document. |
void |
setImageLeftSpaceReserved(boolean imageLeftSpaceReserved)
Set the value which indicates whether the space in one page which is left by an Image(because the space is not enough to hold it) is reserved. |
void |
setImagesInXmlDeleteNeeded(boolean imagesInXmlDeleteNeeded)
Sets a boolean value that indicates whether images used in XML be deleted when the PDF document is generated. |
void |
setIsSpaced(boolean isSpaced)
Sets a bool value that indicates whether the spaces at the begin of the text and returns in the text be shown. |
void |
setJavaScripts(JavaScripts scripts)
Sets a JavaScripts object that indicates the JavaScripts to be added into the PDF. |
void |
setOpenType(OpenType type)
Sets an OpenType that indicates the document open type. |
void |
setPageDuration(int duration)
Sets a int value that indicates the duration in seconds for the current page. |
Pdf |
setPageNumberRestarted(boolean pageNumberRestarted)
Gets a bool value that indicates whether the page number is restarted in new section. |
void |
setPageSetup(PageSetup pageSetup)
Sets a PageSetup object that indicates the page setup info in the Pdf document. |
Pdf |
setPageTransition(PageTransitionType transition)
Sets a PageTransitionType that indicates the pdf document page transition type. |
void |
setSections(Sections secs)
Sets a Sections collection that indicates all sections in the Pdf document. |
Pdf |
setSecurity(Security security)
Sets a Security object that indicates the document security information. |
void |
setSpaceBetweenParagraphs(float space)
Sets a float value that indicates the space between two consecutive paragraphs. |
void |
setTextInfo(TextInfo textInfo)
Sets a TextInfo object that indicates the text info in the Pdf document. |
static java.lang.String |
version()
Gets the version of Aspose Pdf. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Pdf() throws AsposeBaseException
[SampleCode] Pdf pdf = new Pdf(); Section sec1 = pdf.getSections().add(); Text text1 = new Text(sec1,"Hello World, this is my first pdf."); sec1.getParagraphs().add(text1); pdf.save(new FileOutputStream(new File("./HelloWorldExample.pdf")));
AsposeBaseException
Method Detail |
---|
public static Pdf bindXML(java.io.InputStream xmlStream) throws javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException, java.io.IOException
xmlStream
-
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.io.IOException
public static Pdf bindXMLByDom(java.io.InputStream xmlStream) throws javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException, java.io.IOException
xmlStream
-
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.io.IOException
public void setSections(Sections secs)
public Sections getSections()
public java.lang.Object getObjectByID(java.lang.String ID)
public void setPageSetup(PageSetup pageSetup)
public PageSetup getPageSetup()
public int getFirstLineIndent()
public void setFirstLineIndent(int indent)
public boolean isSpaced()
public void setIsSpaced(boolean isSpaced)
public TextInfo getTextInfo()
public void setTextInfo(TextInfo textInfo)
public void addAuthor(java.lang.String author)
author
- The author name to set.public void addSubject(java.lang.String subject)
subject
- The subject to set.public void addCreator(java.lang.String creator)
public void addKeywords(java.lang.String keyWords)
public void addTitle(java.lang.String title)
title
- The title of the Pdf Document to set.public void addProducer(java.lang.String producer)
public GraphInfo getGraphInfo()
public void setGraphInfo(GraphInfo graphInfo)
graphInfo
- The GraphInfo to set.public boolean isPageNumberRestarted()
public Pdf setPageNumberRestarted(boolean pageNumberRestarted)
pageNumberRestarted
- The IsPageNumberRestarted to set.public java.lang.String getHeadingCaption(int headingLevel, int headingType, boolean isPrefixed)
headingLevel
- The heading level.headingType
- The heading caption representation style.isPrefixed
- The form of the heading caption.HeadingType
public void resetNumber(int position)
position
- The given position.public HeadingInfo getHeadingInfo()
public Security getSecurity()
public Pdf setSecurity(Security security)
security
- The Security to set.public PageTransitionType getPageTransition()
public Pdf setPageTransition(PageTransitionType transition)
transition
- The PageTransition to set.public int getPageDuration()
public void setPageDuration(int duration)
duration
- The PageDuration to set.public OpenType getOpenType()
public void setOpenType(OpenType type)
public DestinationType getDestinationType()
public void setDestinationType(DestinationType type)
public int getBookMarkLevel()
public void setBookMarkLevel(int bookMarkLevel)
public boolean isBookmarked()
public void setBookmarked(boolean isBookmarked)
public void save(java.io.OutputStream out) throws AsposeBaseException
out
- The OutputStream that the converted result to be saved to.
javax.xml.transform.TransformerException
AsposeBaseException
public static java.lang.String version()
public Color getBackgroundColor()
public void setBackgroundColor(Color color)
public java.lang.String getBackgroundImageFile()
public void setBackgroundImageFile(java.lang.String imageFile)
imageFile
- The BackgroundImageFile to set.public float getBackgroundImageFixedWidth()
public void setBackgroundImageFixedWidth(float imageFixedWidth)
imageFixedWidth
- The BackgroundImageFixedWidth to set.public float getSpaceBetweenParagraphs()
public void setSpaceBetweenParagraphs(float space)
public float getBackgroundImageFixedHeight()
public void setBackgroundImageFixedHeight(float imageFixedHeight)
imageFixedHeight
- The BackgroundImageFixedHeight to set.public boolean isBackgroundImageBlackWhite()
public void setBackgroundImageBlackWhite(boolean backgroundImageBlackWhite)
backgroundImageBlackWhite
- The IsBackgroundImageBlackWhite to set.public JavaScripts getJavaScripts()
public void setJavaScripts(JavaScripts scripts)
public boolean isImageLeftSpaceReserved()
public void setImageLeftSpaceReserved(boolean imageLeftSpaceReserved)
public boolean isImagesInXmlDeleteNeeded()
public void setImagesInXmlDeleteNeeded(boolean imagesInXmlDeleteNeeded)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |