public interface IDocument
extends com.aspose.ms.System.IDisposable
interface representing PDF document
Modifier and Type | Method and Description |
---|---|
void |
afterImport()
Enumerate all registered annotations and call AfterImport for each of them.
|
void |
bindXml(InputStream stream)
Bind xml to document
|
void |
bindXml(String file)
Bind xml to document
|
void |
bindXml(String xmlFile,
String xslFile)
Bind xml/xsl to document
|
void |
changePasswords(String ownerPassword,
String newUserPassword,
String newOwnerPassword)
Changes document passwords.
|
boolean |
check(boolean doRepair)
Validates document.
|
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(Document.CallBackGetHocr callback,
boolean isTestVisible)
Convert document and save errors into the specified file.
|
boolean |
convert(Document.CallBackGetHocr callback,
boolean isTestVisible,
boolean isOriginalImage)
Convert document and save errors into the specified file.
|
boolean |
convert(OutputStream outputLogStream,
int format,
int action) |
boolean |
convert(PdfFormatConversionOptions options)
Convert document using specified conversion options
|
boolean |
convert(String outputLogFileName,
int format,
int action)
Convert document and save errors into the specified file.
|
boolean |
convert(String outputLogFileName,
int format,
int action,
int transparencyAction)
Convert document and save errors into the specified file.
|
boolean |
convertInternal(com.aspose.ms.System.IO.Stream log,
int _convertTo,
int none)
Internal method
|
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.
|
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.
|
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).
|
int |
getDuplex()
Gets or sets print duplex mode handling option to use when printing the file from the print
dialog.
|
EmbeddedFileCollection |
getEmbeddedFiles()
Gets collection of files embedded to document.
|
boolean |
getEmbedStandardFonts()
Property which declares that document must embed all standard Type1 fonts which has flag
IsEmbedded set into true.
|
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
|
Form |
getForm()
Gets Acro Form of the document.
|
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
|
NamedDestinationCollection |
getNamedDestinations()
Collection of Named Destination in the document.
|
int |
getNonFullScreenPageMode()
Gets page mode, specifying how to display the document on exiting full-screen mode.
|
Object |
getObjectById(String id)
Gets a object with specified ID in the document.
|
IAppointment |
getOpenAction()
Gets action performed at document opening.
|
boolean |
getOptimizeSize()
Gets optimization flag.
|
OutlineCollection |
getOutlines()
Gets document outlines.
|
PageInfo |
getPageInfo()
Gets the page info.
|
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 |
getPdfFormat() |
int |
getPermissions()
Gets permissions of the document.
|
String |
getVersion()
Gets a version of Pdf from Pdf file header.
|
void |
getXmpMetadata(OutputStream stream)
Get XMP metadata from document.
|
void |
importAnnotationsFromXfdf(String fileName)
Imports annotations from XFDF file to document.
|
boolean |
isAbsentFontTryToSubstitute()
Notification about missing fonts when processing documents
|
boolean |
isCenterWindow()
Gets flag specifying whether position of the document's window will be centerd on the screen.
|
boolean |
isDisplayDocTitle()
Gets flag specifying whether document's window title bar should display document title.
|
boolean |
isEncrypted()
Gets encrypted status of the document.
|
boolean |
isFitWindow()
Gets flag specifying whether document window must be resized to fit the first displayed page.
|
boolean |
isHideMenubar()
Gets flag specifying whether menu bar should be hidden when document is active.
|
boolean |
isHideToolBar()
Gets flag specifying whether toolbar should be hidden when document is active.
|
boolean |
isHideWindowUI()
Gets or sets flag specifying whether user interface elements should be hidden when document
is active.
|
boolean |
isLinearized()
Gets or sets a value indicating whether document is linearized.
|
boolean |
isManualDisposeEnabled()
By default method save close internal streams and release memory resources.
|
boolean |
isPdfaCompliant() |
boolean |
isPdfUaCompliant()
Gets the is document pdfua compliant.
|
boolean |
isXrefGapsAllowed()
Gets or sets the is document pdfa compliant.
|
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(OptimizationOptions strategy)
Optimize resources in the document according to defined optimization strategy.
|
void |
processParagraphs()
Stores document into stream.
|
void |
removeMetadata()
Removes metadata from the document.
|
void |
removePdfaCompliance()
Remove pdfa compliance from the document
|
void |
removePdfUaCompliance()
Remove pdfUa compliance from the document
|
void |
repair()
Repairs broken document.
|
void |
resumeUpdate()
resumeUpdate
|
void |
save()
Save document incrementally (i.e. using incremental update technique).
|
void |
save(OutputStream output)
Stores document into stream.
|
void |
save(OutputStream outputStream,
int format)
Save document
|
void |
save(OutputStream outputStream,
SaveOptions options)
Saves the document with a new name setting its save options.
|
void |
save(String outputFileName)
Saves document into the specified file.
|
void |
save(String outputFileName,
SaveOptions options)
Saves the document with a new name setting its save options.
|
void |
saveIncrementally(OutputStream output)
Saves incrementally the PDF Document to the specified stream.
|
void |
saveIncrementally(String outputFileName)
Saves incrementally the PDF Document to the specified stream.
|
void |
saveXml(String file)
Save document to XML.
|
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 |
setAbsentFontTryToSubstitute(boolean setAbsentFontTryToSubstitute)
Setting flag for set program determined font in case of absence font.
|
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)
Sets collection of document.
|
void |
setConvertMetadataAndCatalogOnly(boolean value)
Gets convert parameter for pdf/ua converter (Convert only Metadata and Document Catalog if set true)
|
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 |
setDuplex(int value)
Gets or sets print duplex mode handling option to use when printing the file from the print
dialog.
|
void |
setEmbedStandardFonts(boolean value)
Property which declares that document must embed all standard Type1 fonts which has flag
IsEmbedded set into true.
|
void |
setFitWindow(boolean value)
Sets flag specifying whether document window must be resized to fit the first displayed page.
|
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)
Set LayersAdded value
|
void |
setLinearized(boolean value)
Sets a value indicating whether document is linearized.
|
void |
setManualDisposeEnabled(boolean manualDisposeEnabled)
By default method save closes internal streams and release memory resources.
|
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.
|
void |
setPageLayout(int value)
Sets page layout which shall be used when the document is opened.
|
void |
setPageMode(int value)
Sets page mode, specifying how document should be displayed when opened.
|
void |
setTitle(String title)
Set Title for Pdf Document
|
void |
setXmpMetadata(InputStream stream)
Set XMP metadata of document.
|
void |
setXrefGapsAllowed(boolean value)
Gets or sets the is document pdfa compliant.
|
void |
suppressUpdate()
suppressUpdate
|
void |
updatePages()
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.
|
boolean isPdfaCompliant()
boolean isPdfUaCompliant()
Gets the is document pdfua compliant.
DestinationCollection getDestinations()
Gets the collection of destinations.
int getPdfFormat()
PdfFormat
void removePdfaCompliance()
Remove pdfa compliance from the document
Collection getCollection()
Gets collection of document.
void setCollection(Collection value)
value
- Collection objectcom.aspose.pdf.engine.IPdfDocument getEngineDoc()
Instance of IPdfDocument used to access to internal document structure. Internal only
String getVersion()
Gets a version of Pdf from Pdf file header.
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();
void setOpenAction(IAppointment value)
value
- IAppointment objectboolean getOptimizeSize()
void setOptimizeSize(boolean value)
value
- boolean valueboolean getIgnoreCorruptedObjects()
void setIgnoreCorruptedObjects(boolean value)
Object getCatalogValue(String key)
Returns item value from catalog dictionary.
key
- The key of item.boolean isHideToolBar()
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"); boolean value = document.isHideToolBar();
void setHideToolBar(boolean value)
Set flag specifying whether toolbar should be hidden when document is active.
value
- boolean valueboolean isHideMenubar()
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"); boolean value = document.isHideMenubar();
void setHideMenubar(boolean value)
Sets flag specifying whether menu bar should be hidden when document is active.
value
- boolean valueboolean isHideWindowUI()
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"); boolean value = document.isHideWindowUI();
void setHideWindowUI(boolean value)
Sets flag specifying whether user interface elements should be hidden when document is active.
value
- boolean valueboolean isFitWindow()
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"); boolean value = document.isFitWindow();
void setFitWindow(boolean value)
Sets flag specifying whether document window must be resized to fit the first displayed page.
value
- boolean valueboolean isCenterWindow()
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"); boolean value = document.isCenterWindow();
void setCenterWindow(boolean value)
Sets flag specifying whether position of the document's window will be centerd on the screen.
value
- boolean valueboolean isDisplayDocTitle()
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"); boolean value = document.isDisplayDocTitle();
void setDisplayDocTitle(boolean value)
Sets flag specifying whether document's window title bar should display document title.
value
- boolean valuePageCollection 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();
OutlineCollection getOutlines()
Gets document outlines.
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();
Form getForm()
Gets Acro Form of the document.
EmbeddedFileCollection getEmbeddedFiles()
Gets collection of files embedded to document.
int getDirection()
Gets reading order of text: L2R (left to right) or R2L (right to left).
Direction
void setDirection(int value)
Sets reading order of text: L2R (left to right) or R2L (right to left).
value
- Direction elementDirection
int getPageMode()
Gets page mode, specifying how document should be displayed when opened.
PageMode
void setPageMode(int value)
Sets page mode, specifying how document should be displayed when opened.
value
- PageMode elementPageMode
int getNonFullScreenPageMode()
Gets page mode, specifying how to display the document on exiting full-screen mode.
PageMode
void setNonFullScreenPageMode(int value)
Sets page mode, specifying how to display the document on exiting full-screen mode.
value
- PageMode elementPageMode
int getPageLayout()
Gets page layout which shall be used when the document is opened.
PageLayout
void setPageLayout(int value)
Sets page layout which shall be used when the document is opened.
value
- PageLayout elementPageLayout
int getDuplex()
Gets or sets print duplex mode handling option to use when printing the file from the print dialog.
PrintDuplex
void setDuplex(int value)
Gets or sets print duplex mode handling option to use when printing the file from the print dialog.
value
- PrintDuplex elementPrintDuplex
String getFileName()
Name of the PDF file that caused this document
void setLayersAdded(boolean value)
value
- boolean valuePageInfo getPageInfo()
void setPageInfo(PageInfo value)
value
- PageInfo objectDocumentInfo getInfo()
Gets document info.
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.)
RootElement getLogicalStructure()
Gets logical structure of the document.
void processParagraphs()
Stores document into stream.
void save(OutputStream output)
Stores document into stream.
output
- Stream where document shell be stored.void saveIncrementally(OutputStream output)
output
- OutputStream objectvoid save(String outputFileName)
Saves document into the specified file.
outputFileName
- Path to file where the document will be stored.void exportAnnotationsToXfdf(String fileName)
Exports all document annotations to XFDF file
fileName
- XFDF file namevoid sendTo(DocumentDevice device, OutputStream output)
Sends the whole document to the document device for processing.
device
- DocumentDevice objectoutput
- OutputStream objectvoid sendTo(DocumentDevice device, int fromPage, int toPage, OutputStream output)
Sends the certain pages of the document to the document device for processing.
device
- Document device which is used to process the document.fromPage
- The first page for processing.toPage
- The last page for processing.output
- Output stream contains the results of the document pages processing with given device.void sendTo(DocumentDevice device, String outputFileName)
Sends the whole document to the document device for processing.
device
- Document device which is used to process the document.outputFileName
- Output file name with the results of processing.void sendTo(DocumentDevice device, int fromPage, int toPage, String outputFileName)
Sends the whole document to the document device for processing.
device
- Document device which is used to process the document.fromPage
- The first page for processing.toPage
- The last page for processing.outputFileName
- Output file name with the results of processing.void removeMetadata()
Removes metadata from the document.
void importAnnotationsFromXfdf(String fileName)
Imports annotations from XFDF file to document.
fileName
- XFDF file nameboolean validate(String outputLogFileName, int format)
Validate document into the specified file.
outputLogFileName
- Path to file where the comments will be stored.format
- Pdf format.boolean validate(OutputStream outputLogStream, int format)
Validate document into the specified file.
outputLogStream
- Stream where the comments will be stored.format
- Pdf format.PdfFormat
boolean convert(String outputLogFileName, int format, int action, int transparencyAction)
Convert document and save errors into the specified file.
outputLogFileName
- Path to file where the comments will be stored.format
- The pdf format.action
- Action for objects that can not be convertedtransparencyAction
- Action for image masked objectsPdfFormat
,
ConvertErrorAction
,
ConvertTransparencyAction
boolean convert(String outputLogFileName, int format, int action)
Convert document and save errors into the specified file.
outputLogFileName
- Path to file where the comments will be stored.format
- Pdf format.action
- Action for objects that can not be convertedPdfFormat
,
ConvertErrorAction
boolean convert(PdfFormatConversionOptions options)
Convert document using specified conversion options
options
- set of options for convert PDF documentboolean convert(Document.CallBackGetHocr callback)
callback
- Action for objects that can not be convertedboolean convert(Document.CallBackGetHocr callback, boolean isTestVisible)
This is allow to show/hide searchable text on page. Default value is FALSE.
callback
- Action for objects that can not be convertedisTestVisible
- boolean valueboolean convert(Document.CallBackGetHocr callback, boolean isTestVisible, boolean isOriginalImage)
This is allow to show/hide searchable text on page. Default value is FALSE. This is allow to getting original image from pdf. Default value is FALSE.
callback
- Action for objects that can not be convertedisTestVisible
- boolean valueisOriginalImage
- boolean valueboolean convert(OutputStream outputLogStream, int format, int action)
void flatten()
Removes all fields from the document and place their values instead.
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.
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).CryptoAlgorithm
void encrypt(String userPassword, String ownerPassword, int permissions, int cryptoAlgorithm)
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.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).Permissions
,
CryptoAlgorithm
void changePasswords(String ownerPassword, String newUserPassword, String newOwnerPassword)
Changes document passwords. This action can be done only using owner password.
ownerPassword
- Owner password.newUserPassword
- New user password.newOwnerPassword
- New owner password.boolean isLinearized()
Gets or sets a value indicating whether document is linearized.
void setLinearized(boolean value)
Sets a value indicating whether document is linearized.
value
- boolean valuevoid decrypt()
Decrypts the document. Call then Save to obtain decrypted version of the document.
int getPermissions()
Gets permissions of the document.
boolean isEncrypted()
Gets encrypted status of the document. True if document is encrypted.
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.
void save()
Save document incrementally (i.e. using incremental update technique).
In order to save document incrementally we should open the document file for writing. Therefore Document must not be initialized with InputStream but with path to the file, like in the next code snippet: Document doc = new Document("document.pdf"); // make some changes and save the document incrementally doc.save();
In case when document was initialized with InputStream, writing to InputStream is impossible, so we recommend to use separate methods "save" to save document or "saveIncrementally" to save document incrementally.void saveIncrementally(String outputFileName)
outputFileName
- String valuevoid save(OutputStream outputStream, int format)
outputStream
- OutputStream objectformat
- SaveFormat valueSaveFormat
void save(String outputFileName, SaveOptions options)
Saves the document with a new name setting its save options.
outputFileName
- Path to file where the document will be stored.options
- Save options.void save(OutputStream outputStream, SaveOptions options)
Saves the document with a new name setting its save options.
outputStream
- OutputStream where the document will be stored.options
- Save options.Id getId()
Gets the ID.
com.aspose.pdf.engine.data.types.IPdfStreamAccessor getMetadataStream()
Returns raw metadata stream
void updatePages()
void suppressUpdate()
void resumeUpdate()
void dispose()
Closes all resources used by this document.
dispose
in interface com.aspose.ms.System.IDisposable
void close()
Closes all resources used by this document.
Color getBackground()
Gets the background color of the document.
void setBackground(Color value)
Sets the background color of the document.
value
- java.awt.Color objectCopier getDefaultCopier()
Returns copier used for coping pages to this document.
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.
void optimizeResources(OptimizationOptions strategy)
Optimize resources in the document according to defined optimization strategy.
strategy
- Optimization strategy.PageLabelCollection getPageLabels()
void freeMemory()
Clears memory
void afterImport()
Enumerate all registered annotations and call AfterImport for each of them.
void saveXml(String file)
Save document to XML.
file
- The document model xml filevoid bindXml(String xmlFile, String xslFile)
Bind xml/xsl to document
xmlFile
- The xml file.xslFile
- The xsl file if XSLT is used.Object getObjectById(String id)
Gets a object with specified ID in the document.
id
- The object id.void bindXml(InputStream stream)
Bind xml to document
stream
- The stream with xml filevoid bindXml(String file)
Bind xml to document
file
- The xml filevoid repair()
boolean getEmbedStandardFonts()
Property which declares that document must embed all standard Type1 fonts which has flag IsEmbedded set into true. All PDF fonts can be embedded into document simply via setting of flag IsEmbedded into true, but PDF standard Type1 fonts is an exception from this rule. Standard Type1 font embedding requires much time, so to embed these fonts it's necessary not only set flag IsEmbedded into true for specified font but also set an additiona flag on document's level - EmbedStandardFonts = true; This property can be set only one time for all fonts. By default false.
void setEmbedStandardFonts(boolean value)
Property which declares that document must embed all standard Type1 fonts which has flag IsEmbedded set into true. All PDF fonts can be embedded into document simply via setting of flag IsEmbedded into true, but PDF standard Type1 fonts is an exception from this rule. Standard Type1 font embedding requires much time, so to embed these fonts it's necessary not only set flag IsEmbedded into true for specified font but also set an additiona flag on document's level - EmbedStandardFonts = true; This property can be set only one time for all fonts. By default false.
value
- boolean valueboolean convertInternal(com.aspose.ms.System.IO.Stream log, int _convertTo, int none)
log
- Internal object_convertTo
- Internal objectnone
- Internal objectvoid getXmpMetadata(OutputStream stream)
Get XMP metadata from document.
stream
- Stream where metadata will be stored.void setXmpMetadata(InputStream stream)
Set XMP metadata of document.
stream
- Stream which contains XMP metadata.boolean isAbsentFontTryToSubstitute()
void setAbsentFontTryToSubstitute(boolean setAbsentFontTryToSubstitute)
setAbsentFontTryToSubstitute
- boolean valueboolean isXrefGapsAllowed()
Gets or sets the is document pdfa compliant.
void setXrefGapsAllowed(boolean value)
Gets or sets the is document pdfa compliant.
value
- boolean valueNamedDestinationCollection getNamedDestinations()
Collection of Named Destination in the document.
boolean check(boolean doRepair)
doRepair
- If true found issues will be repaired.void removePdfUaCompliance()
Remove pdfUa compliance from the document
void setConvertMetadataAndCatalogOnly(boolean value)
Gets convert parameter for pdf/ua converter (Convert only Metadata and Document Catalog if set true)
value
- boolean valuevoid setTitle(String title)
Set Title for Pdf Document
title
- Document's titleboolean isManualDisposeEnabled()
void setManualDisposeEnabled(boolean manualDisposeEnabled)
manualDisposeEnabled
- boolean value. (Default value == false)