You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: english/java/com.aspose.words/_index.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -377,6 +377,7 @@ The **MailMerge** object which provides access to the reporting functionality is
377
377
|[GlossaryDocument](../com.aspose.words/glossarydocument/)| Represents the root element for a glossary document within a Word document. |
378
378
|[GlowFormat](../com.aspose.words/glowformat/)| Represents the glow formatting for an object. |
379
379
|[Glyph](../com.aspose.words/glyph/)| Represents a glyph |
380
+
|[GlyphFlags](../com.aspose.words/glyphflags/)||
380
381
|[GoogleAiModel](../com.aspose.words/googleaimodel/)| An abstract class representing the integration with Google\\u2019s AI models within the Aspose.Words. |
381
382
|[GradientStop](../com.aspose.words/gradientstop/)| Represents one gradient stop. |
382
383
|[GradientStopCollection](../com.aspose.words/gradientstopcollection/)| Contains a collection of [GradientStop](../com.aspose.words/gradientstop/) objects. |
@@ -527,6 +528,7 @@ The **MailMerge** object which provides access to the reporting functionality is
527
528
|[OutlineOptions](../com.aspose.words/outlineoptions/)| Allows to specify outline options. |
528
529
|[PageBorderAppliesTo](../com.aspose.words/pageborderappliesto/)| Specifies which pages the page border is printed on. |
529
530
|[PageBorderDistanceFrom](../com.aspose.words/pageborderdistancefrom/)| Specifies the positioning of the page border relative to the page margin. |
531
+
|[PageExtractOptions](../com.aspose.words/pageextractoptions/)| Allows to specify options for document page extracting. |
530
532
|[PageInfo](../com.aspose.words/pageinfo/)| Represents information about a particular document page. |
531
533
|[PageLayoutCallbackArgs](../com.aspose.words/pagelayoutcallbackargs/)| An argument passed into [IPageLayoutCallback.\#notify(com.aspose.words.PageLayoutCallbackArgs)](../com.aspose.words/ipagelayoutcallback/\#notify-com.aspose.words.PageLayoutCallbackArgs)|
532
534
|[PageLayoutEvent](../com.aspose.words/pagelayoutevent/)| A code of event raised during page layout model build and rendering. |
@@ -711,6 +713,7 @@ The **MailMerge** object which provides access to the reporting functionality is
711
713
|[TxtTrailingSpacesOptions](../com.aspose.words/txttrailingspacesoptions/)| Specifies available options for trailing spaces handling during import from [LoadFormat.\#TEXT](../com.aspose.words/loadformat/\#TEXT) file. |
712
714
|[Underline](../com.aspose.words/underline/)| Indicates type of the underline applied to a font. |
713
715
|[UnicodeScript](../com.aspose.words/unicodescript/)| Unicode Character Database property: Script (sc). |
716
+
|[UnsupportedEncryptionException](../com.aspose.words/unsupportedencryptionexception/)| Thrown during document load, when the document is encrypted with an unsupported method. |
714
717
|[UnsupportedFileFormatException](../com.aspose.words/unsupportedfileformatexception/)| Thrown during document load, when the document format is not recognized or not supported by Aspose.Words. |
715
718
|[UserInformation](../com.aspose.words/userinformation/)| Specifies information about the user. |
716
719
|[VariableCollection](../com.aspose.words/variablecollection/)| A collection of document variables. |
Copy file name to clipboardExpand all lines: english/java/com.aspose.words/asposewordsprintdocument/_index.md
+117Lines changed: 117 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,6 +29,57 @@ A single Aspose.Words document can consist of multiple sections that specify pag
29
29
30
30
On the other hand, if the document consists of a single section only, the developer can use [AsposeWordsPrintDocument](../../com.aspose.words/asposewordsprintdocument/) as **java.awt.print.Printable** to improve printing performance.
31
31
32
+
**Examples:**
33
+
34
+
Shows how to monitor printing progress.
35
+
36
+
```
37
+
38
+
Document doc = new Document(getMyDir() + "Rendering.docx");
39
+
40
+
// Create a special Aspose.Words implementation of the Java PrintDocument class
41
+
AsposeWordsPrintDocument printDoc = new AsposeWordsPrintDocument(doc);
42
+
43
+
// In Java, printer settings are handled through PrinterJob.
|[print(Graphics graphics, PageFormat pageFormat, int pageIndex)](#print-java.awt.Graphics-java.awt.print.PageFormat-int)||
49
101
|[setColorMode(int value)](#setColorMode-int)| Sets how non-colored pages are printed if the device supports color printing. |
@@ -109,6 +161,71 @@ public PageFormat getPageFormat(int pageIndex)
109
161
110
162
**Returns:**
111
163
java.awt.print.PageFormat
164
+
### getPagesRemaining() {#getPagesRemaining}
165
+
```
166
+
public int getPagesRemaining()
167
+
```
168
+
169
+
170
+
Gets the number of pages remaining in the currently active print job.
171
+
172
+
**Remarks:**
173
+
174
+
This value is updated automatically as pages are printed, reflecting the current print job's progress. Outside of print time and in case of print job errors or interruptions, the value may not reflect the actual number of pages pending.
175
+
176
+
**Examples:**
177
+
178
+
Shows how to monitor printing progress.
179
+
180
+
```
181
+
182
+
Document doc = new Document(getMyDir() + "Rendering.docx");
183
+
184
+
// Create a special Aspose.Words implementation of the Java PrintDocument class
185
+
AsposeWordsPrintDocument printDoc = new AsposeWordsPrintDocument(doc);
186
+
187
+
// In Java, printer settings are handled through PrinterJob.
PrintTracker printTracker = new PrintTracker(printDoc);
193
+
194
+
printerJob.print();
195
+
196
+
// Write the event log.
197
+
for (String eventString : printTracker.getEventLog()) {
198
+
System.out.println(eventString);
199
+
}
200
+
201
+
```
202
+
203
+
Shows an example class for monitoring the progress of printing.
204
+
205
+
```
206
+
{@code
207
+
///
208
+
/// Tracks printing progress of an Aspose.Words document and logs printing events.
209
+
///
210
+
/**
211
+
Tracks printing progress of an Aspose.Words document and logs printing events.
212
+
Note: Java version doesn't have the same event system as .NET, so this implementation
213
+
wraps the AsposeWordsPrintDocument to provide similar functionality.
214
+
/
215
+
class PrintTracker implements Printable {
216
+
private final AsposeWordsPrintDocument printDocument;
217
+
private int printingPage = -1;
218
+
private int totalPages = 0;
219
+
private final List eventLog = new ArrayList<>();
220
+
private boolean isPrinting = false;
221
+
222
+
/**
223
+
Initializes a new instance of the PrintTracker class
224
+
and wraps the specified Aspose.Words print document.
225
+
```
226
+
227
+
**Returns:**
228
+
int - The current page number being printed. / public int getPrintingPage() \{ return printingPage; \} /\*\* Gets the total number of pages to print. Returns 0 when no printing is in progress.
Copy file name to clipboardExpand all lines: english/java/com.aspose.words/document/_index.md
+48Lines changed: 48 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -120,6 +120,7 @@ Shows how to execute a mail merge with data from a DataTable.
120
120
|[ensureMinimum()](#ensureMinimum)| If the document contains no sections, creates one section with one paragraph. |
121
121
|[expandTableStylesToDirectFormatting()](#expandTableStylesToDirectFormatting)| Converts formatting specified in table styles into direct formatting on tables in the document. |
122
122
|[extractPages(int index, int count)](#extractPages-int-int)| Returns the [Document](../../com.aspose.words/document/) object representing specified range of pages. |
123
+
|[extractPages(int index, int count, PageExtractOptions options)](#extractPages-int-int-com.aspose.words.PageExtractOptions)| Returns the [Document](../../com.aspose.words/document/) object representing the specified range of pages and the given page extract options. |
| index | int | The zero-based index of the first page to extract. |
1784
+
| count | int | Number of pages to be extracted. |
1785
+
1786
+
**Returns:**
1787
+
[Document](../../com.aspose.words/document/)
1788
+
### extractPages(int index, int count, PageExtractOptions options) {#extractPages-int-int-com.aspose.words.PageExtractOptions}
1751
1789
```
1790
+
public Document extractPages(int index, int count, PageExtractOptions options)
1791
+
```
1792
+
1793
+
1794
+
Returns the [Document](../../com.aspose.words/document/) object representing the specified range of pages and the given page extract options.
1795
+
1796
+
**Remarks:**
1797
+
1798
+
The resulting document should look like the one in MS Word, as if we had performed 'Print specific pages' \\u2013 the numbering, headers/footers and cross tables layout will be preserved. But due to a large number of nuances, appearing while reducing the number of pages, full match of the layout is a quiet complicated task requiring a lot of effort. Depending on the document complexity there might be slight differences in the resulting document contents layout comparing to the source document. Any feedback would be greatly appreciated.
1752
1799
1753
1800
**Parameters:**
1754
1801
| Parameter | Type | Description |
1755
1802
| --- | --- | --- |
1756
1803
| index | int | The zero-based index of the first page to extract. |
1757
1804
| count | int | Number of pages to be extracted. |
1805
+
| options |[PageExtractOptions](../../com.aspose.words/pageextractoptions/)| Provides options for managing the page extracting process. |
0 commit comments