forked from aspose-pdf/Aspose.PDF-for-.NET-Old
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExamples.xml
More file actions
5297 lines (5247 loc) · 272 KB
/
Examples.xml
File metadata and controls
5297 lines (5247 loc) · 272 KB
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>Programmers Guide</Title>
<Description>Programmers Guide provides code samples about key programming concepts to build .NET and other applications that use Aspose.Pdf.</Description>
<FolderName>ProgrammersGuide</FolderName>
<Order>1</Order>
<Folders>
<Folder>
<Title>Working With Aspose.Pdf</Title>
<Description>Samples and Examples for using Aspose.PDF in your applications.</Description>
<FolderName>WorkingWithAsposePDF</FolderName>
<Order>1</Order>
<Folders>
<Folder>
<Title>Working With Pages</Title>
<Description>This section includes sample examples for all the page level operations which could be performed using Aspose.PDF</Description>
<FolderName>WorkingWithPages</FolderName>
<Order>1</Order>
<Examples>
<Example>
<Title>Concatenate PDF Files</Title>
<Description>Example explaining concatenation of two PDF files.</Description>
<FolderName>ConcatenatePdfFiles</FolderName>
<Order>1</Order>
<DocLink>
<DisplayName>Concatenate PDF Files</DisplayName>
<Url>Concatenate+PDF+Files</Url>
</DocLink>
<InputFiles>
<DataFile>
<Path>..\Data\input1.pdf</Path>
</DataFile>
<DataFile>
<Path>..\Data\input2.pdf</Path>
</DataFile>
</InputFiles>
<OutputFiles>
<DataFile>
<Path>..\Data\output.pdf</Path>
</DataFile>
</OutputFiles>
<Type>Console</Type>
</Example>
<Example>
<Title>Get Number of Pages of a PDF File</Title>
<Description>In order to get the number of pages of a PDF file, you need to open the PDF file using Document class. After that, you can use Count property of the Pages Collection of Document object to get the total number of pages in the document.</Description>
<FolderName>GetNumberofPagesofaPDFFile</FolderName>
<Order>2</Order>
<DocLink>
<DisplayName>Get Number of Pages of a PDF File</DisplayName>
<Url>Get+Number+of+Pages+of+a+PDF+File</Url>
</DocLink>
<InputFiles>
<DataFile>
<Path>..\Data\input1.pdf</Path>
</DataFile>
</InputFiles>
<Type>Console</Type>
</Example>
<Example>
<Title>Get Page Properties</Title>
<Description>The Page Class provides all the properties related to a particular page of a PDF document. All the pages of the PDF files are contained by Pages Collection of the Document object. We can access either individual Page object by Index value, from this collection, or loop through the collection, using foreach loop, and get all the pages. Once an individual page is accessed, we can get its properties.</Description>
<FolderName>GetPageProperties</FolderName>
<Order>3</Order>
<DocLink>
<DisplayName>Get Page Properties</DisplayName>
<Url>Get+Page+Properties</Url>
</DocLink>
<InputFiles>
<DataFile>
<Path>..\Data\input1.pdf</Path>
</DataFile>
</InputFiles>
<Type>Console</Type>
</Example>
<Example>
<Title>Insert an Empty Page in a PDF File</Title>
<Description>Insert method of the Pages Collection allows you to insert an empty page in a PDF document. You need to pass the location of the newly inserted blank page to the Insert method. First of all, create a Document object with the input PDF file, in which you want to add the blank page. Then, call the Insert method of the Pages Collection of this Document object. Finally, save the output PDF using Save method.</Description>
<FolderName>InsertEmptyPageInPDFFile</FolderName>
<Order>4</Order>
<DocLink>
<DisplayName>Insert an Empty Page in a PDF File</DisplayName>
<Url>Insert+an+Empty+Page+in+a+PDF+File</Url>
</DocLink>
<InputFiles>
<DataFile>
<Path>..\Data\input.pdf</Path>
</DataFile>
</InputFiles>
<OutputFiles>
<DataFile>
<Path>..\Data\output.pdf</Path>
</DataFile>
</OutputFiles>
<Type>Console</Type>
</Example>
<Example>
<Title>Insert an Empty Page at the End of a PDF File</Title>
<Description>If you want to insert an empty page at the end of the PDF file, you only need to call Add method of the Pages Collection of Document object, without any parameters. First, you need to create a Document object with the input PDF file in which you want to add the blank page. Then, you have to call Add method of the Pages Collection, and finally save the output PDF using Save method.</Description>
<FolderName>InsertEmptyPageAtEndofPDFFile</FolderName>
<Order>5</Order>
<DocLink>
<DisplayName>Insert an Empty Page at the End of a PDF File</DisplayName>
<Url>Insert+an+Empty+Page+at+the+End+of+a+PDF+File</Url>
</DocLink>
<InputFiles>
<DataFile>
<Path>..\Data\input.pdf</Path>
</DataFile>
</InputFiles>
<OutputFiles>
<DataFile>
<Path>..\Data\output.pdf</Path>
</DataFile>
</OutputFiles>
<Type>Console</Type>
</Example>
<Example>
<Title>Split PDF File to Individual Pages</Title>
<Description>In order to split a PDF file into single page PDF files, you need to loop through the Pages Collection of the Document object. In each iteration you need to create a new Document object and add the individual Page in this empty document. After that, you need to save the new PDF using Save method.</Description>
<FolderName>SplitPDFFiletoIndividualPages</FolderName>
<Order>6</Order>
<DocLink>
<DisplayName>Split PDF File to Individual Pages</DisplayName>
<Url>Split+PDF+File+to+Individual+Pages</Url>
</DocLink>
<InputFiles>
<DataFile>
<Path>..\Data\input.pdf</Path>
</DataFile>
</InputFiles>
<OutputFiles>
<DataFile>
<Path>..\Data\page_1.pdf</Path>
</DataFile>
<DataFile>
<Path>..\Data\page_2.pdf</Path>
</DataFile>
</OutputFiles>
<Type>Console</Type>
</Example>
<Example>
<Title>Get a Particular Page of the PDF File</Title>
<Description>Pages Collection of the Document object returns all the pages of the PDF file. In order to get a particular page from this collection you need to specify its Index. Once you get a particular page, you need to create a new Document object and add this Page object into the Document object and save the output using Save method.</Description>
<FolderName>GetParticularPageOfPDFFile</FolderName>
<Order>7</Order>
<DocLink>
<DisplayName>Get a Particular Page of the PDF File</DisplayName>
<Url>Get+a+Particular+Page+of+the+PDF+File</Url>
</DocLink>
<InputFiles>
<DataFile>
<Path>..\Data\input.pdf</Path>
</DataFile>
</InputFiles>
<OutputFiles>
<DataFile>
<Path>..\Data\output.pdf</Path>
</DataFile>
</OutputFiles>
<Type>Console</Type>
</Example>
<Example>
<Title>Delete a Particular Page from the PDF File</Title>
<Description>In order to delete a particular page from the Pages Collection, you need to call the Delete method and specify the Index of the particular page you want to delete. After that call Save method to save the updated PDF file.</Description>
<FolderName>DeleteParticularPageFromPDFFile</FolderName>
<Order>8</Order>
<DocLink>
<DisplayName>Delete a Particular Page from the PDF File</DisplayName>
<Url>Delete+a+Particular+Page+from+the+PDF+File</Url>
</DocLink>
<InputFiles>
<DataFile>
<Path>..\Data\input.pdf</Path>
</DataFile>
</InputFiles>
<OutputFiles>
<DataFile>
<Path>..\Data\output.pdf</Path>
</DataFile>
</OutputFiles>
<Type>Console</Type>
</Example>
<Example>
<Title>Update Page Dimensions</Title>
<Description>The Page contains a method named SetPageSize(...) which provides the feature/capability to set the page size/dimensions. In following code snippet, we will load the source PDF file, get page collection into PageCollection object, get particular page whose dimensions we need to update, and then we will call SetPageSize(..) method to update its dimensions. Finally we will call the Save(..) method of Document class to generate the PDF file with updated page dimensions.</Description>
<FolderName>UpdatePageDimensions</FolderName>
<Order>9</Order>
<DocLink>
<DisplayName>Update Page Dimensions</DisplayName>
<Url>Update+Page+Dimensions</Url>
</DocLink>
<InputFiles>
<DataFile>
<Path>..\Data\input.pdf</Path>
</DataFile>
</InputFiles>
<OutputFiles>
<DataFile>
<Path>..\Data\output.pdf</Path>
</DataFile>
</OutputFiles>
<Type>Console</Type>
</Example>
<Example>
<Title>Add image as page background</Title>
<Description>A PDF document is a collection of pages and each page contains collection of artifacts. We have a class named BackgroundArtifact which can be used to add background image to page object.</Description>
<FolderName>AddImageAsPageBackground</FolderName>
<Order>10</Order>
<DocLink>
<DisplayName>Add image as page background</DisplayName>
<Url>Add+image+as+page+background</Url>
</DocLink>
<InputFiles>
<DataFile>
<Path>..\Data\aspose-total-for-net.jpg</Path>
</DataFile>
</InputFiles>
<OutputFiles>
<DataFile>
<Path>..\Data\output.pdf</Path>
</DataFile>
</OutputFiles>
<Type>Console</Type>
</Example>
</Examples>
</Folder>
<Folder>
<Title>Working With Images</Title>
<Description>This section includes the sample examples for all image related operations which could be performed using Aspose.Pdf.</Description>
<FolderName>WorkingWithImages</FolderName>
<Order>2</Order>
<Examples>
<Example>
<Title>Convert All PDF Pages to JPEG Images</Title>
<Description>The JpegDevice class allows you to convert PDF pages to JPEG images using Aspose.Pdf. This class provides a method named Process which allows you to convert a particular page of the PDF file to JPEG image. If you want to convert all the pages to the images, you need to loop through all the pages of the PDF and then convert each page individually. You first need to create an object of Document class, so you could get the particular page which you want to convert to JPEG. After that, you need to call the Process method to convert the page to JPEG image.</Description>
<FolderName>ConvertPagesToImages</FolderName>
<Order>1</Order>
<DocLink>
<DisplayName>Convert all PDF pages to JPEG Images</DisplayName>
<Url>Convert+all+PDF+pages+to+JPEG+Images</Url>
</DocLink>
<InputFiles>
<DataFile>
<Path>..\Data\input.pdf</Path>
</DataFile>
</InputFiles>
<OutputFiles>
<DataFile>
<Path>..\Data\image1.jpg</Path>
</DataFile>
<DataFile>
<Path>..\Data\image2.jpg</Path>
</DataFile>
<DataFile>
<Path>..\Data\image3.jpg</Path>
</DataFile>
</OutputFiles>
<Type>Console</Type>
</Example>
<Example>
<Title>Add Image In Existing PDF file</Title>
<Description>In this example, we will see how we can add image in a PDF document using Aspose.Pdf.</Description>
<FolderName>AddImageInExistingPDF</FolderName>
<Order>2</Order>
<DocLink>
<DisplayName>Add Image in existing PDF file</DisplayName>
<Url>Add+Image+in+existing+PDF+file</Url>
</DocLink>
<InputFiles>
<DataFile>
<Path>..\Data\input.pdf</Path>
</DataFile>
<DataFile>
<Path>..\Data\aspose-logo.jpg</Path>
</DataFile>
</InputFiles>
<OutputFiles>
<DataFile>
<Path>..\Data\output.pdf</Path>
</DataFile>
</OutputFiles>
<Type>Console</Type>
</Example>
<Example>
<Title>Delete Images From The PDF File</Title>
<Description>In this example, we will see how we can delete the image from the PDF file using Aspose.Pdf.</Description>
<FolderName>DeleteImages</FolderName>
<Order>3</Order>
<DocLink>
<DisplayName>Delete Images from the PDF File</DisplayName>
<Url>Delete+Images+from+the+PDF+File</Url>
</DocLink>
<InputFiles>
<DataFile>
<Path>..\Data\input.pdf</Path>
</DataFile>
</InputFiles>
<OutputFiles>
<DataFile>
<Path>..\Data\output.pdf</Path>
</DataFile>
</OutputFiles>
<Type>Console</Type>
</Example>
<Example>
<Title>Extract Images From The PDF File</Title>
<Description>In this example, we will see how we can extract images from the PDF file using Aspose.Pdf.</Description>
<FolderName>ExtractImages</FolderName>
<Order>4</Order>
<DocLink>
<DisplayName>Extract Images from the PDF File</DisplayName>
<Url>Extract+Images+from+the+PDF+File</Url>
</DocLink>
<InputFiles>
<DataFile>
<Path>..\Data\input.pdf</Path>
</DataFile>
</InputFiles>
<OutputFiles>
<DataFile>
<Path>..\Data\output.pdf</Path>
</DataFile>
<DataFile>
<Path>..\Data\output.jpg</Path>
</DataFile>
</OutputFiles>
<Type>Console</Type>
</Example>
<Example>
<Title>Replace Image In An Existing PDF File</Title>
<Description>In this example, we will see how we can replace an image in a PDF file using Aspose.Pdf.</Description>
<FolderName>ReplaceImage</FolderName>
<Order>5</Order>
<DocLink>
<DisplayName>Replace Image in an Existing PDF File</DisplayName>
<Url>Replace+Image+in+an+Existing+PDF+File</Url>
</DocLink>
<InputFiles>
<DataFile>
<Path>..\Data\input.pdf</Path>
</DataFile>
<DataFile>
<Path>..\Data\aspose-logo.jpg</Path>
</DataFile>
</InputFiles>
<OutputFiles>
<DataFile>
<Path>..\Data\output.pdf</Path>
</DataFile>
</OutputFiles>
<Type>Console</Type>
</Example>
<Example>
<Title>Convert PDF Pages To JPEG images</Title>
<Description>In this example, we will see how we can convert all the PDF page to JPEG image using Aspose.Pdf.</Description>
<FolderName>ConvertPDFPages</FolderName>
<Order>6</Order>
<DocLink>
<DisplayName>Convert PDF pages to JPEG images</DisplayName>
<Url>Convert+PDF+pages+to+JPEG+images</Url>
</DocLink>
<InputFiles>
<DataFile>
<Path>..\Data\input.pdf</Path>
</DataFile>
</InputFiles>
<OutputFiles>
<DataFile>
<Path>..\Data\image1.jpg</Path>
</DataFile>
<DataFile>
<Path>..\Data\image2.jpg</Path>
</DataFile>
<DataFile>
<Path>..\Data\image3.jpg</Path>
</DataFile>
</OutputFiles>
<Type>Console</Type>
</Example>
<Example>
<Title>Convert Particular PDF Page To PNG Image</Title>
<Description>In this example, we will see how we can convert a particular page of the PDF file to PNG image using Aspose.Pdf.</Description>
<FolderName>ConvertParticularPDFPageToPNG</FolderName>
<Order>7</Order>
<DocLink>
<DisplayName>Convert particular PDF page to PNG Image</DisplayName>
<Url>Convert+particular+PDF+page+to+PNG+Image</Url>
</DocLink>
<InputFiles>
<DataFile>
<Path>..\Data\input.pdf</Path>
</DataFile>
</InputFiles>
<OutputFiles>
<DataFile>
<Path>..\Data\aspose-logo.png</Path>
</DataFile>
</OutputFiles>
<Type>Console</Type>
</Example>
<Example>
<Title>Convert All PDF Pages To PNG Images</Title>
<Description>In this example, we will see how we can convert all the PDF page to PNG images using Aspose.Pdf.</Description>
<FolderName>ConvertAllPDFPagesToPNG</FolderName>
<Order>8</Order>
<DocLink>
<DisplayName>Convert all PDF pages to PNG Images</DisplayName>
<Url>Convert+all+PDF+pages+to+PNG+Images</Url>
</DocLink>
<InputFiles>
<DataFile>
<Path>..\Data\input.pdf</Path>
</DataFile>
</InputFiles>
<OutputFiles>
<DataFile>
<Path>..\Data\image1.png</Path>
</DataFile>
<DataFile>
<Path>..\Data\image2.png</Path>
</DataFile>
<DataFile>
<Path>..\Data\image3.png</Path>
</DataFile>
</OutputFiles>
<Type>Console</Type>
</Example>
<Example>
<Title>Convert Particular PDF Page To TIFF Image</Title>
<Description>In this example, we will see how we can convert a particular page of the PDF file to TIFF image using Aspose.Pdf.</Description>
<FolderName>ConvertParticularPDFPageToTIFF</FolderName>
<Order>9</Order>
<DocLink>
<DisplayName>Convert Particular PDF Page to TIFF Image</DisplayName>
<Url>Convert+Particular+PDF+Page+to+TIFF+Image</Url>
</DocLink>
<InputFiles>
<DataFile>
<Path>..\Data\input.pdf</Path>
</DataFile>
</InputFiles>
<OutputFiles>
<DataFile>
<Path>..\Data\output.tif</Path>
</DataFile>
</OutputFiles>
<Type>Console</Type>
</Example>
<Example>
<Title>Convert All PDF Pages Tto EMF Images</Title>
<Description>In this example, we will see how we can convert all PDF pages to EMF image using Aspose.Pdf.</Description>
<FolderName>ConvertallPDFPagesToEMFImages</FolderName>
<Order>10</Order>
<DocLink>
<DisplayName>Convert all PDF Pages to EMF Images</DisplayName>
<Url>Convert+all+PDF+Pages+to+EMF+Images</Url>
</DocLink>
<InputFiles>
<DataFile>
<Path>..\Data\input.pdf</Path>
</DataFile>
</InputFiles>
<OutputFiles>
<DataFile>
<Path>..\Data\image1.emf</Path>
</DataFile>
<DataFile>
<Path>..\Data\image2.emf</Path>
</DataFile>
<DataFile>
<Path>..\Data\image3.emf</Path>
</DataFile>
</OutputFiles>
<Type>Console</Type>
</Example>
<Example>
<Title>Convert CGM Image To PDF</Title>
<Description>In this example, we will see how we can convert CGM image to PDF using Aspose.Pdf.</Description>
<FolderName>ConvertCGMImageToPDF</FolderName>
<Order>11</Order>
<DocLink>
<DisplayName>Convert CGM image to PDF</DisplayName>
<Url>Convert+CGM+image+to+PDF</Url>
</DocLink>
<Type>Console</Type>
</Example>
<Example>
<Title>Search And Get Images From PDF Document</Title>
<Description>In this example, we will see how we can search and get the images from all the pages in a PDF document using Aspose.Pdf.</Description>
<FolderName>SearchAndGetImages</FolderName>
<Order>13</Order>
<DocLink>
<DisplayName>Search and get images from PDF Document</DisplayName>
<Url>Search+and+get+images+from+PDF+Document</Url>
</DocLink>
<InputFiles>
<DataFile>
<Path>..\Data\input.pdf</Path>
</DataFile>
</InputFiles>
<Type>Console</Type>
</Example>
<Example>
<Title>Convert Particular PDF Page To EMF Image</Title>
<Description>In this example, we will see how we can convert particular page to EMF image using Aspose.Pdf.</Description>
<FolderName>ConvertParticularPDFPageToEMF</FolderName>
<Order>14</Order>
<DocLink>
<DisplayName>Convert Particular PDF page to EMF Image</DisplayName>
<Url>Convert+Particular+PDF+page+to+EMF+Image</Url>
</DocLink>
<InputFiles>
<DataFile>
<Path>..\Data\input.pdf</Path>
</DataFile>
</InputFiles>
<OutputFiles>
<DataFile>
<Path>..\Data\image.emf</Path>
</DataFile>
</OutputFiles>
<Type>Console</Type>
</Example>
</Examples>
<Folders>
<Folder>
<Title>Get The Resolution And Dimensions Of Embedded Images</Title>
<Description>This topic includes the following examples:
- Getting Image Information without Extracting the Images
- Working with Image Placement</Description>
<FolderName>GetResolutionAndDimensionsOfEmbeddedImages</FolderName>
<Order>12</Order>
<Examples>
<Example>
<Title>Getting Image Information Without Extracting The Images</Title>
<Description>In this example, we will see how we can get the image informatio n without extracting the images using Aspose.Pdf.</Description>
<FolderName>GettingImageInformation</FolderName>
<Order>1</Order>
<DocLink>
<DisplayName>Getting Image Information without Extracting the Images</DisplayName>
<Url>Get+the+resolution+and+dimensions+of+embedded+images</Url>
</DocLink>
<InputFiles>
<DataFile>
<Path>..\Data\input.pdf</Path>
</DataFile>
</InputFiles>
<Type>Console</Type>
</Example>
<Example>
<Title>Working With Image Placement</Title>
<Description>In this example, we will see how we can get an image's position in a PDF document using Aspose.Pdf.</Description>
<FolderName>WorkingWithImagePlacement</FolderName>
<Order>2</Order>
<DocLink>
<DisplayName>Working with Image Placement</DisplayName>
<Url>Get+the+resolution+and+dimensions+of+embedded+images</Url>
</DocLink>
<InputFiles>
<DataFile>
<Path>..\Data\input.pdf</Path>
</DataFile>
</InputFiles>
<Type>Console</Type>
</Example>
</Examples>
</Folder>
</Folders>
</Folder>
<Folder>
<Title>Working With Text</Title>
<Description>This section includes sample examples for all the text operations which could be performed using Aspose.PDF</Description>
<FolderName>WorkingWithText</FolderName>
<Order>3</Order>
<Examples>
<Example>
<Title>Replace Text in All Pages of PDF</Title>
<Description>In order to replace text in all the pages of a PDF document, you first need to use TextFragmentAbsorber to find the particular phrase you want to replace. After that, you need to go through all the TextFragments to replace the text and change any other attributes. Once you have done that, you only need to save the output PDF using Save method of the Document object. The example elaborates this in detail to replace text in a PDF document.</Description>
<FolderName>ReplaceTextAllPages</FolderName>
<Order>1</Order>
<DocLink>
<DisplayName>Replace Text in All Pages of a PDF Document</DisplayName>
<Url>Replace+Text+in+All+Pages+of+a+PDF+Document</Url>
</DocLink>
<InputFiles>
<DataFile>
<Path>..\Data\input.pdf</Path>
</DataFile>
</InputFiles>
<OutputFiles>
<DataFile>
<Path>..\Data\output.pdf</Path>
</DataFile>
</OutputFiles>
<Type>Console</Type>
</Example>
<Example>
<Title>Extract Text From All the Pages of a PDF Document</Title>
<Description>Extracting text from a PDF document is a common requirement. In this example, you will see how Aspose.Pdf for .NET allows to extract text from all the pages of a PDF document. You need to create an object of TextAbsorber class. After that, open the PDF using Document class and call Accept method of the Pages collection. The TextAbsorber class absorbs the text from the document and returns in Text property.</Description>
<FolderName>ExtractTextFromAllPagesOfPDF</FolderName>
<Order>2</Order>
<DocLink>
<DisplayName>Extract Text From All the Pages of a PDF Document</DisplayName>
<Url>Extract+Text+From+All+the+Pages+of+a+PDF+Document</Url>
</DocLink>
<InputFiles>
<DataFile>
<Path>..\Data\input.pdf</Path>
</DataFile>
</InputFiles>
<OutputFiles>
<DataFile>
<Path>..\Data\extracted-text.txt</Path>
</DataFile>
</OutputFiles>
<Type>Console</Type>
</Example>
<Example>
<Title>Extract Text from an Individual Page of the PDF Document</Title>
<Description>TextAbsorber class allows you to extract text from a particular page of a PDF document. This class returns the extracted text in Text property. The Accept method of an individual page is called to extract the text. Create objects of Document and TextAbsorber classes. Call Accept method on the individual page, as PageIndex , of Document object. The Index is the particular page number from where text needs to be extracted. You can get text from the Text property of the TextAbsorber class.</Description>
<FolderName>ExtractTextFromIndividualPageOfPDF</FolderName>
<Order>3</Order>
<DocLink>
<DisplayName>Extract Text from an Individual Page of the PDF Document</DisplayName>
<Url>Extract+Text+from+an+Individual+Page+of+the+PDF+Document</Url>
</DocLink>
<InputFiles>
<DataFile>
<Path>..\Data\input.pdf</Path>
</DataFile>
</InputFiles>
<OutputFiles>
<DataFile>
<Path>..\Data\extracted-text.txt</Path>
</DataFile>
</OutputFiles>
<Type>Console</Type>
</Example>
<Example>
<Title>Search and Get Text from All the Pages of PDF Document</Title>
<Description>TextFragmentAbsorber allows you to find text, matching a particular phrase, from all the pages of a PDF document. In order to search text from the whole document, you need to call the Accept method of Pages collection. The Accept method takes TextFragmentAbsorber object as parameter, which returns a collection of TextFragment objects. You can loop through all the fragments and get their properties like Text , Position ( XIndent , YIndent ), FontName , FontSize , IsAccessible , IsEmbedded , IsSubset , ForegroundColor ** etc.</Description>
<FolderName>SearchAndGetTextFromAllPagesOfPDF</FolderName>
<Order>4</Order>
<DocLink>
<DisplayName>Search and Get Text from All the Pages of PDF Document</DisplayName>
<Url>Search+and+Get+Text+from+All+the+Pages+of+PDF+Document</Url>
</DocLink>
<InputFiles>
<DataFile>
<Path>..\Data\input.pdf</Path>
</DataFile>
</InputFiles>
<Type>Console</Type>
</Example>
<Example>
<Title>Search and Get Text from a Single Page of a PDF Document</Title>
<Description>TextFragmentAbsorber allows you to find text, matching a particular phrase, from a particular page of a PDF document. In order to search text from an individual page, you need to call the Accept method of that particular as Page Index . The Index represents a particular page number. The Accept method takes TextFragmentAbsorber object as parameter, which returns a collection of TextFragment objects. You can loop through all the fragments and get their properties like Text , Position ( XIndent , YIndent ), FontName , FontSize , IsAccessible , IsEmbedded , IsSubset , ForegroundColor ** etc.</Description>
<FolderName>SearchAndGetTextFromSinglePageOfPDF</FolderName>
<Order>5</Order>
<DocLink>
<DisplayName>Search and Get Text from a Single Page of a PDF Document</DisplayName>
<Url>Search+and+Get+Text+from+a+Single+Page+of+a+PDF+Document</Url>
</DocLink>
<InputFiles>
<DataFile>
<Path>..\Data\input.pdf</Path>
</DataFile>
</InputFiles>
<Type>Console</Type>
</Example>
<Example>
<Title>Search and Get Text Segments from All Pages of PDF Document</Title>
<Description>In order to search text segments from all the pages, you first need to get the TextFragment objects from the document . TextFragmentAbsorber allows you to find text, matching a particular phrase, from all the pages of a PDF document. In order to search text from the whole document, you need to call the Accept method of Pages collection. The Accept method takes TextFragmentAbsorber object as parameter, which returns a collection of TextFragment objects.</Description>
<FolderName>SearchAndGetTextSegmentsFromAllPagesOfPDF</FolderName>
<Order>6</Order>
<DocLink>
<DisplayName>Search and Get Text Segments from All Pages of PDF Document</DisplayName>
<Url>Search+and+Get+Text+Segments+from+All+Pages+of+PDF+Document</Url>
</DocLink>
<InputFiles>
<DataFile>
<Path>..\Data\input.pdf</Path>
</DataFile>
</InputFiles>
<Type>Console</Type>
</Example>
<Example>
<Title>Search and Get Text Segments From an Individual Page of PDF Document</Title>
<Description>In order to search text segments from a single page, you first need to get the TextFragment objects from the document . TextFragmentAbsorber allows you to find text, matching a particular phrase, from an individual page of a PDF document. In order to search text from a particular page, you need to call the Accept method of that particular page as Pages Index . Index represents the page number from where text needs to be extracted. The Accept method takes TextFragmentAbsorber object as parameter, which returns a collection of TextFragment objects.</Description>
<FolderName>SearchAndGetTextSegmentsFromIndividualPageOfPDF</FolderName>
<Order>7</Order>
<DocLink>
<DisplayName>Search and Get Text Segments From an Individual Page of PDF Document</DisplayName>
<Url>Search+and+Get+Text+Segments+From+an+Individual+Page+of+PDF+Document</Url>
</DocLink>
<InputFiles>
<DataFile>
<Path>..\Data\input.pdf</Path>
</DataFile>
</InputFiles>
<Type>Console</Type>
</Example>
<Example>
<Title>Search and get Text from all pages using Regular Expression</Title>
<Description>TextFragmentAbsorber helps you search and retrieve text, from all the pages, based on regular expression. First you need to pass a regular expression to TextFragmentAbsorber constructor as the phrase. After that you have to set the TextSearchOptions property of the TextFragmentAbsorber object. This property requires TextSearchOptions object and you need to pass true as parameter to its constructor while creating new object. As you want to retrieve matching text from all the pages, you need to call Accept method of Pages collection. TextFragmentAbsorber returns a TextFragmentCollection containing all the fragments matching the criteria specified by the regular expression.</Description>
<FolderName>SearchAndGetTextFromAllPagesUsingRegularExpression</FolderName>
<Order>8</Order>
<DocLink>
<DisplayName>Search and get Text from all pages using Regular Expression</DisplayName>
<Url>Search+and+get+Text+from+all+pages+using+Regular+Expression</Url>
</DocLink>
<InputFiles>
<DataFile>
<Path>..\Data\input.pdf</Path>
</DataFile>
</InputFiles>
<Type>Console</Type>
</Example>
<Example>
<Title>Search and Get Text from a Single Page Using Regular Expression</Title>
<Description>TextFragmentAbsorber helps you search and retrieve text, from a single page, based on regular expression. First you need to pass a regular expression to TextFragmentAbsorber constructor as the phrase. After that you have to set the TextSearchOptions property of the TextFragmentAbsorber object. This property requires TextSearchOptions object and you need to pass true as parameter to its constructor while creating new object. As you want to retrieve matching text from a particular page, you need to call Accept method of that individual page as Pages Index. Index represents the page number. TextFragmentAbsorber returns a TextFragmentCollection containing all the fragments matching the criteria specified by the regular expression</Description>
<FolderName>SearchAndGetTextFromSinglePageUsingRegularExpression</FolderName>
<Order>9</Order>
<DocLink>
<DisplayName>Search and Get Text from a Single Page Using Regular Expression</DisplayName>
<Url>Search+and+Get+Text+from+a+Single+Page+Using+Regular+Expression</Url>
</DocLink>
<InputFiles>
<DataFile>
<Path>..\Data\input.pdf</Path>
</DataFile>
</InputFiles>
<Type>Console</Type>
</Example>
<Example>
<Title>Replace Text in a Single Page of a PDF Document</Title>
<Description>N order to replace text in a single page, you need to get TextFragments of that particular page. For that matter, you first need to create TextFragmentAbsorber with the phrase you want to replace. Once you get all the TextFragments , you can loop though them and replace the text and other attributes. After that, you need to save the updated PDF using Save method of Document object.</Description>
<FolderName>ReplaceTextInSinglePageOfPDF</FolderName>
<Order>10</Order>
<DocLink>
<DisplayName>Replace Text in a Single Page of a PDF Document</DisplayName>
<Url>Replace+Text+in+a+Single+Page+of+a+PDF+Document</Url>
</DocLink>
<InputFiles>
<DataFile>
<Path>..\Data\input.pdf</Path>
</DataFile>
</InputFiles>
<OutputFiles>
<DataFile>
<Path>..\Data\output.pdf</Path>
</DataFile>
</OutputFiles>
<Type>Console</Type>
</Example>
<Example>
<Title>Search Text Based On Regex And Replace With Hyperlink</Title>
<Description>In this example, we will see how we can search text inside PDF file using a regular expression and replacing the matches with a hyperlink using Aspose.Pdf.</Description>
<FolderName>SearchTextBasedOnRegex</FolderName>
<Order>11</Order>
<DocLink>
<DisplayName>Search Text Based on Regex and Replace with Hyperlink</DisplayName>
<Url>http://www.aspose.com/docs/display/pdfnet/Search+Text+Based+on+Regex+and+Replace+with+Hyperlink</Url>
</DocLink>
<InputFiles>
<DataFile>
<Path>..\Data\Input_new.pdf</Path>
</DataFile>
</InputFiles>
<OutputFiles>
<DataFile>
<Path>..\Data\TextReplaced_with_Links.pdf</Path>
</DataFile>
</OutputFiles>
<Type>Console</Type>
</Example>
</Examples>
</Folder>
<Folder>
<Title>Working with Document Conversion</Title>
<Description>This section includes examples related to the following topics:
- Convert PCL file to PDF format
- Convert PDF file into DOC format
- Convert PDF file into HTML format
- Convert PDF file into TeX format
- Convert PDF File to PDF-A
- Convert SVG file to PDF format
- Convert XPS files to PDF format</Description>
<FolderName>WorkWithDocumentConversion</FolderName>
<Order>4</Order>
<Examples>
<Example>
<Title>Convert PDF file into DOC format</Title>
<Description>Aspose.Pdf for .NET provides two liner code to transform source PDF file into resultant .DOC file. In order to accomplish this feature, a new enumeration named SaveFormat has been introduced and its value .Doc enables us to save the source file into MS word format. This examples describes the saving of PDF to .DOC using two liner code and also depicts the use of SaveOptions and other parameters that could be used in saving a PDF to .DOC</Description>
<FolderName>ConvertPDFToDOC</FolderName>
<Order>1</Order>
<DocLink>
<DisplayName>Convert PDF file into DOC format</DisplayName>
<Url>Convert+PDF+file+into+DOC+format</Url>
</DocLink>
<InputFiles>
<DataFile>
<Path>..\Data\input.pdf</Path>
</DataFile>
</InputFiles>
<OutputFiles>
<DataFile>
<Path>..\Data\saveOptionsOutput.doc</Path>
</DataFile>
<DataFile>
<Path>..\Data\simpleOutput.doc</Path>
</DataFile>
</OutputFiles>
<Type>Console</Type>
</Example>
<Example>
<Title>Convert PCL file to PDF format</Title>
<Description>PCL (Printer Command Language) is a Hewlett-Packard printer language has developed to access standard printer features. PCL levels 1 through 5e/5c are command based languages using control sequences that are processed and interpreted in the order they are received. At a consumer level, PCL data streams are generated by a print driver. PCL output can also be easily generated by custom applications
In order to accomplish this feature, we have introduced a class named PclLoadOptions which is used to initialize LoadOptions object. Later on this object is passed as an argument during Document object initialization and it helps the PDF rendering engine to determine the input format of source document. This example shows the process of converting PCL file into PDF format in detail.</Description>
<FolderName>ConvertPCLToPDF</FolderName>
<Order>2</Order>
<DocLink>
<DisplayName>Convert PCL file to PDF format</DisplayName>
<Url>Convert+PCL+file+to+PDF+format</Url>
</DocLink>
<InputFiles>
<DataFile>
<Path>..\Data\test.pcl</Path>
</DataFile>
</InputFiles>
<OutputFiles>
<DataFile>
<Path>..\Data\test-converted.pdf</Path>
</DataFile>
</OutputFiles>
<Type>Console</Type>
</Example>
<Example>
<Title>Convert PDF file into HTML format</Title>
<Description>Keeping alive the tradition of making things simple and understandable, Aspose.Pdf for .NET provides two liner code to transform source PDF file into resultant .Html file. In order to accomplish this requirement, the enumeration named SaveFormat contains a value .Html which will enable you to save the source file into Html format. This example demonstrates PDF to HTML conversion.</Description>
<FolderName>ConvertPDFToHTML</FolderName>
<Order>3</Order>
<DocLink>
<DisplayName>Convert PDF file into HTML format</DisplayName>
<Url>Convert+PDF+file+into+HTML+format</Url>
</DocLink>
<InputFiles>
<DataFile>
<Path>..\Data\input.pdf</Path>
</DataFile>
</InputFiles>
<OutputFiles>
<DataFile>
<Path>..\Data\output_files\style.css</Path>
</DataFile>
<DataFile>
<Path>..\Data\output_files\img_02.svg</Path>
</DataFile>
<DataFile>
<Path>..\Data\output_files\img_01.svg</Path>
</DataFile>
<DataFile>
<Path>..\Data\output.html</Path>
</DataFile>
</OutputFiles>
<Type>Console</Type>
</Example>
<Example>
<Title>Convert XPS files to PDF format</Title>
<Description>The XPS file type is primarily associated with 'XML Paper Specification' by Microsoft Corporation. The XML Paper Specification (XPS), formerly codenamed Metro and subsuming the Next Generation Print Path (NGPP) marketing concept, is Microsoft's initiative to integrate document creation and viewing into its Windows operating system.
In order to convert XPS to PDF with the help of Aspose.Pdf, we have introduced a class named XpsLoadOptions which is used to initialize LoadOptions object. Later on this object is passed as an argument during Document object initialization and it helps the PDF rendering engine to determine the input format of source document. This example depicts the conversion using Aspose.Pdf</Description>
<FolderName>ConvertXPSToPDF</FolderName>
<Order>4</Order>
<DocLink>
<DisplayName>Convert XPS files to PDF format</DisplayName>
<Url>Convert+XPS+files+to+PDF+format</Url>
</DocLink>
<InputFiles>
<DataFile>
<Path>..\Data\test.xps</Path>
</DataFile>
</InputFiles>
<OutputFiles>
<DataFile>
<Path>..\Data\resultant.pdf</Path>
</DataFile>
</OutputFiles>
<Type>Console</Type>
</Example>
<Example>
<Title>Convert PDF File to PDF-A</Title>
<Description>Aspose.Pdf allows you to convert the PDF file to PDF/A-1b compliant PDF file. You can convert the PDF using Convert method of the Document class. Before converting the PDF to PDF/A compliant file, you need to validate the PDF using Validate method. The validation result is stored in the XML file and then this result is also passed to the Convert method. You can also specify the action for the elements which cannot be converted using ConvertErrorAction enumeration. This example elaborates the conversion from PDF to PDF-A using Aspose.Pdf</Description>
<FolderName>ConvertPDFToPDFA</FolderName>
<Order>5</Order>
<DocLink>
<DisplayName>Convert PDF File to PDF-A</DisplayName>
<Url>Convert+PDF+File+to+PDF-A</Url>
</DocLink>
<InputFiles>
<DataFile>
<Path>..\Data\input.pdf</Path>
</DataFile>
</InputFiles>
<OutputFiles>
<DataFile>
<Path>..\Data\log.xml</Path>
</DataFile>
<DataFile>
<Path>..\Data\output.pdf</Path>
</DataFile>
</OutputFiles>
<Type>Console</Type>
</Example>
<Example>
<Title>Convert PDF to ePUB format</Title>
<Description>Aspose.Pdf for .NET also supports the feature to convert PDF document to EPUB format. Aspose.Pdf for .NET has a class named EpubSaveOptions which can be used as second argument to Document.Save(..) method, in order to generate ePUB file.</Description>
<FolderName>ConvertPDFToEPUB</FolderName>
<Order>6</Order>
<DocLink>
<DisplayName>Convert PDF to ePUB format</DisplayName>
<Url>Convert+PDF+to+ePUB+format</Url>
</DocLink>
<InputFiles>
<DataFile>
<Path>..\Data\input.pdf</Path>
</DataFile>
</InputFiles>
<OutputFiles>
<DataFile>
<Path>..\Data\Sample.epub</Path>
</DataFile>
</OutputFiles>
<Type>Console</Type>
</Example>
<Example>
<Title>Convert SVG file to PDF format</Title>
<Description>To convert SVG files to PDF, use the class named SvgLoadOptions which is used to initialize the LoadOptions object. Later, this object is passed as an argument during the Document object initialization and helps the PDF rendering engine to determine the input format of the source document.</Description>
<FolderName>ConvertSVGToPDF</FolderName>
<Order>7</Order>
<DocLink>
<DisplayName>Convert SVG file to PDF format</DisplayName>
<Url>Convert+SVG+file+to+PDF+format</Url>
</DocLink>
<InputFiles>
<DataFile>
<Path>..\Data\Example.svg</Path>
</DataFile>
</InputFiles>
<OutputFiles>
<DataFile>
<Path>..\Data\converted.pdf</Path>
</DataFile>
</OutputFiles>
<Type>Console</Type>
</Example>
<Example>
<Title>Get SVG dimensions</Title>
<Description>We can also get the dimensions information of source SVG file being used. This information can be useful if we want the SVG to cover the entire page of resultant PDF document. A property named AdjustPageSize is present in SvgLoadOption class which fulfills this requirement. The default value of this property is false. If the value is set to true, then resultant PDF document will have same size (dimensions) as source svg file.</Description>
<FolderName>GetSVGDimensions</FolderName>
<Order>8</Order>
<DocLink>
<DisplayName>Convert SVG file to PDF format</DisplayName>
<Url>Convert+SVG+file+to+PDF+format</Url>
</DocLink>
<InputFiles>
<DataFile>
<Path>..\Data\Example.svg</Path>
</DataFile>
</InputFiles>
<OutputFiles>
<DataFile>
<Path>..\Data\SVG_test.pdf</Path>
</DataFile>
</OutputFiles>
<Type>Console</Type>
</Example>
<Example>
<Title>Convert PDF file into TeX format</Title>
<Description>The LaTeX file format is a text file format with markup in the LaTeX 2ε derivative of the TeX family of languages and LaTeX is a derived format of the TeX system.</Description>
<FolderName>ConvertPDFToTeX</FolderName>
<Order>9</Order>
<DocLink>
<DisplayName>Convert PDF file into TeX format</DisplayName>
<Url>Convert+PDF+file+into+TeX+format</Url>
</DocLink>
<InputFiles>
<DataFile>
<Path>..\Data\input.pdf</Path>
</DataFile>
</InputFiles>
<OutputFiles>
<DataFile>
<Path>..\Data\Output.tex</Path>