Package | Description |
---|---|
com.aspose.pdf |
The
com.aspose.pdf is a root package for all classes of Aspose.PDF for Java library
which are either directly in it like Document or indirectly through several
subpackages. |
Modifier and Type | Field and Description |
---|---|
UnifiedSaveOptions.ConversionProgressEventHandler |
DocSaveOptions.CustomProgressHandler
This handler can be used to handle conversion progress events f.e. it can be used to show
progress bar or messages about current amount of processed pages, example of handler's code
that shows progress on console is :
public static void convertWithShowingProgress()
{
(new License()).setLicense("License\\Aspose.Total.lic");
Document doc = new Document("Booklet.pdf");
HtmlSaveOptions saveOptions = new HtmlSaveOptions();
saveOptions.setCustomProgressHandler ( new HtmlSaveOptions.conversionProgressEventHandler(ShowProgressOnConsole));
doc.save("Booklet.doc", saveOptions);
System.in.read();
}
public static void showProgressOnConsole(HtmlSaveOptions.ProgressEventHandlerInfo eventInfo)
{
switch (eventInfo.getEventType())
{
case HtmlSaveOptions.ProgressEventType.TotalProgress:
Console.WriteLine("%s - Conversion progress : %s ."
|
UnifiedSaveOptions.ConversionProgressEventHandler |
HtmlSaveOptions.CustomProgressHandler
This handler can be used to handle conversion progress events f.e. it can be used to show
progress bar or messages about current amount of processed pages, example of handler's code
that shows progress on console is :
public static void ConvertWithShowingProgress()
{
(new com.aspose.pdf.License()).setLicense("Aspose.Total.lic");
Document doc = new Document("Booklet.pdf");
HtmlSaveOptions saveOptions = new HtmlSaveOptions();
saveOptions.CustomProgressHandler = new com.aspose.pdf.UnifiedSaveOptions.ConversionProgressEventHandler() {
public void invoke(
UnifiedSaveOptions.ProgressEventHandlerInfo eventInfo) {
showProgressOnConsole(eventInfo);
}
};
doc.save("Booklet.doc", saveOptions);
}
public static void showProgressOnConsole(HtmlSaveOptions.ProgressEventHandlerInfo eventInfo)
{
switch (eventInfo.EventType)
{
case HtmlSaveOptions.ProgressEventType.TotalProgress:
System.out.println(String.format("%s - Conversion progress : %d %
|
Copyright © 2019 Aspose. All Rights Reserved.