|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.aspose.pdf.elements.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. |
void |
bindFo(java.io.InputStream foStream)
Binds fo file as InputSteam. |
void |
bindFo(java.io.InputStream xmlStream,
java.io.InputStream xsltStream)
Binds xml file and according xsl file as InputStream to be converted. |
static Pdf |
bindXML(java.io.InputStream xmlStream)
Reads info from an xml document. |
int |
getFirstLineIndent()
Gets an int value that indicates the indent of the first line. |
static java.lang.String |
getFoImagePath()
Sets an image path to system image path. |
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. |
int |
getPageDuration()
Gets a int value that indicates the duration in seconds for the current page. |
PageSetup |
getPageSetup()
Gets a PageSetup object that indicates the page setup info in the Pdf document. |
int |
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. |
TextInfo |
getTextInfo()
Gets a TextInfo object that indicates the text info in the Pdf document. |
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 |
setFirstLineIndent(int indent)
Sets an int value that indicates the indent of the first line. |
static void |
setFoImagePath(java.lang.String path)
Sets an image path to system image path. |
void |
setGraphInfo(GraphInfo graphInfo)
Sets a GraphInfo object that indicates the graph info in the Pdf document. |
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 |
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(int 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 m_security)
Sets a Security object that indicates the document security information. |
void |
setTextInfo(TextInfo textInfo)
Sets a TextInfo object that indicates the text info in the Pdf document. |
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")));
Method Detail |
public static void setFoImagePath(java.lang.String path)
path
- The path to set.public static java.lang.String getFoImagePath()
public void bindFo(java.io.InputStream foStream) throws AsposeBaseException
[SampleCode] Pdf docConvert = new Pdf(); docConvert.bindFo(new FileInputStream(new File("../fofile/helloworld.fo"))); docConvert.save(new FileOutputStream(new File("./helloworld.pdf")));
foStream
- Format-Object file as InputStream to be converted
AsposeBaseException
public void bindFo(java.io.InputStream xmlStream, java.io.InputStream xsltStream) throws AsposeBaseException
[SampleCode] Pdf docConvert = new Pdf(); docConvert.bindFo(new FileInputStream(new File("../fofile/glossary.xml")), new FileInputStream(new File("../fofile/glossary.xsl"))); docConvert.save(new FileOutputStream(new File("./glossary.pdf")));
xmlStream
- xml file streamxsltStream
- xslt file stream
AsposeBaseException
public static Pdf bindXML(java.io.InputStream xmlStream) throws javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException
xmlStream
-
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
public void setSections(Sections secs)
public Sections getSections()
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)
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 m_security)
m_security
- The Security to set.public int getPageTransition()
public Pdf setPageTransition(int transition)
transition
- The PageTransition to set.public int getPageDuration()
public void setPageDuration(int duration)
duration
- The PageDuration to set.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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |