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 | Method and Description |
---|---|
UnifiedSaveOptions.ConversionProgressEventHandler |
DocSaveOptions.getCustomProgressHandler()
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.getCustomProgressHandler()
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 %
|
UnifiedSaveOptions.ConversionProgressEventHandler |
PptxSaveOptions.getCustomProgressHandler()
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("input.pdf");
HtmlSaveOptions saveOptions = new HtmlSaveOptions();
saveOptions.setCustomProgressHandler(new HtmlSaveOptions.ConversionProgressEventHandler(ShowProgressOnConsole));
doc.save("output.html", saveOptions);
}
public static void ShowProgressOnConsole(HtmlSaveOptions.ProgressEventHandlerInfo eventInfo)
{
switch (eventInfo.EventType)
{
case HtmlSaveOptions.ProgressEventType.TotalProgress:
System.out.println(string.Format("{0} - Conversion progress : {1}%
|
Modifier and Type | Method and Description |
---|---|
void |
DocSaveOptions.setCustomProgressHandler(UnifiedSaveOptions.ConversionProgressEventHandler 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 ."
|
void |
HtmlSaveOptions.setCustomProgressHandler(UnifiedSaveOptions.ConversionProgressEventHandler 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 %
|
void |
PptxSaveOptions.setCustomProgressHandler(UnifiedSaveOptions.ConversionProgressEventHandler value)
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("input.pdf");
HtmlSaveOptions saveOptions = new HtmlSaveOptions();
saveOptions.CustomProgressHandler = new HtmlSaveOptions.ConversionProgressEventHandler(ShowProgressOnConsole);
doc.Save("output.html", saveOptions);
}
public static void ShowProgressOnConsole(HtmlSaveOptions.ProgressEventHandlerInfo eventInfo)
{
switch (eventInfo.EventType)
{
case HtmlSaveOptions.ProgressEventType.TotalProgress:
System.out.println(string.Format("{0} - Conversion progress : {1}%
|