![]() |
||
Home Products Purchase Downloads Demos Forums Blogs Ticket Wiki API Corporate |
|
||||||||||
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 |
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. |
PageSetup |
getDefaultPageSetup()
Gets a PageSetup object that indicates the page setup info in the Pdf 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. |
Sections |
getSections()
Gets a Sections collection that indicates all sections in the Pdf document. |
TextInfo |
getTextInfo()
Gets a TextInfo object that indicates the text info in the Pdf document. |
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 |
save(java.io.OutputStream out)
Saves the converted pdf stream. |
void |
save(java.io.OutputStream out,
java.util.Map metainfo)
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 |
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 |
setPageSetup(PageSetup pageSetup)
Sets a PageSetup object that indicates the page setup info in the Pdf document. |
void |
setSections(Sections secs)
Sets a Sections collection that indicates all sections in the Pdf document. |
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 void setSections(Sections secs)
public Sections getSections()
public void setPageSetup(PageSetup pageSetup)
public PageSetup getDefaultPageSetup()
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 save(java.io.OutputStream out, java.util.Map metainfo) throws AsposeBaseException
out
- the OutputStream that the converted result to be saved to.
AsposeBaseException
public void save(java.io.OutputStream out) throws AsposeBaseException
javax.xml.transform.TransformerException
AsposeBaseException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |