Modifier and Type | Class and Description |
---|---|
static class |
com.aspose.pdf.ADocument.CallBackGetHocr
The call back procedure for hocr recognize.
|
Constructor and Description |
---|
DocumentWeb()
Initializes empty DocumentWeb.
|
DocumentWeb(InputStream input)
Initialize new DocumentWeb instance from the
input stream. |
DocumentWeb(InputStream input,
LoadOptions options)
Opens an existing DocumentWeb from a stream providing necessary converting to get pdf DocumentWeb.
|
DocumentWeb(InputStream input,
String password) |
DocumentWeb(Pdf pdf)
Initialize new DocumentWeb instance from the
pdf stream. |
DocumentWeb(com.aspose.ms.System.IO.Stream input)
Initialize new DocumentWeb instance from the
input stream. |
DocumentWeb(com.aspose.ms.System.IO.Stream input,
String password) |
DocumentWeb(String filename)
Just init DocumentWeb using
filename . |
DocumentWeb(String filename,
LoadOptions options) |
DocumentWeb(String filename,
String password)
Initializes new instance of the
DocumentWeb class for working with encrypted DocumentWeb. |
Modifier and Type | Method and Description |
---|---|
void |
changePasswords(String ownerPassword,
String newUserPassword,
String newOwnerPassword)
Changes document passwords.
|
void |
close()
Closes all resources used by this document.
|
boolean |
convert(Document.CallBackGetHocr callback)
Convert document and save errors into the specified file.
|
boolean |
convert(OutputStream outputLogStream,
int format,
int action)
Convert document and save errors into the specified stream.
|
boolean |
convert(String outputLogFileName,
int format,
int action)
Convert document and save errors into the specified file.
|
boolean |
convert(com.aspose.ms.System.Xml.XmlTextWriter xml,
int format,
boolean onlyValidation,
int action)
Convert the PDF Document and log results.
|
boolean |
convertInternal(com.aspose.ms.System.IO.Stream outputLogStream,
int format,
int action)
Convert document and save errors into the specified stream.
|
static void |
cutByRestriction(Iterable list) |
void |
decrypt()
Decrypts the document.
|
void |
dispose()
Closes all resources used by this document.
|
void |
encrypt(String userPassword,
String ownerPassword,
DocumentPrivilege privileges,
int cryptoAlgorithm,
boolean usePdf20)
Encrypts the document.
|
void |
encrypt(String userPassword,
String ownerPassword,
int permissions,
int cryptoAlgorithm)
Encrypts the document.
|
void |
encrypt(String userPassword,
String ownerPassword,
int permissions,
int cryptoAlgorithm,
boolean usePdf20)
Encrypts the document.
|
static void |
endOperation() |
void |
exportAnnotationsToXfdf(String fileName)
Exports all document annotations to XFDF file
|
void |
flatten()
Removes all fields from the document and place their values instead.
|
void |
freeMemory()
Clears memory
|
DocumentActionCollection |
getActions()
Gets document actions.
|
Color |
getBackground()
Gets the background color of the document.
|
Object |
getCatalogValue(String key)
Returns item value from catalog dictionary.
|
boolean |
getCenterWindow()
Gets flag specifying whether position of the document's window will be centerd on the screen.
|
Collection |
getCollection()
Gets collection of document.
|
int |
getCryptoAlgorithm()
Gets security settings if document is encrypted.
|
Copier |
getDefaultCopier()
Returns copier used for coping pages to this document.
|
DestinationCollection |
getDestinations()
Gets the collection of destinations.
|
int |
getDirection()
Gets reading order of text: L2R (left to right) or R2L (right to left).
|
boolean |
getDisplayDocTitle()
Gets flag specifying whether document's window title bar should display document title.
|
EmbeddedFileCollection |
getEmbeddedFiles()
Gets collection of files embedded to document.
|
com.aspose.pdf.engine.IPdfDocument |
getEngineDoc()
Instance of IPdfDocument used to access to internal document structure.
|
String |
getFileName()
Name of the PDF file that caused this document
|
boolean |
getFitWindow()
Gets flag specifying whether document window must be resized to fit the first displayed page.
|
int |
getFontReplaceBehavior()
Gets the TextEditOptions.FontReplace
|
Form |
getForm()
Gets Acro Form of the document.
|
boolean |
getHideMenubar()
Gets flag specifying whether menu bar should be hidden when document is active.
|
boolean |
getHideToolBar()
Gets flag specifying whether toolbar should be hidden when document is active.
|
boolean |
getHideWindowUI()
Gets or sets flag specifying whether user interface elements should be hidden when document is active.
|
Id |
getId()
Gets the ID.
|
boolean |
getIgnoreCorruptedObjects()
Gets or sets flag of ignoring errors in source files.
|
DocumentInfo |
getInfo()
Gets document info.
|
RootElement |
getLogicalStructure()
Gets logical structure of the document.
|
Metadata |
getMetadata()
Document metadata.
|
com.aspose.pdf.engine.data.types.IPdfStreamAccessor |
getMetadataStream()
Returns raw metadata stream
|
int |
getNonFullScreenPageMode()
Gets page mode, specifying how to display the document on exiting full-screen mode.
|
IAppointment |
getOpenAction()
Gets action performed at document opening.
|
boolean |
getOptimizeSize()
Gets optimization flag.
|
OutlineCollection |
getOutlines()
Gets document outlines.
|
PageInfo |
getPageInfo()
Gets the page info.(for generator only)
|
PageLabelCollection |
getPageLabels()
Gets page labels in the document.
|
int |
getPageLayout()
Gets page layout which shall be used when the document is opened.
|
int |
getPageMode()
Gets page mode, specifying how document should be displayed when opened.
|
PageCollection |
getPages()
Gets collection of document pages.
|
int |
getPdfaFormat() |
int |
getPermissions()
Gets permissions of the document.
|
String |
getVersion()
Gets a version of Pdf from Pdf file header.
|
void |
importAnnotationsFromXfdf(String fileName)
Imports annotations from XFDF file to document.
|
boolean |
isEncrypted()
Gets encrypted status of the document.
|
static boolean |
isLicensed() |
boolean |
isLinearized()
Gets or sets a value indicating whether document is linearized.
|
boolean |
isPdfaCompliant() |
void |
loadFromLegacyXML(String xmlFileName,
DocumentPrivilege[] privileges,
int[] outKeySize)
Loads internals of instance
Document class with legacy XML compatible with old generator. |
void |
optimize()
Linearize document in order to
- open the first page as quickly as possible;
- display next page or follow by link to the next page as quickly as possible;
- display the page incrementally as it arrives when data for a page is delivered over a slow channel (display the most useful data first);
- permit user interaction, such as following a link, to be performed even before the entire page has been received and displayed.
|
void |
optimizeResources()
Optimize resources in the document:
1.
|
void |
optimizeResources(Document.OptimizationOptions strategy)
Optimize resources in the document according to defined optimization strategy.
|
static void |
preSave(PageCollection pages) |
void |
removeMetadata()
Removes metadata from the document.
|
static void |
restrict(HashMap cache) |
static void |
restrict(com.aspose.ms.System.Collections.Hashtable cache) |
static void |
restrict(int index) |
static boolean |
restricted(int index) |
void |
resumeUpdate()
resumes document update
|
void |
save()
Save document incrementally (i.e.
|
void |
save(com.aspose.ms.System.IO.FileStream output) |
void |
save(javax.servlet.http.HttpServletResponse response,
String outputFileName,
int disposition,
SaveOptions options)
Saves the document to a response stream with a save options.
|
void |
save(OutputStream output)
Stores document into stream.
|
void |
save(OutputStream outputStream,
int format)
Saves the document with a new name along with a file format.
|
void |
save(OutputStream outputStream,
SaveOptions options) |
void |
save(String outputFileName)
Saves document into the specified file.
|
void |
save(String outputFileName,
int format)
Saves the document with a new name along with a file format.
|
void |
save(String outputFileName,
SaveOptions options)
Saves the document with a new name setting its save options.
|
void |
saveInternal(com.aspose.ms.System.IO.Stream output)
Stores document into stream.
|
void |
sendTo(DocumentDevice device,
int fromPage,
int toPage,
OutputStream output)
Sends the certain pages of the document to the document device for processing.
|
void |
sendTo(DocumentDevice device,
int fromPage,
int toPage,
String outputFileName)
Sends the whole document to the document device for processing.
|
void |
sendTo(DocumentDevice device,
OutputStream output)
Sends the whole document to the document device for processing.
|
void |
sendTo(DocumentDevice device,
String outputFileName)
Sends the whole document to the document device for processing.
|
void |
setBackground(Color value)
Sets the background color of the document.
|
void |
setCenterWindow(boolean value)
Sets flag specifying whether position of the document's window will be centerd on the screen.
|
void |
setCollection(Collection value) |
void |
setDirection(int value)
Sets reading order of text: L2R (left to right) or R2L (right to left).
|
void |
setDisplayDocTitle(boolean value)
Sets flag specifying whether document's window title bar should display document title.
|
void |
setFitWindow(boolean value)
Sets flag specifying whether document window must be resized to fit the first displayed page.
|
void |
setFontReplaceBehavior(int value)
Sets the TextEditOptions.FontReplace
|
void |
setHideMenubar(boolean value)
Sets flag specifying whether menu bar should be hidden when document is active.
|
void |
setHideToolBar(boolean value)
Set flag specifying whether toolbar should be hidden when document is active.
|
void |
setHideWindowUI(boolean value)
Sets flag specifying whether user interface elements should be hidden when document is active.
|
void |
setIgnoreCorruptedObjects(boolean value) |
void |
setLayersAdded(boolean value) |
void |
setLinearized(boolean value) |
void |
setNonFullScreenPageMode(int value)
Sets page mode, specifying how to display the document on exiting full-screen mode.
|
void |
setOpenAction(IAppointment value)
Sets action performed at document opening.
|
void |
setOptimizeSize(boolean value)
Sets optimization flag.
|
void |
setPageInfo(PageInfo value)
Sets the page info.(for generator only)
|
void |
setPageLayout(int value)
Sets page layout which shall be used when the document is opened.
|
void |
setPageMode(int pageMode)
Sets page mode, specifying how document should be displayed when opened.
|
static void |
startOperation() |
void |
suppressUpdate()
Suppresses update contents data for all pages
The contents is not updated until ResumeUpdate is called
|
void |
updatePages() |
boolean |
validate(OutputStream outputLogStream,
int format)
Validate document into the specified file.
|
boolean |
validate(String outputLogFileName,
int format)
Validate document into the specified file.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
changePasswords, convert, convert, convert, convertInternal, decrypt, dispose, encrypt, exportAnnotationsToXfdf, flatten, freeMemory, getActions, getBackground, getCenterWindow, getCollection, getCryptoAlgorithm, getDefaultCopier, getDirection, getDisplayDocTitle, getEmbeddedFiles, getEngineDoc, getFileName, getFitWindow, getFontReplaceBehavior, getForm, getHideMenubar, getHideToolBar, getHideWindowUI, getId, getInfo, getLogicalStructure, getMetadata, getMetadataStream, getNonFullScreenPageMode, getOpenAction, getOptimizeSize, getOutlines, getPageInfo, getPageLayout, getPageMode, getPages, getPermissions, getVersion, importAnnotationsFromXfdf, isEncrypted, isLinearized, optimize, optimizeResources, removeMetadata, resumeUpdate, save, save, save, save, save, save, save, saveInternal, sendTo, sendTo, sendTo, sendTo, setBackground, setCenterWindow, setCollection, setDirection, setDisplayDocTitle, setFitWindow, setFontReplaceBehavior, setHideMenubar, setHideToolBar, setHideWindowUI, setLinearized, setNonFullScreenPageMode, setOpenAction, setOptimizeSize, setPageInfo, setPageLayout, setPageMode, suppressUpdate, updatePages, validate
public DocumentWeb()
Initializes empty DocumentWeb.
public DocumentWeb(InputStream input)
Initialize new DocumentWeb instance from the input
stream.
input
- Stream with pdf DocumentWeb.public DocumentWeb(InputStream input, String password)
public DocumentWeb(com.aspose.ms.System.IO.Stream input)
Initialize new DocumentWeb instance from the input
stream.
input
- Stream with pdf DocumentWeb.public DocumentWeb(InputStream input, LoadOptions options)
Opens an existing DocumentWeb from a stream providing necessary converting to get pdf DocumentWeb.
input
- Input stream to convert into pdf DocumentWeb.options
- Represents properties for converting input
into pdf DocumentWeb.public DocumentWeb(String filename, LoadOptions options)
public DocumentWeb(com.aspose.ms.System.IO.Stream input, String password)
public DocumentWeb(String filename)
Just init DocumentWeb using filename
. The same as DocumentWeb(Stream)
.
filename
- The name of the pdf DocumentWeb file.public DocumentWeb(String filename, String password)
Initializes new instance of the DocumentWeb
class for working with encrypted DocumentWeb.
filename
- DocumentWeb file name.password
- User or owner password.public DocumentWeb(Pdf pdf) throws IOException
Initialize new DocumentWeb instance from the pdf
stream.
pdf
- Pdf DocumentWeb which came from Aspose.Pdf.Generator.IOException
public void save(javax.servlet.http.HttpServletResponse response, String outputFileName, int disposition, SaveOptions options)
Saves the document to a response stream with a save options.
response
- Encapsulates HTTP-response information.outputFileName
- Simple file name, i.e. without path.disposition
- Represents a MIME protocol Content-Disposition header.options
- Save options.public static boolean isLicensed()
public void setLayersAdded(boolean value)
public PageInfo getPageInfo()
getPageInfo
in interface IDocument
public void setPageInfo(PageInfo value)
setPageInfo
in interface IDocument
public int getFontReplaceBehavior()
getFontReplaceBehavior
in interface IDocument
public void setFontReplaceBehavior(int value)
setFontReplaceBehavior
in interface IDocument
public static boolean restricted(int index)
public static void restrict(int index)
public static void restrict(HashMap cache)
public static void restrict(com.aspose.ms.System.Collections.Hashtable cache)
public static void cutByRestriction(Iterable list)
public static void startOperation()
public static void endOperation()
public boolean isPdfaCompliant()
public DestinationCollection getDestinations()
Gets the collection of destinations.
public int getPdfaFormat()
public static void preSave(PageCollection pages)
public Collection getCollection()
Gets collection of document.
getCollection
in interface IDocument
public void setCollection(Collection value)
setCollection
in interface IDocument
public com.aspose.pdf.engine.IPdfDocument getEngineDoc()
IDocument
Instance of IPdfDocument used to access to internal document structure. Internal only
getEngineDoc
in interface IDocument
public String getVersion()
Gets a version of Pdf from Pdf file header.
getVersion
in interface IDocument
public IAppointment getOpenAction()
Gets action performed at document opening.
Example demonstrates how to get CenterWindow flag:Document document = new Document("sample.pdf"); IAppointment value = document.getOpenAction();
getOpenAction
in interface IDocument
public void setOpenAction(IAppointment value)
Sets action performed at document opening.
setOpenAction
in interface IDocument
public boolean getHideToolBar()
Gets flag specifying whether toolbar should be hidden when document is active.
Example demonstrates how to get HideToolBar flag:Document document = new Document("sample.pdf"); booleanvalue = document.getHideToolBar();
getHideToolBar
in interface IDocument
public void setHideToolBar(boolean value)
Set flag specifying whether toolbar should be hidden when document is active.
setHideToolBar
in interface IDocument
public boolean getHideMenubar()
Gets flag specifying whether menu bar should be hidden when document is active.
Example demonstrates how to get HideMenubar flag:Document document = new Document("sample.pdf"); booleanvalue = document.getHideMenubar();
getHideMenubar
in interface IDocument
public void setHideMenubar(boolean value)
Sets flag specifying whether menu bar should be hidden when document is active.
setHideMenubar
in interface IDocument
public boolean getHideWindowUI()
Gets or sets flag specifying whether user interface elements should be hidden when document is active.
Example demonstrates how to get HideWindowUI flag:Document document = new Document("sample.pdf"); booleanvalue = document.getHideWindowUI();
getHideWindowUI
in interface IDocument
public void setHideWindowUI(boolean value)
Sets flag specifying whether user interface elements should be hidden when document is active.
setHideWindowUI
in interface IDocument
public boolean getFitWindow()
Gets flag specifying whether document window must be resized to fit the first displayed page.
Example demonstrates how to get FitWindow flag:Document document = new Document("sample.pdf"); booleanvalue = document.getFitWindow();
getFitWindow
in interface IDocument
public void setFitWindow(boolean value)
Sets flag specifying whether document window must be resized to fit the first displayed page.
setFitWindow
in interface IDocument
public boolean getCenterWindow()
Gets flag specifying whether position of the document's window will be centerd on the screen.
Example demonstrates how to get CenterWindow flag:Document document = new Document("sample.pdf"); booleanvalue = document.getCenterWindow();
getCenterWindow
in interface IDocument
public void setCenterWindow(boolean value)
Sets flag specifying whether position of the document's window will be centerd on the screen.
setCenterWindow
in interface IDocument
public boolean getDisplayDocTitle()
Gets flag specifying whether document's window title bar should display document title.
Example demonstrates how to get DisplayDocTitle flag:Document document = new Document("sample.pdf"); booleanvalue = document.getDisplayDocTitle();
getDisplayDocTitle
in interface IDocument
public void setDisplayDocTitle(boolean value)
Sets flag specifying whether document's window title bar should display document title.
setDisplayDocTitle
in interface IDocument
public PageCollection getPages()
Gets collection of document pages. Note that pages are numbered from 1 in collection.
Example below demonstrates how to operate with the document pages: How to obtain number of pages and how to obtain rectangle of starting page of the document.Document document = new Document("sample.pdf"); Pages pages = document.getPages(); System.out.println("Document contains " + pages.size()); Page page = pages.get_Item(1); Rectangle rect = page.getRect();
public OutlineCollection getOutlines()
Gets document outlines.
getOutlines
in interface IDocument
public DocumentActionCollection getActions()
Gets document actions. This property is instance of DocumentActions class which allows to get/set BeforClosing, BeforSaving, etc. actions.
This example demonstrates how to obtain after open action of the document:Document document = new Document("PdfWithOpenAction.pdf"); DocumentActions actions = document.getActions(); com.aspose.pdf.Action afterSavingAction = actions.getAfterSaving();
getActions
in interface IDocument
public Form getForm()
Gets Acro Form of the document.
public EmbeddedFileCollection getEmbeddedFiles()
Gets collection of files embedded to document.
getEmbeddedFiles
in interface IDocument
public int getDirection()
Gets reading order of text: L2R (left to right) or R2L (right to left).
getDirection
in interface IDocument
public void setDirection(int value)
Sets reading order of text: L2R (left to right) or R2L (right to left).
setDirection
in interface IDocument
public int getPageMode()
Gets page mode, specifying how document should be displayed when opened.
getPageMode
in interface IDocument
public void setPageMode(int pageMode)
Sets page mode, specifying how document should be displayed when opened.
setPageMode
in interface IDocument
public int getNonFullScreenPageMode()
Gets page mode, specifying how to display the document on exiting full-screen mode.
getNonFullScreenPageMode
in interface IDocument
public void setNonFullScreenPageMode(int value)
Sets page mode, specifying how to display the document on exiting full-screen mode.
setNonFullScreenPageMode
in interface IDocument
public int getPageLayout()
Gets page layout which shall be used when the document is opened.
getPageLayout
in interface IDocument
public void setPageLayout(int value)
Sets page layout which shall be used when the document is opened.
setPageLayout
in interface IDocument
public String getFileName()
Name of the PDF file that caused this document
getFileName
in interface IDocument
public DocumentInfo getInfo()
Gets document info.
public Metadata getMetadata()
Document metadata. (A PDF document may include general information, such as the document�s title, author, and creation and modification dates. Such global information about the document (as opposed to its content or structure) is called metadata and is intended to assist in cataloguing and searching for documents in external databases.)
getMetadata
in interface IDocument
public RootElement getLogicalStructure()
Gets logical structure of the document.
getLogicalStructure
in interface IDocument
public void saveInternal(com.aspose.ms.System.IO.Stream output)
Stores document into stream.
saveInternal
in interface IDocument
output
- Stream where document shell be stored.public void save(OutputStream output)
Stores document into stream.
public void save(String outputFileName)
Saves document into the specified file.
public void save(com.aspose.ms.System.IO.FileStream output)
public void exportAnnotationsToXfdf(String fileName)
Exports all document annotations to XFDF file
exportAnnotationsToXfdf
in interface IDocument
fileName
- XFDF file namepublic void sendTo(DocumentDevice device, OutputStream output)
Sends the whole document to the document device for processing.
public void sendTo(DocumentDevice device, int fromPage, int toPage, OutputStream output)
Sends the certain pages of the document to the document device for processing.
public void sendTo(DocumentDevice device, String outputFileName)
Sends the whole document to the document device for processing.
public void sendTo(DocumentDevice device, int fromPage, int toPage, String outputFileName)
Sends the whole document to the document device for processing.
public void removeMetadata()
Removes metadata from the document.
removeMetadata
in interface IDocument
public void importAnnotationsFromXfdf(String fileName)
Imports annotations from XFDF file to document.
importAnnotationsFromXfdf
in interface IDocument
fileName
- XFDF file namepublic boolean validate(String outputLogFileName, int format)
Validate document into the specified file.
public boolean convert(String outputLogFileName, int format, int action)
Convert document and save errors into the specified file.
public boolean validate(OutputStream outputLogStream, int format)
Validate document into the specified file.
outputLogStream
- Stream where the comments will be stored.format
- Pdf format.public boolean convert(Document.CallBackGetHocr callback)
callback
- Action for objects that can not be convertedpublic boolean convertInternal(com.aspose.ms.System.IO.Stream outputLogStream, int format, int action)
Convert document and save errors into the specified stream.
convertInternal
in interface IDocument
outputLogStream
- Stream where the comments will be stored.format
- Pdf format.action
- Action for objects that can not be convertedpublic boolean convert(OutputStream outputLogStream, int format, int action)
Convert document and save errors into the specified stream.
public boolean convert(com.aspose.ms.System.Xml.XmlTextWriter xml, int format, boolean onlyValidation, int action)
public void flatten()
Removes all fields from the document and place their values instead.
public int getCryptoAlgorithm()
Gets security settings if document is encrypted. If document is not encrypted then corresponding exception will be raised in .net 1.1 or CryptoAlgorithm will be null for other .net versions.
getCryptoAlgorithm
in interface IDocument
public void encrypt(String userPassword, String ownerPassword, DocumentPrivilege privileges, int cryptoAlgorithm, boolean usePdf20)
Encrypts the document. Call then Save to get encrypted version of the document.
userPassword
- User password.ownerPassword
- Owner password.privileges
- Document permissions, see Permissions
for details.cryptoAlgorithm
- Cryptographic algorithm, see CryptoAlgorithm
for details.usePdf20
- Support for revision 6 (Extension 8).public void encrypt(String userPassword, String ownerPassword, int permissions, int cryptoAlgorithm)
Encrypts the document. Call then Save to get encrypted version of the document.
public void encrypt(String userPassword, String ownerPassword, int permissions, int cryptoAlgorithm, boolean usePdf20)
Encrypts the document. Call then Save to get encrypted version of the document.
userPassword
- User password.ownerPassword
- Owner password.permissions
- Document permissions, see Permissions
for details.cryptoAlgorithm
- Cryptographic algorithm, see CryptoAlgorithm
for details.usePdf20
- Support for revision 6 (Extension 8).public void changePasswords(String ownerPassword, String newUserPassword, String newOwnerPassword)
Changes document passwords. This action can be done only using owner password/>.
changePasswords
in interface IDocument
ownerPassword
- Owner password.newUserPassword
- New user password.newOwnerPassword
- New owner password.public void loadFromLegacyXML(String xmlFileName, DocumentPrivilege[] privileges, int[] outKeySize)
Loads internals of instance Document
class with legacy XML compatible with old generator.
xmlFileName
- Legacy XML file name.public boolean isLinearized()
Gets or sets a value indicating whether document is linearized.
isLinearized
in interface IDocument
public void setLinearized(boolean value)
setLinearized
in interface IDocument
public void decrypt()
Decrypts the document. Call then Save to obtain decrypted version of the document.
public int getPermissions()
Gets permissions of the document.
getPermissions
in interface IDocument
public boolean isEncrypted()
Gets encrypted status of the document. True if document is encrypted.
isEncrypted
in interface IDocument
public void optimize()
Linearize document in order to - open the first page as quickly as possible; - display next page or follow by link to the next page as quickly as possible; - display the page incrementally as it arrives when data for a page is delivered over a slow channel (display the most useful data first); - permit user interaction, such as following a link, to be performed even before the entire page has been received and displayed. Invoking this method doesn't actually saves the document. On the contrary the document only is prepared to have optimized structure, call then Save to get optimized document.
public void save()
Save document incrementally (i.e. using incremental update technque).
public void save(String outputFileName, int format)
Saves the document with a new name along with a file format.
outputFileName
- Path to file where the document will be stored.format
- Format options.public void save(OutputStream outputStream, int format)
Saves the document with a new name along with a file format.
save
in interface IDocument
outputStream
- Stream where the document will be stored.format
- Format options.com.aspose.ms.System.ArgumentException
- ArgumentException
when HtmlSaveOptions
is passed to a method. Save a document to the html stream is not supported. Please use method save to the file.public void save(String outputFileName, SaveOptions options)
Saves the document with a new name setting its save options.
public void save(OutputStream outputStream, SaveOptions options)
public com.aspose.pdf.engine.data.types.IPdfStreamAccessor getMetadataStream()
Returns raw metadata stream
getMetadataStream
in interface IDocument
public void updatePages()
updatePages
in interface IDocument
public void suppressUpdate()
suppressUpdate
in interface IDocument
public void resumeUpdate()
resumeUpdate
in interface IDocument
public void close()
Closes all resources used by this document.
public void dispose()
Closes all resources used by this document.
public Color getBackground()
Gets the background color of the document.
getBackground
in interface IDocument
public void setBackground(Color value)
Sets the background color of the document.
setBackground
in interface IDocument
public Copier getDefaultCopier()
Returns copier used for coping pages to this document.
getDefaultCopier
in interface IDocument
public void optimizeResources()
Optimize resources in the document: 1. Resources which are not used on the document pages are removed; 2. Equal resources are joined into one object; 3. Unused objects are deleted.
optimizeResources
in interface IDocument
public void optimizeResources(Document.OptimizationOptions strategy)
Optimize resources in the document according to defined optimization strategy.
strategy
- Optimization strategy.public boolean getOptimizeSize()
getOptimizeSize
in interface IDocument
public void setOptimizeSize(boolean value)
setOptimizeSize
in interface IDocument
public boolean getIgnoreCorruptedObjects()
public void setIgnoreCorruptedObjects(boolean value)
public Object getCatalogValue(String key)
Returns item value from catalog dictionary.
key
- The key of item.public PageLabelCollection getPageLabels()
public void freeMemory()
Clears memory
freeMemory
in interface IDocument
Copyright © 2014 Aspose. All Rights Reserved.