forked from aspose-words/Aspose.Words-for-Java
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathExamples.xml
1237 lines (1197 loc) · 62.5 KB
/
Examples.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0" encoding="utf-8"?>
<Data>
<Folders>
<Folder>
<Title>Quick Start</Title>
<Description>These examples are quick start tutorials and are made up of common tasks to help you get started with Aspose.Words.
Common topics such as creating new documents, loading and converting existing documents, find and replace, mail merge and printing and more are covered in these examples.</Description>
<FolderName>quickstart</FolderName>
<Order>1</Order>
<Examples>
<Example>
<Title>Hello World</Title>
<Description>This example demonstrates how to create a new Aspose.Words document, insert some text and save it as a Microsoft Word document.
This is the perfect example for a first time user to get an idea of how easy Aspose.Words is to work with.</Description>
<FolderName>helloworld</FolderName>
<Order>1</Order>
<DocLink>
<DisplayName>Working with Document</DisplayName>
<Url>Working+with+Document</Url>
</DocLink>
<OutputFiles>
<DataFile>
<Path>..\data\HelloWorld Out.docx</Path>
</DataFile>
</OutputFiles>
<Type>Console</Type>
</Example>
<Example>
<Title>Append Documents</Title>
<Description>This example demonstrates how to join one document to the end of another document by using just one line of code.
When appending documents the document which is appended to is referred to as the "destination document" and the document being appended is the "source document".
During the appending process any styles and other document features are copied to the destination document. The ImportFormatMode controls hows styles and formatting from the document being joined are handled. In this example formatting of the documnent being joined is retained.</Description>
<FolderName>appenddocuments</FolderName>
<Order>4</Order>
<DocLink>
<DisplayName>Joining and Appending Documents</DisplayName>
<Url>Joining+and+Appending+Documents</Url>
</DocLink>
<InputFiles>
<DataFile>
<Path>..\data\TestFile.Destination.doc</Path>
</DataFile>
<DataFile>
<Path>..\data\TestFile.Source.doc</Path>
</DataFile>
</InputFiles>
<OutputFiles>
<DataFile>
<Path>..\data\TestFile Out.docx</Path>
</DataFile>
</OutputFiles>
<Type>Console</Type>
</Example>
<Example>
<Title>Applying a License</Title>
<Description>Demonstrates how to apply a temporary or permanent license in order to remove evaluation restrictions from the Aspose.Words library.</Description>
<FolderName>applylicense</FolderName>
<Order>6</Order>
<DocLink>
<DisplayName>License Aspose.Words</DisplayName>
<Url>License+Aspose.Words</Url>
</DocLink>
<Type>Console</Type>
</Example>
<Example>
<Title>Simple Find and Replace Text</Title>
<Description>Demonstrates a simple find a replace text operation in a document and saves the result back to disk.</Description>
<FolderName>findandreplace</FolderName>
<Order>7</Order>
<DocLink>
<DisplayName>Using Find and Replace</DisplayName>
<Url>Using+Find+and+Replace</Url>
</DocLink>
<InputFiles>
<DataFile>
<Path>..\data\ReplaceSimple.doc</Path>
</DataFile>
</InputFiles>
<OutputFiles>
<DataFile>
<Path>..\data\ReplaceSimple Out.doc</Path>
</DataFile>
</OutputFiles>
<Type>Console</Type>
</Example>
<Example>
<Title>Simple Mail Merge</Title>
<Description>Performs a simple insertion of data into predefined merge fields found in a Microsoft Word document. This is referred to as "mail merge" and is the primary method to insert data into documents.
Aspose.Words provides a powerful mail merge engine with many more features such as:
- Perform mail merge of data from databases, arrays, and custom business objects of any kind. Merge images from disk or stream directly into the document.
- Merge blocks of data into a document and automatically grow table rows by using mail merge regions, this includes nesting regions for merging hierarchical parent-child data (from a database for example).
- Use custom handlers to perform any sort of logic during mail merge, for example applying alternating row shading to a table row.
- Use different options to control how merge fields are cleaned up after mail merge is executed.</Description>
<FolderName>simplemailmerge</FolderName>
<Order>8</Order>
<DocLink>
<DisplayName>How to Execute Simple Mail Merge</DisplayName>
<Url>How+to++Execute+Simple+Mail+Merge</Url>
</DocLink>
<InputFiles>
<DataFile>
<Path>..\data\Template.doc</Path>
</DataFile>
</InputFiles>
<OutputFiles>
<DataFile>
<Path>..\data\MailMerge Result Out.docx</Path>
</DataFile>
</OutputFiles>
<Type>Console</Type>
</Example>
<Example>
<Title>Load and Save to Disk</Title>
<Description>Demonstrates how to load a DOC document from disk and save it to DOCX format at the same location.</Description>
<FolderName>loadandsavetodisk</FolderName>
<Order>2</Order>
<DocLink>
<DisplayName>Opening from a File</DisplayName>
<Url>Opening+from+a+File</Url>
</DocLink>
<InputFiles>
<DataFile>
<Path>..\data\Document.doc</Path>
</DataFile>
</InputFiles>
<OutputFiles>
<DataFile>
<Path>..\data\Document Out.docx</Path>
</DataFile>
</OutputFiles>
<Type>Console</Type>
</Example>
<Example>
<Title>Load and Save to Stream</Title>
<Description>Shows how to open a document from a memory stream and save it to another stream in RTF format. This is useful for when an application needs to load and save documents without writing anything to the disk. Many applications such as web services accept input or output as stream parameters.</Description>
<FolderName>loadandsavetostream</FolderName>
<Order>3</Order>
<DocLink>
<DisplayName>Opening from a Stream</DisplayName>
<Url>Opening+from+a+Stream</Url>
</DocLink>
<InputFiles>
<DataFile>
<Path>..\data\Document.doc</Path>
</DataFile>
</InputFiles>
<OutputFiles>
<DataFile>
<Path>..\data\Document Out.rtf</Path>
</DataFile>
</OutputFiles>
<Type>Console</Type>
</Example>
<Example>
<Title>Convert a Document to PDF</Title>
<Description>To convert any document loaded into Aspose.Words to PDF simply invoke the Document.Save method and specify a file name with a ".PDF" extension. When saving to a stream use the SaveFormat or SaveOption classes to specify the desired output format.</Description>
<FolderName>doc2pdf</FolderName>
<Order>9</Order>
<DocLink>
<DisplayName>How to Convert a Document to PDF</DisplayName>
<Url>How+to++Convert+a+Document+to+PDF</Url>
</DocLink>
<InputFiles>
<DataFile>
<Path>..\data\Template.doc</Path>
</DataFile>
</InputFiles>
<OutputFiles>
<DataFile>
<Path>..\data\Doc2PdfSave Out.pdf</Path>
</DataFile>
</OutputFiles>
<Type>Console</Type>
</Example>
<Example>
<Title>Update Fields</Title>
<Description>Fields in Microsoft Word documents are complex. There are over 50 field types (each needs its own result calculation procedure), formulas and expressions, bookmarks and references, functions and various switches. Fields can also be nested.
Aspose.Words preserves all fiels during open/save and conversions. It is possible to update results of most common fields, including Table of Contents field so they appear just like how they are updated in Microsoft Word.
This example demonstrates how to insert a TOC into a document along with a few headings and then update fields so the content of TOC is generated automatically.</Description>
<FolderName>updatefields</FolderName>
<Order>10</Order>
<DocLink>
<DisplayName>Supported Fields List</DisplayName>
<Url>About+Field+Update</Url>
</DocLink>
<OutputFiles>
<DataFile>
<Path>..\data\Document Field Update Out.docx</Path>
</DataFile>
</OutputFiles>
<Type>Console</Type>
</Example>
<Example>
<Title>Working with the Nodes of a Document</Title>
<Description>By using the classes of the Aspose.Words DOM, you can obtain detailed programmatic access to elements and formatting of a document.
The Aspose.Words Document Object Model (DOM) is an in-memory representation of a Word document. The Aspose.Words DOM allows you to programmatically read, manipulate and modify content and formatting of a Word document.
When Aspose.Words reads a Word document into memory, objects of different types are created to represent various document elements. Every run of text, paragraph, table, section is a node, and even the document itself is a node. Aspose.Words defines a class for every type of document node.</Description>
<FolderName>workingwithnodes</FolderName>
<Order>5</Order>
<DocLink>
<DisplayName>Node Classes</DisplayName>
<Url>Node+Classes</Url>
</DocLink>
<Type>Console</Type>
</Example>
</Examples>
</Folder>
<Folder>
<Title>Loading, Saving and Converting</Title>
<Description>The ability to easily and reliably convert documents from one format to another is one of the four main feature areas of Aspose.Words (the other three being: document object model, rendering and mail merge).
Almost any task that you want to perform with Aspose.Words involves loading or saving a document in some format. Aspose.Words can convert a document from any load format into any save format making the total number of possible conversions very large.
Converting from one document format to another in Aspose.Words is very easy and can be accomplished using just two lines of code:
1. Load your document into a Document object using one of its constructors. By default, Aspose.Words will even auto-detect the file format for you.
2. Invoke one of the Document.Save methods on the Document object and specify the desired output format.</Description>
<FolderName>loadingandsaving</FolderName>
<Order>2</Order>
<Examples>
<Example>
<Title>Import Excel Document</Title>
<Description>Demonstrates interoperability between Aspose.Words and Aspose.Cells by importing a worksheet into a word document.</Description>
<FolderName>excel2word</FolderName>
<Order>4</Order>
<InputFiles>
<DataFile>
<Path>..\data\_testDrawing.xls</Path>
</DataFile>
<DataFile>
<Path>..\data\+2008 calendar1.xls</Path>
</DataFile>
<DataFile>
<Path>..\data\+-4011.xls</Path>
</DataFile>
<DataFile>
<Path>..\data\+Expense budget1.xls</Path>
</DataFile>
<DataFile>
<Path>..\data\+Expense report1.xls</Path>
</DataFile>
<DataFile>
<Path>..\data\+Five-day event schedule1.xls</Path>
</DataFile>
<DataFile>
<Path>..\data\+Generic staff paper1.xls</Path>
</DataFile>
<DataFile>
<Path>..\data\+House cleaning checklist1.xls</Path>
</DataFile>
<DataFile>
<Path>..\data\+Marketing budget plan1.xls</Path>
</DataFile>
<DataFile>
<Path>..\data\+Marketing tactical plan1.xls</Path>
</DataFile>
<DataFile>
<Path>..\data\+Personal budget1.xls</Path>
</DataFile>
<DataFile>
<Path>..\data\+Personal monthly budget1.xls</Path>
</DataFile>
<DataFile>
<Path>..\data\+Pet-sitting invoice1.xls</Path>
</DataFile>
<DataFile>
<Path>..\data\+PivotTable report position recall1.xls</Path>
</DataFile>
<DataFile>
<Path>..\data\+testChart.xls</Path>
</DataFile>
<DataFile>
<Path>..\data\+testMergedCells.xls</Path>
</DataFile>
<DataFile>
<Path>..\data\+Travel service invoice1.xls</Path>
</DataFile>
<DataFile>
<Path>..\data\Personal budget1.xls</Path>
</DataFile>
<DataFile>
<Path>..\data\Sales order1.xls</Path>
</DataFile>
<DataFile>
<Path>..\data\Secret Santa gift exchange list1.xls</Path>
</DataFile>
<DataFile>
<Path>..\data\Travel service invoice1.xls</Path>
</DataFile>
<DataFile>
<Path>..\data\Weekly time sheet1.xls</Path>
</DataFile>
</InputFiles>
<Type>WinForm</Type>
</Example>
<Example>
<Title>Check File Format Compatibility</Title>
<Description>Shows how to use FileFormatUtil to check input file formats and if they are supported by Aspose.Words.
Note that checking the extension of a file alone is not enough as some programs may have saved in one format but written the extension of another. Therefore the use of this class is recommended to avoid such scenarios.</Description>
<FolderName>checkformat</FolderName>
<Order>5</Order>
<DocLink>
<DisplayName>How to Check Format Compatibility</DisplayName>
<Url>How+to++Check+Format+Compatibility</Url>
</DocLink>
<InputFiles>
<DataFile>
<Path>..\data\Test File (doc).doc</Path>
</DataFile>
<DataFile>
<Path>..\data\Test File (docm).docm</Path>
</DataFile>
<DataFile>
<Path>..\data\Test File (docx).docx</Path>
</DataFile>
<DataFile>
<Path>..\data\Test File (dot).dot</Path>
</DataFile>
<DataFile>
<Path>..\data\Test File (dotx).dotx</Path>
</DataFile>
<DataFile>
<Path>..\data\Test File (enc).doc</Path>
</DataFile>
<DataFile>
<Path>..\data\Test File (enc).docx</Path>
</DataFile>
<DataFile>
<Path>..\data\Test File (HTML).html</Path>
</DataFile>
<DataFile>
<Path>..\data\Test File (JPG).jpg</Path>
</DataFile>
<DataFile>
<Path>..\data\Test File (MHTML).mhtml</Path>
</DataFile>
<DataFile>
<Path>..\data\Test File (odt).odt</Path>
</DataFile>
<DataFile>
<Path>..\data\Test File (pre97).doc</Path>
</DataFile>
<DataFile>
<Path>..\data\Test File (rtf).rtf</Path>
</DataFile>
<DataFile>
<Path>..\data\Test File (WordML).xml</Path>
</DataFile>
<DataFile>
<Path>..\data\Test File (XML).xml</Path>
</DataFile>
</InputFiles>
<Type>Console</Type>
</Example>
<Example>
<Title>Split Flow Document into Pages</Title>
<Description>All documents loaded into Aspose.Words are "flow formats" which means they are defined by structures such as paragraphs and text (represented by nodes in the Aspose.Words object model) and as such the layout of such content is not determined until the document is rendered into lines and pages.
Aspose.Words provides a rich API which allows to render Word documents in memory and then split the nodes at page breaks in order to pull document content for each page individually. This example provides the code and demonstrates how to achieve this.</Description>
<FolderName>pagesplitter</FolderName>
<Order>6</Order>
<InputFiles>
<DataFile>
<Path>..\data\Rendering.doc</Path>
</DataFile>
<DataFile>
<Path>..\data\Sample Documentation.doc</Path>
</DataFile>
</InputFiles>
<Type>Console</Type>
</Example>
</Examples>
<Folders>
<Folder>
<Title>Loading and Saving in HTML Format</Title>
<Description>HTML conversion in Aspose.Words is customizable. Many parameters like export of document properties, headers and footers, images location, scaling and resolution, form fields export options and others can be specified.
Aspose.Words HTML import is resilient to documents that are not well formed or are invalid. Invalid or unrecognized elements or attributes are safely ignored during import.
You can also see the detailed specification about what HTML features are supported by Aspose.Words in the documentation.</Description>
<FolderName>loadingandsavinghtml</FolderName>
<Order>1</Order>
<Examples>
<Example>
<Title>Word to HTML for CHM Conversion</Title>
<Description>Expands on the SplitIntoHtmlPages example by producing fully named HTML articles from the source Word document. This can be used with the HTML Help Workshop application to create CHM help files.</Description>
<FolderName>word2help</FolderName>
<Order>4</Order>
<InputFiles>
<DataFile>
<Path>..\data\banner.html</Path>
</DataFile>
<DataFile>
<Path>..\data\footer.html</Path>
</DataFile>
<DataFile>
<Path>..\data\header.html</Path>
</DataFile>
<DataFile>
<Path>..\data\Sample Documentation.doc</Path>
</DataFile>
</InputFiles>
<Type>Console</Type>
</Example>
<Example>
<Title>Split Document into HTML Pages</Title>
<Description>Shows how to convert a loaded document into many HTML files separated by heading styles in the source document. Use this technique when converting a document into a web based book for example.</Description>
<FolderName>splitintohtmlpages</FolderName>
<Order>3</Order>
<InputFiles>
<DataFile>
<Path>..\data\SOI 2007-2012-DeeM with footnote added.doc</Path>
</DataFile>
<DataFile>
<Path>..\data\TocTemplate.doc</Path>
</DataFile>
</InputFiles>
<Type>Console</Type>
</Example>
</Examples>
</Folder>
<Folder>
<Title>Loading and Saving in TXT Format</Title>
<Description>Aspose.Words has support for many different encoding and text structures as well as providing load options to control how text documents are imported into the document object model.
It is easy to extract plain text from any document using Aspose.Words. You can either save into a plain text file or programmatically get text of any document element.</Description>
<FolderName>loadingandsavingtxt</FolderName>
<Order>2</Order>
<Examples>
<Example>
<Title>Load a Plain Text File</Title>
<Description>Demonstrates how to load a plain text file into an Aspose.Words.Document object.</Description>
<FolderName>loadtxt</FolderName>
<Order>1</Order>
<DocLink>
<DisplayName>How to Load Plain Text (TXT) Files</DisplayName>
<Url>How+to++Load+Plain+Text+(TXT)+Files</Url>
</DocLink>
<InputFiles>
<DataFile>
<Path>..\data\LoadTxt.txt</Path>
</DataFile>
</InputFiles>
<Type>Console</Type>
</Example>
</Examples>
</Folder>
<Folder>
<Title>Saving Document in PDF Format</Title>
<Description>Any document loaded into Aspose.Words can be converted to PDF that conforms to the PDF 1.5 or PDF/A-1b specification.
Aspose.Words goes to great lengths to faithfully convert Microsoft Word documents to PDF. Most of the time the look of the final PDF document will be indistinguishable from the original Microsoft Word document.</Description>
<FolderName>savingtopdfformat</FolderName>
<Order>3</Order>
<Examples>
<Example>
<Title>Convert an Image to PDF</Title>
<Description>Provides code to load any image supported by the platform and convert it to PDF using Aspose.Words</Description>
<FolderName>imagetopdf</FolderName>
<Order>1</Order>
<DocLink>
<DisplayName>How to Convert an Image to PDF</DisplayName>
<Url>How+to+Convert+an+Image+to+PDF</Url>
</DocLink>
<InputFiles>
<DataFile>
<Path>..\data\Test.gif</Path>
</DataFile>
<DataFile>
<Path>..\data\Test.jpg</Path>
</DataFile>
<DataFile>
<Path>..\data\Test.png</Path>
</DataFile>
<DataFile>
<Path>..\data\Test.tiff</Path>
</DataFile>
<DataFile>
<Path>..\data\Test.wmf</Path>
</DataFile>
</InputFiles>
<Type>Console</Type>
</Example>
</Examples>
</Folder>
</Folders>
</Folder>
<Folder>
<Title>Programming with Documents</Title>
<Description>Aspose.Words provides a Document Object Model (DOM) and by using the classes of the Aspose.Words DOM, you can obtain detailed programmatic access to document elements and formatting.
The Aspose.Words Document Object Model (DOM) is an in-memory representation of a Word document. The Aspose.Words DOM allows you to programmatically read, manipulate and modify content and formatting of a Word document.</Description>
<FolderName>programmingwithdocuments</FolderName>
<Order>3</Order>
<Folders>
<Folder>
<Title>Working with Images</Title>
<Description>A collection of code examples which demonstrate how to insert images into documents using the Aspose.Words API.</Description>
<FolderName>workingwithimages</FolderName>
<Order>5</Order>
<Examples>
<Example>
<Title>Add Image to Each Page without using Header or Footer</Title>
<Description>Demonstrates how to insert an image and dynamic text onto a specific location on each page of a Microsoft Word document without using the header or footer. This is an advanced task which requires use of the Aspose.Words rendering engine.</Description>
<FolderName>addimagetoeachpage</FolderName>
<Order>1</Order>
<InputFiles>
<DataFile>
<Path>..\data\Aspose Logo.png</Path>
</DataFile>
<DataFile>
<Path>..\data\TestFile.doc</Path>
</DataFile>
</InputFiles>
<Type>Console</Type>
</Example>
<Example>
<Title>Add a Watermark</Title>
<Description>Demonstrates how to inserts a watermark into the header of a Microsoft Word document.</Description>
<FolderName>addwatermark</FolderName>
<Order>2</Order>
<DocLink>
<DisplayName>How to Add a Watermark to a Document</DisplayName>
<Url>How+to++Add+a+Watermark+to+a+Document</Url>
</DocLink>
<InputFiles>
<DataFile>
<Path>..\data\TestFile.doc</Path>
</DataFile>
</InputFiles>
<Type>Console</Type>
</Example>
<Example>
<Title>Compress Images in Document</Title>
<Description>Provides code to compresses all images in a document that are above a specified PPI. Use this code to reduce image size when working with flow formats such as DOC, DOCX, HTML etc.</Description>
<FolderName>compressimages</FolderName>
<Order>3</Order>
<InputFiles>
<DataFile>
<Path>..\data\Test.docx</Path>
</DataFile>
</InputFiles>
<Type>Console</Type>
</Example>
</Examples>
</Folder>
<Folder>
<Title>Joining and Appending Documents</Title>
<Description>This section provides code examples which demonstrate how to programmatically join and append documents using Aspose.Words. Appending documents is a very common task, one which is fully supported. Using Aspose.Words you can easily append one document to another using just a one line API call.
These examples provide details and code examples on how to append documents and how to further control how the documents are joined. For instance, there are examples which show how to set an appended document to appear on the next page and how to restart the page numbering in the pages that are joined.</Description>
<FolderName>joiningandappending</FolderName>
<Order>9</Order>
<Examples>
<Example>
<Title>Join Documents Together</Title>
<Description>Shows how to use the Aspose.Words API to join one document to another document using a variety of options such as preserving styles, using source styles, prepending documents and more.</Description>
<FolderName>appenddocument</FolderName>
<Order>1</Order>
<DocLink>
<DisplayName>Joining and Appending Documents</DisplayName>
<Url>Joining+and+Appending+Documents</Url>
</DocLink>
<InputFiles>
<DataFile>
<Path>..\data\TestFile.Destination.doc</Path>
</DataFile>
<DataFile>
<Path>..\data\TestFile.DestinationList.doc</Path>
</DataFile>
<DataFile>
<Path>..\data\TestFile.Source.doc</Path>
</DataFile>
<DataFile>
<Path>..\data\TestFile.SourceList.doc</Path>
</DataFile>
<DataFile>
<Path>..\data\TestFile.SourcePageSetup.doc</Path>
</DataFile>
</InputFiles>
<Type>Console</Type>
</Example>
</Examples>
</Folder>
<Folder>
<Title>Working with Tables</Title>
<Description>Tables are a common element found in word documents. They allow for large amounts of information to be organized and displayed cleanly in a grid like structure with rows and columns. They are also frequently used as a page layout tool, and a better alternative for displaying tabbed data (with tab stops) as they allow much better control over the design and layout of the content.
Tables in Aspose.Words are fully supported. You are able to freely edit, change, add and remove tables. Rendering of tables with high fidelity is also supported.</Description>
<FolderName>workingwithtables</FolderName>
<Order>2</Order>
<Examples>
<Example>
<Title>Apply AutoFit to Table</Title>
<Description>Demonstrates how to auto fit the width of a table to the page width, to contents and to a user defined fixed width.</Description>
<FolderName>autofittables</FolderName>
<Order>2</Order>
<DocLink>
<DisplayName>How to Apply Different AutoFit Settings to a Table</DisplayName>
<Url>How+to++Apply+Different+AutoFit+Settings+to+a+Table</Url>
</DocLink>
<InputFiles>
<DataFile>
<Path>..\data\TestFile.doc</Path>
</DataFile>
</InputFiles>
<Type>Console</Type>
</Example>
<Example>
<Title>Create a Table from Database Result</Title>
<Description>Shows how to import the results of a database query stored in a DataTable and insert it into a new table in the document.</Description>
<FolderName>importtablefromdatatable</FolderName>
<Order>1</Order>
<DocLink>
<DisplayName>How to Build a Table from a DataTable</DisplayName>
<Url>How+to++Build+a+Table+from+a+DataTable</Url>
</DocLink>
<Type>Console</Type>
</Example>
</Examples>
</Folder>
<Folder>
<Title>Working with Bookmarks</Title>
<Description>Bookmarks identify in a Microsoft Word document the locations or fragments that you name and identify for future reference. For example, you might use a bookmark to identify text that you want to revise later. Instead of scrolling through the document to locate the text, you can go to it by using the Bookmark dialog box.
With Aspose.Words, you can use bookmarks in reports or documents to insert some data into the bookmark or apply special formatting to its content. You can also use bookmarks to retrieve text from a certain location in your document.</Description>
<FolderName>workingwithbookmarks</FolderName>
<Order>3</Order>
<Examples>
<Example>
<Title>Copy Bookmarked Text</Title>
<Description>Extracts text from a bookmarked range and shows how to import it into a new document.</Description>
<FolderName>copybookmarkedtext</FolderName>
<Order>1</Order>
<DocLink>
<DisplayName>Working with Bookmarks</DisplayName>
<Url>Working+with+Bookmarks</Url>
</DocLink>
<InputFiles>
<DataFile>
<Path>..\data\Template.doc</Path>
</DataFile>
</InputFiles>
<Type>Console</Type>
</Example>
<Example>
<Title>Untangle Row Bookmarks</Title>
<Description>Demonstrates how to fix bookmarks if they are incorrectly loaded in table rows. This bookmark problem occurs because bookmarks in Word document can be block level (between paragraphs and tables) however in the Aspose.Words object model bookmark nodes can only appear inline (inside a paragraph). This code fixes any block-level bookmarks which were loaded incorrectly into a document.</Description>
<FolderName>untanglerowbookmarks</FolderName>
<Order>2</Order>
<InputFiles>
<DataFile>
<Path>..\data\TestDefect1352.doc</Path>
</DataFile>
</InputFiles>
<Type>Console</Type>
</Example>
</Examples>
</Folder>
<Folder>
<Title>Working with Document</Title>
<Description>The Document is a central class in Aspose.Words and represents a document and provides various document properties and methods such as saving or protecting the document.
Whatever you want to perform with Aspose.Words: create a new document from scratch, open a template for mail merge, get different parts from the document - use the Document class as your starting point. The Document object contains all content and formatting, styles, built-in and custom properties, and the MailMerge object that is used for mail merge.
Document allows you to retrieve text, bookmarks and form fields for the whole document or for separate sections.
Document contains a collection of the Section objects so that you can obtain a particular section or do some manipulations like copying/moving sections.
Document can be saved at any time to a file or stream. A document can also be sent to a client browser.</Description>
<FolderName>workingwithdocument</FolderName>
<Order>1</Order>
<Examples>
<Example>
<Title>Load and Store Documents to Database</Title>
<Description>Demonstrates loading and saving a document into a Microsoft Access Database for use in Aspose.Words.</Description>
<FolderName>documentindb</FolderName>
<Order>4</Order>
<DocLink>
<DisplayName>How to Load and Save a Document to Database</DisplayName>
<Url>How+to++Load+and+Save+a+Document+to+Database</Url>
</DocLink>
<InputFiles>
<DataFile>
<Path>..\data\DocDB.mdb</Path>
</DataFile>
<DataFile>
<Path>..\data\TestFile.doc</Path>
</DataFile>
</InputFiles>
<Type>WinForm</Type>
</Example>
<Example>
<Title>Remove Page and Section Breaks from a Document</Title>
<Description>Demonstrates how to removes all page and section breaks from a document.</Description>
<FolderName>removebreaks</FolderName>
<Order>2</Order>
<DocLink>
<DisplayName>How to Remove Page and Section Breaks</DisplayName>
<Url>How+to++Remove+Page+and+Section+Breaks</Url>
</DocLink>
<InputFiles>
<DataFile>
<Path>..\data\TestFile.doc</Path>
</DataFile>
</InputFiles>
<Type>Console</Type>
</Example>
<Example>
<Title>Get Page Numbers of Document Nodes</Title>
<Description>Demonstrates how to use the Aspose.Words API to retrieve the page numbers of document elements.
All documents loaded into Aspose.Words are "flow formats" which means they are defined by structures such as paragraphs and text (represented by nodes in the Aspose.Words object model) and as such the page number of such content is not determined until the document is rendered into lines and pages.
Aspose.Words provides an API to render and easily retrieve page numbers of document nodes.</Description>
<FolderName>pagenumbersofnodes</FolderName>
<Order>3</Order>
<InputFiles>
<DataFile>
<Path>..\data\TestFile.docx</Path>
</DataFile>
</InputFiles>
<Type>Console</Type>
</Example>
<Example>
<Title>Extract Formatted Content from Document</Title>
<Description>Shows how to extract the full content as nodes between chosen markers in the document and insert that content into a separate document.</Description>
<FolderName>extractcontent</FolderName>
<Order>1</Order>
<DocLink>
<DisplayName>How to Extract Selected Content Between Nodes in a Document</DisplayName>
<Url>How+to++Extract+Selected+Content+Between+Nodes+in+a+Document</Url>
</DocLink>
<InputFiles>
<DataFile>
<Path>..\data\TestFile.doc</Path>
</DataFile>
</InputFiles>
<Type>Console</Type>
</Example>
</Examples>
</Folder>
<Folder>
<Title>Working With Fields</Title>
<Description>Fields in a document are like placeholders where some useful data can be inserted. For example, a field can be a page reference, formula or a mail merge field. A field in a Microsoft Word document consists of a field code and field result. The field code is an instruction about how the field result needs to be updated or calculated. An application that processes a document and encounters a field might have the functionality to interpret the instructions contained in the field code and update the field result with a new value. This is called field update
Fields in Microsoft Word documents are complex. There are over 50 field types (each needs its own result calculation procedure), formulas and expressions, bookmarks and references, functions and various switches. Fields can also be nested.
Aspose.Words is a class library designed for server-side processing of Microsoft Word documents and supports fields in the following ways:
All fields in a document are preserved during open/save and conversions.
It is possible to update results of some of the most popular fields.</Description>
<FolderName>workingwithfields</FolderName>
<Order>4</Order>
<Examples>
<Example>
<Title>Replace Fields with Static Text</Title>
<Description>This class provides a static method to convert fields of a particular type in a document to static text. This is useful if you no longer want dynamic fields to change when field update is run, for instance to lock a date represented in a DATE field so when the document is sent it won't change when opened on the end users machine.</Description>
<FolderName>replacefieldswithstatictext</FolderName>
<Order>1</Order>
<DocLink>
<DisplayName>How to Replace Fields with Static Text</DisplayName>
<Url>How+to++Replace+Fields+with+Static+Text</Url>
</DocLink>
<InputFiles>
<DataFile>
<Path>..\data\TestFile.doc</Path>
</DataFile>
</InputFiles>
<Type>Console</Type>
</Example>
<Example>
<Title>Insert Nested Fields</Title>
<Description>Demonstrates how to use DocumentBuilder to position and insert a field inside the field code of a different field.</Description>
<FolderName>insertnestedfields</FolderName>
<Order>2</Order>
<DocLink>
<DisplayName>Inserting Fields into a Document</DisplayName>
<Url>Inserting+Fields+into+a+Document</Url>
</DocLink>
<OutputFiles>
<DataFile>
<Path>..\data\InsertNestedFields Out.docx</Path>
</DataFile>
</OutputFiles>
<Type>Console</Type>
</Example>
<Example>
<Title>Remove Field</Title>
<Description>Demonstrates how to remove a field from a document using the Field facade.</Description>
<FolderName>removefield</FolderName>
<Order>3</Order>
<DocLink>
<DisplayName>Removing a Field</DisplayName>
<Url>Removing+a+Field</Url>
</DocLink>
<InputFiles>
<DataFile>
<Path>..\data\Field.RemoveField.doc</Path>
</DataFile>
</InputFiles>
<Type>Console</Type>
</Example>
</Examples>
</Folder>
<Folder>
<Title>Working with Comments</Title>
<Description>Using Comments in a Word document (in addition to Track Changes) is a common practice when reviewing documents, particularly when there are multiple reviewers. There can be situations where the only thing you need from a document is the comments. Say you want to generate a list of review findings, or perhaps you have collected all the useful information from the document and you simply want to remove unnecessary comments. You may want to view or remove the comments of a particular reviewer.
Aspose.Words has a wide range of support for comments and allows you to add, manipulate and remove comments with a few simple calls.</Description>
<FolderName>workingwithcomments</FolderName>
<Order>6</Order>
<Examples>
<Example>
<Title>Extract and Modify Comments</Title>
<Description>Demonstrates how to use the Aspose.Words API to add, delete, and extract information from markup comments inside a Word document.</Description>
<FolderName>processcomments</FolderName>
<Order>1</Order>
<DocLink>
<DisplayName>How to Extract or Remove Comments</DisplayName>
<Url>How+to++Extract+or+Remove+Comments</Url>
</DocLink>
<InputFiles>
<DataFile>
<Path>..\data\TestFile.doc</Path>
</DataFile>
</InputFiles>
<Type>Console</Type>
</Example>
</Examples>
</Folder>
<Folder>
<Title>Using Find and Replace</Title>
<Description>Use the Range.Replace method to find or replace a particular string within the current range. It returns the number of replacements made, so it is useful for searching strings without replace. An exception is thrown if a captured or replacement string contains one or more special characters: paragraph break, cell break, section break, field start, field separator, field end, inline picture, drawing object, footnote.</Description>
<FolderName>usingfindandreplace</FolderName>
<Order>8</Order>
<Examples>
<Example>
<Title>Find And Highlight Text</Title>
<Description>Provides code which demonstrates how to finds and highlight all instances of a particular word or a phrase in a Word document.</Description>
<FolderName>findandhighlight</FolderName>
<Order>1</Order>
<DocLink>
<DisplayName>How to Find and Highlight Text</DisplayName>
<Url>How+to+Find+and+Highlight+Text</Url>
</DocLink>
<InputFiles>
<DataFile>
<Path>..\data\TestFile.doc</Path>
</DataFile>
</InputFiles>
<Type>Console</Type>
</Example>
<Example>
<Title>Replacing Text with a Field</Title>
<Description>This code demonstrates how to find plain text markers in a document and replace each occurrence with a merge field at the position of the text.</Description>
<FolderName>replacetextwithfield</FolderName>
<Order>2</Order>
<InputFiles>
<DataFile>
<Path>..\data\Field.ReplaceTextWithFields.doc</Path>
</DataFile>
</InputFiles>
<Type>Console</Type>
</Example>
</Examples>
</Folder>
<Folder>
<Title>Working with Styles</Title>
<Description>You can get a collection of styles defined in the document using Document.Styles. This collection holds both the built-in and user-defined styles in a document. A particular style could be obtained by its name/alias, style identifier, or index.</Description>
<FolderName>workingwithstyles</FolderName>
<Order>7</Order>
<Examples>
<Example>
<Title>Extract Content based on Styles</Title>
<Description>Demonstrates how to extract nodes from a document that are formatted with a specific style.</Description>
<FolderName>extractcontentbasedonstyles</FolderName>
<Order>1</Order>
<DocLink>
<DisplayName>How to Extract Content Based on Styles</DisplayName>
<Url>How+to++Extract+Content+Based+on+Styles</Url>
</DocLink>
<InputFiles>
<DataFile>
<Path>..\data\TestFile.doc</Path>
</DataFile>
</InputFiles>
<Type>Console</Type>
</Example>
</Examples>
</Folder>
</Folders>
</Folder>
<Folder>
<Title>Mail Merge and Reporting</Title>
<Description>Aspose.Words can generate documents from templates with mail merge fields. The data from an external source like a database or file is placed into these fields and formatted, and the resulting document is saved in the folder you specify.
Mail Merge is a feature of Microsoft Word for quickly and easily creating documents like letters, labels and envelopes. Aspose.Words takes the standard mail merge and advances it many steps ahead, turning it into a full-fledged reporting solution that allows you to generate even more complex documents such as reports, catalogs, inventories, and invoices.
The advantages of the Aspose.Words reporting solution are:
- Design reports in Microsoft Word, use standard mail merge fields.
- Define regions in the document that grow, such as detail rows of an order.
- Insert images during mail merge.
- Execute any custom logic, control formatting, or insert complex content using mail merge event handlers.
- Populate documents with data from any type of data source.
- Effortlessly merge data from relational datasources (parent-child) data.</Description>
<FolderName>mailmergeandreporting</FolderName>
<Order>4</Order>
<Examples>
<Example>
<Title>Apply Custom Logic during Mail Merge</Title>
<Description>Provides code which allow the user to add custom code to handle unmerged regions after mail merge.</Description>
<FolderName>applycustomlogictoemptyregions</FolderName>
<Order>7</Order>
<DocLink>
<DisplayName>How to Apply Custom Logic to Unmerged Regions</DisplayName>
<Url>How+to++Apply+Custom+Logic+to+Unmerged+Regions</Url>
</DocLink>
<InputFiles>
<DataFile>
<Path>..\data\TestFile.doc</Path>
</DataFile>
</InputFiles>
<Type>Console</Type>
</Example>
<Example>
<Title>Mail Merge from XML Datasource</Title>
<Description>Shows how to perform simple mail merge from an XML datasource using the Aspose.Words mail merge engine.</Description>
<FolderName>xmlmailmerge</FolderName>
<Order>2</Order>
<DocLink>
<DisplayName>How to Mail Merge from XML using DataSet</DisplayName>
<Url>How+to++Mail+Merge+from+XML+using+DataSet</Url>
</DocLink>
<InputFiles>
<DataFile>
<Path>..\data\Customers.xml</Path>
</DataFile>
<DataFile>
<Path>..\data\TestFile.doc</Path>
</DataFile>
</InputFiles>
<Type>Console</Type>
</Example>
<Example>
<Title>Remove Empty Mail Merge Regions</Title>
<Description>Shows how to easily remove mail merge regions from a document that were not merged with data.</Description>
<FolderName>removeemptyregions</FolderName>
<Order>1</Order>
<DocLink>
<DisplayName>How to Remove Unmerged Regions from a Document</DisplayName>
<Url>How+to++Remove+Unmerged+Regions+from+a+Document</Url>
</DocLink>
<InputFiles>
<DataFile>
<Path>..\data\TestFile.doc</Path>
</DataFile>
</InputFiles>
<Type>Console</Type>
</Example>
<Example>
<Title>Mail Merge Data from a Relational Datasource using Nested Mail Merge</Title>
<Description>Mail merge regions provide the ability to merge data with multiple rows into a document. When these regions are nested this allows you to merge parent-child data such mail merging several orders and the items for each order. This example demonstrates how to use nested mail merge regions to merge parent-child data from an XML file.</Description>
<FolderName>nestedmailmerge</FolderName>
<Order>6</Order>
<DocLink>
<DisplayName>How to Use Nested Mail Merge Regions</DisplayName>
<Url>How+to+Use+Nested+Mail+Merge+Regions</Url>
</DocLink>
<InputFiles>
<DataFile>
<Path>..\data\CustomerData.xml</Path>
</DataFile>
<DataFile>
<Path>..\data\Invoice Template.doc</Path>
</DataFile>
<DataFile>
<Path>..\data\OrdersSchema.xsd</Path>
</DataFile>
</InputFiles>
<Type>Console</Type>
</Example>
<Example>
<Title>Produce Multiple Documents per record during Mail Merge</Title>
<Description>Provides code to produce individual documents for each record during simple mail merge.</Description>
<FolderName>multipledocsinmailmerge</FolderName>
<Order>4</Order>
<DocLink>
<DisplayName>How to Produce Multiple Documents during Mail Merge</DisplayName>