This repository has been archived by the owner on May 2, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Acrobat_API_UDF_Core.au3
1547 lines (1163 loc) · 70.8 KB
/
Acrobat_API_UDF_Core.au3
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
#cs ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Name..................: Acrobat_API_Core_UDF
Description...........: UDF for Adobe Acrobat objects API core functions
Dependencies..........: Adobe Acrobat API
Documentation.........: https://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/iac_api_reference.pdf
https://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/iac_developer_guide.pdf
https://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/acrobat_pdfl_api_reference.pdf
https://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/js_api_reference.pdf
Credits...............: seadoggie01 @ AutoIt (https://www.autoitscript.com/forum/profile/107750-seadoggie01/)
Author................: exorcistas@github.com
Modified..............: 2020-08-02
Version...............: v0.8.9.10b
#ce ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#include-once
#Region GLOBAL_VARIABLES
Global $__ACROBAT_DEBUG = True
;-- PDSaveOptions
Global Enum $__ACROBAT_SaveIncremental = 0, _
$__ACROBAT_SaveFull = 1, _
$__ACROBAT_SaveCopy = 2, _
$__ACROBAT_SaveLinearized = 4, _
$__ACROBAT_SaveWithPSHeader = 8, _
$__ACROBAT_SaveBinaryOK = 10, _
$__ACROBAT_SaveCollectGarbage = 20, _
$__ACROBAT_SaveForceIncremental = 40, _
$__ACROBAT_SaveKeepModDate = 80, _
$__ACROBAT_SaveLeaveOpen = 100
;-- PageViewMode
Global Enum $__ACROBAT_DontCare = 0, _
$__ACROBAT_UseNone, _
$__ACROBAT_UseThumbs, _
$__ACROBAT_UseBookmarks, _
$__ACROBAT_FullScreen
#EndRegion GLOBAL_VARIABLES
#Region ACROBAT_OBJECTS
#cs ===================================================================================================================================
AcroExch.App
AcroExch.AVDoc
AcroExch.PDDoc
AcroExch.HiliteList (unmapped)
AcroExch.AVPageView
AcroExch.PDPage
AcroExch.PDAnnot (unmapped)
AcroExch.PDBookmark (unmapped)
AcroExch.PDTextSelect
AxAcroPDFLib.AxAcroPDF (unmapped)
AcroExch.Point
AcroExch.Rect
AcroExch.Time (unmapped)
#ce ===================================================================================================================================
#EndRegion ACROBAT_OBJECTS
#Region FUNCTIONS_LIST
#cs ===================================================================================================================================
%% AcroExch.App %% The application itself
_AcroExch_App_Create()
_AcroExch_App_Show($_oAcroApp)
_AcroExch_App_Hide($_oAcroApp)
_AcroExch_App_Minimize($_oAcroApp)
_AcroExch_App_Maximize($_oAcroApp)
_AcroExch_App_Restore($_oAcroApp)
_AcroExch_App_GetNumAVDocs($_oAcroApp)
_AcroExch_App_GetActiveDoc($_oAcroApp)
_AcroExch_App_GetAVDoc($_oAcroApp, $_iDocIndex)
_AcroExch_App_CloseAllDocs($_oAcroApp)
_AcroExch_App_Exit($_oAcroApp)
%% AcroExch.AVDoc %% A document as seen in the user interface
_AcroExch_AVDoc_Create()
_AcroExch_AVDoc_Open($_oAcroAVDoc, $_sFullFilePath, $_sTempTitle = "")
_AcroExch_AVDoc_Close($_oAcroAVDoc, $_bNoSave = True)
_AcroExch_AVDoc_BringToFront($_oAcroAVDoc)
_AcroExch_AVDoc_GetViewMode($_oAcroAVDoc)
_AcroExch_AVDoc_SetViewMode($_oAcroAVDoc, $_iType = $__ACROBAT_DontCare)
_AcroExch_AVDoc_FindText($_oAcroAVDoc, $_sText, $_bCaseSensitive = False, $_bReset = True)
_AcroExch_AVDoc_GetAVPageView($_oAcroAVDoc)
_AcroExch_AVDoc_GetPDDoc($_oAcroAVDoc)
%% AcroExch.AVPageView %% The area of the window that displays the contents of a page
_AcroExch_AVPageView_GetDoc($_oAcroAVPageView)
_AcroExch_AVPageView_GetAVDoc($_oAcroAVPageView)
_AcroExch_AVPageView_GetPage($_oAcroAVPageView)
_AcroExch_AVPageView_GoTo($_oAcroAVPageView, $_iPage = 0)
%% AcroExch.PDDoc %% The underlying PDF representation of a document
_AcroExch_PDDoc_Create()
_AcroExch_PDDoc_Open($_oAcroPDDoc, $_sFullFilePath)
_AcroExch_PDDoc_OpenAVDoc($_oAcroPDDoc, $_sTitle = "")
_AcroExch_PDDoc_Close($_oAcroPDDoc)
_AcroExch_PDDoc_Save($_oAcroPDDoc, $_sSaveFullPath, $_iType = $__ACROBAT_SaveFull + $__ACROBAT_SaveCollectGarbage)
_AcroExch_PDDoc_GetFileName($_oAcroPDDoc)
_AcroExch_PDDoc_GetNumPages($_oAcroPDDoc)
_AcroExch_PDDoc_AcquirePage($_oAcroPDDoc, $_iPageIndex = 0)
_AcroExch_PDDoc_InsertPages($_oAcroPDDoc, $_oAcroPDDocSource, $_iSourceNumPages, $_iSourceStartPage = 0, $_iInsertPageAfter = 0, $_bCopyBookmarks = False)
_AcroExch_PDDoc_MovePage($_oAcroPDDoc, $_iPageToMove, $_iMoveAfterThisPage = 0)
_AcroExch_PDDoc_DeletePages($_oAcroPDDoc, $_iStartPage = 0, $_iEndPage = 0)
_AcroExch_PDDoc_CreateTextSelect($_oAcroPDDoc, $_oAcroRect, $_iSelectPage = 0)
_AcroExch_PDDoc_GetJSObject($_oAcroPDDoc)
%% AcroExch.PDPage %% A single page in the PDF representation of a document
_AcroExch_PDPage_GetDoc($_oAcroPDPage)
_AcroExch_PDPage_GetNumber($_oAcroPDPage)
_AcroExch_PDPage_GetSize($_oAcroPDPage)
_AcroExch_PDPage_GetRotate($_oAcroPDPage)
_AcroExch_PDPage_SetRotate($_oAcroPDPage, $_iRotateAngle = 90)
%% AcroExch.PDTextSelect %% A selection of text on a single page
_AcroExch_PDTextSelect_GetNumText($_oAcroPDTextSelect)
_AcroExch_PDTextSelect_GetText($_oAcroPDTextSelect, $_iNumText)
_AcroExch_PDTextSelect_Destroy($_oAcroPDTextSelect)
%% AcroExch.Rect %% A rectange, specified by the top-left and bottom-right points
_AcroExch_Rect_GetBottom($_oAcroRect)
_AcroExch_Rect_GetLeft($_oAcroRect)
_AcroExch_Rect_GetRight($_oAcroRect)
_AcroExch_Rect_GetTop($_oAcroRect)
_AcroExch_Rect_SetBottom($_oAcroRect, $_iValue)
_AcroExch_Rect_SetLeft($_oAcroRect, $_iValue)
_AcroExch_Rect_SetRight($_oAcroRect, $_iValue)
_AcroExch_Rect_SetTop($_oAcroRect, $_iValue)
%% AcroExch.Point %% A point, specified by its x and y coordinates
_AcroExch_Point_GetX($_oAcroPoint)
_AcroExch_Point_GetY($_oAcroPoint)
#ce ===================================================================================================================================
#EndRegion FUNCTIONS_LIST
#Region AcroExch.App
#cs #FUNCTION# ====================================================================================================================
Name...........: _AcroExch_App_Create()
Description ...: Creates Acrobat application object
Documentation..: See <iac_api_reference.pdf>
Parameters.....: -
Returns........: On success, returns Adobe Acrobat application object
On failure, @error is set, FALSE is returned
Remarks........: If object already exists and is found, new object is not created
Author ........: exorcistas@github.com
Modified.......: 2020-07-31
#ce ===============================================================================================================================
Func _AcroExch_App_Create()
Local $_oAcroApp = ObjGet("", "AcroExch.App")
If NOT @error Then Return $_oAcroApp
$_oAcroApp = ObjCreate("AcroExch.App")
If $__ACROBAT_DEBUG Then ConsoleWrite("[_AcroExch_App_Create]: " & $_oAcroApp & @CRLF & @CRLF)
If NOT IsObj($_oAcroApp) Then Return SetError(2, @error, False)
Return $_oAcroApp
EndFunc
#cs #FUNCTION# ====================================================================================================================
Name...........: _AcroExch_App_Show($_oAcroApp)
Description ...: Displays Acrobat application
Documentation..: See <iac_api_reference.pdf>
Parameters.....: {$_oAcroApp} - main Acrobat object
Returns........: On success, returns TRUE
On failure, @error is set, FALSE is returned
Remarks........: Shows the Acrobat application. When the viewer is shown, the user is in control, and the Acrobat application
does not automatically exit when the last automation object is destroyed.
However, it will exit if no documents are being displayed.
Author ........: exorcistas@github.com
Modified.......: 2020-07-31
#ce ===============================================================================================================================
Func _AcroExch_App_Show($_oAcroApp)
If NOT IsObj($_oAcroApp) Then Return SetError(1, 0, False)
$_iRetVal = $_oAcroApp.Show()
If $__ACROBAT_DEBUG Then ConsoleWrite("[_AcroExch_App_Show]: " & Number($_iRetVal) & @CRLF & @CRLF)
If $_iRetVal = 0 Then Return SetError(2, 0, False)
Return True
EndFunc
#cs #FUNCTION# ====================================================================================================================
Name...........: _AcroExch_App_Hide($_oAcroApp)
Description ...: Hides Acrobat application
Documentation..: See <iac_api_reference.pdf>
Parameters.....: {$_oAcroApp} - main Acrobat object
Returns........: On success, returns TRUE
On failure, @error is set, FALSE is returned
Remarks........: Hides the Acrobat application. When the viewer is hidden, the user has no control over it, and the Acrobat application
automatically exits when the last automation object is closed.
Author ........: exorcistas@github.com
Modified.......: 2020-07-31
#ce ===============================================================================================================================
Func _AcroExch_App_Hide($_oAcroApp)
If NOT IsObj($_oAcroApp) Then Return SetError(1, 0, False)
$_iRetVal = $_oAcroApp.Hide()
If $__ACROBAT_DEBUG Then ConsoleWrite("[_AcroExch_App_Hide]: " & Number($_iRetVal) & @CRLF & @CRLF)
If $_iRetVal = 0 Then Return SetError(2, 0, False)
Return True
EndFunc
#cs #FUNCTION# ====================================================================================================================
Name...........: _AcroExch_App_Minimize($_oAcroApp)
Description ...: Minimizes the Acrobat application
Documentation..: See <iac_api_reference.pdf>
Parameters.....: {$_oAcroApp} - main Acrobat object
Returns........: On success, returns TRUE
On failure, @error is set, FALSE is returned
Remarks........: -
Author ........: exorcistas@github.com
Modified.......: 2020-07-31
#ce ===============================================================================================================================
Func _AcroExch_App_Minimize($_oAcroApp)
If NOT IsObj($_oAcroApp) Then Return SetError(1, 0, False)
$_iRetVal = $_oAcroApp.Minimize(1)
If $__ACROBAT_DEBUG Then ConsoleWrite("[_AcroExch_App_Minimize]: " & Number($_iRetVal) & @CRLF & @CRLF)
If $_iRetVal = 0 Then Return SetError(2, 0, False)
Return True
EndFunc
#cs #FUNCTION# ====================================================================================================================
Name...........: _AcroExch_App_Maximize($_oAcroApp)
Description ...: Maximizes the Acrobat application
Documentation..: See <iac_api_reference.pdf>
Parameters.....: {$_oAcroApp} - main Acrobat object
Returns........: On success, returns TRUE
On failure, @error is set, FALSE is returned
Remarks........: -
Author ........: exorcistas@github.com
Modified.......: 2020-07-31
#ce ===============================================================================================================================
Func _AcroExch_App_Maximize($_oAcroApp)
If NOT IsObj($_oAcroApp) Then Return SetError(1, 0, False)
$_iRetVal = $_oAcroApp.Maximize(1)
If $__ACROBAT_DEBUG Then ConsoleWrite("[_AcroExch_App_Maximize]: " & Number($_iRetVal) & @CRLF & @CRLF)
If $_iRetVal = 0 Then Return SetError(2, 0, False)
Return True
EndFunc
#cs #FUNCTION# ====================================================================================================================
Name...........: _AcroExch_App_Restore($_oAcroApp)
Description ...: Restores Acrobat application view
Documentation..: See <iac_api_reference.pdf>
Parameters.....: {$_oAcroApp} - main Acrobat object
Returns........: On success, returns TRUE
On failure, @error is set, FALSE is returned
Remarks........: Restores the main window of the Acrobat application.
Calling this with input set to positive number causes the main window to be
restored to its original size and position and to become active.
Author ........: exorcistas@github.com
Modified.......: 2020-07-31
#ce ===============================================================================================================================
Func _AcroExch_App_Restore($_oAcroApp)
If NOT IsObj($_oAcroApp) Then Return SetError(1, 0, False)
$_iRetVal = $_oAcroApp.Restore(1)
If $__ACROBAT_DEBUG Then ConsoleWrite("[_AcroExch_App_Restore]: " & Number($_iRetVal) & @CRLF & @CRLF)
If $_iRetVal = 0 Then Return SetError(2, 0, False)
Return True
EndFunc
#cs #FUNCTION# ====================================================================================================================
Name...........: _AcroExch_App_GetNumAVDocs($_oAcroApp)
Description ...: Counts number of open Acrobat AVDoc objects
Documentation..: See <iac_api_reference.pdf>
Parameters.....: {$_oAcroApp} - main Acrobat object
Returns........: Number of open AcroExch.AVDoc objects
Remarks........: The maximum number of documents the Acrobat application can open at a time is specified by
<avpMaxOpenDocuments> preference, which can be obtained with <App.GetPreferenceEx> and set by <App.SetPreferenceEx>
Author ........: exorcistas@github.com
Modified.......: 2020-07-31
#ce ===============================================================================================================================
Func _AcroExch_App_GetNumAVDocs($_oAcroApp)
If NOT IsObj($_oAcroApp) Then Return SetError(1, 0, False)
$_iRetVal = $_oAcroApp.GetNumAVDocs()
If $__ACROBAT_DEBUG Then ConsoleWrite("[_AcroExch_App_GetNumAVDocs]: " & Number($_iRetVal) & @CRLF & @CRLF)
Return Number($_iRetVal)
EndFunc
#cs #FUNCTION# ====================================================================================================================
Name...........: _AcroExch_App_GetActiveDoc($_oAcroApp)
Description ...: Gets last active document object
Documentation..: See <iac_api_reference.pdf>
Parameters.....: {$_oAcroApp} - main Acrobat object
Returns........: {$_oAcroPDDoc} - document object
On failure, sets @error, returns FALSE
Remarks........: Gets the frontmost document
Author ........: exorcistas@github.com
Modified.......: 2020-07-31
#ce ===============================================================================================================================
Func _AcroExch_App_GetActiveDoc($_oAcroApp)
If NOT IsObj($_oAcroApp) Then Return SetError(1, 0, False)
$_oAcroPDDoc = $_oAcroApp.GetActiveDoc()
If $__ACROBAT_DEBUG Then ConsoleWrite("[_AcroExch_App_GetActiveDoc]: " & $_oAcroPDDoc & @CRLF & @CRLF)
If NOT IsObj($_oAcroPDDoc) Then Return SetError(2, 0, False)
Return $_oAcroPDDoc
EndFunc
#cs #FUNCTION# ====================================================================================================================
Name...........: _AcroExch_App_GetAVDoc($_oAcroApp, $_iDocIndex)
Description ...: Gets document object by index
Documentation..: See <iac_api_reference.pdf>
Parameters.....: {$_oAcroApp} - main Acrobat object
Returns........: {$_oAcroPDDoc} - document object
On failure, sets @error, returns FALSE
Remarks........: Gets an AVDoc object from its index within the list of open AVDoc objects.
Author ........: exorcistas@github.com
Modified.......: 2020-07-31
#ce ===============================================================================================================================
Func _AcroExch_App_GetAVDoc($_oAcroApp, $_iDocIndex)
If NOT IsObj($_oAcroApp) Then Return SetError(1, 0, False)
$_oAcroPDDoc = $_oAcroApp.GetAVDoc($_iDocIndex)
If $__ACROBAT_DEBUG Then ConsoleWrite("[_AcroExch_App_GetAVDoc]: " & $_oAcroPDDoc & @CRLF & _
"DocIndex: " & $_iDocIndex & @CRLF & @CRLF)
If NOT IsObj($_oAcroPDDoc) Then Return SetError(2, 0, False)
Return $_oAcroPDDoc
EndFunc
#cs #FUNCTION# ====================================================================================================================
Name...........: _AcroExch_App_CloseAllDocs($_oAcroApp)
Description ...: Closes all open documents
Documentation..: See <iac_api_reference.pdf>
Parameters.....: {$_oAcroApp} - main Acrobat object
Returns........: On success, returns TRUE
On failure, sets @error, returns FALSE
Remarks........: You must explicitly close all documents, otherwise the process never exits.
Author ........: exorcistas@github.com
Modified.......: 2020-07-31
#ce ===============================================================================================================================
Func _AcroExch_App_CloseAllDocs($_oAcroApp)
If NOT IsObj($_oAcroApp) Then Return SetError(1, 0, False)
$_iRetVal = $_oAcroApp.CloseAllDocs()
If $__ACROBAT_DEBUG Then ConsoleWrite("[_AcroExch_App_CloseAllDocs]: " & Number($_iRetVal) & @CRLF & @CRLF)
If $_iRetVal = 0 Then Return SetError(2, 0, False)
Return True
EndFunc
#cs #FUNCTION# ====================================================================================================================
Name...........: _AcroExch_App_Exit($_oAcroApp)
Description ...: Exits Acrobat
Documentation..: See <iac_api_reference.pdf>
Parameters.....: {$_oAcroApp} - main Acrobat object
Returns........: On success, returns TRUE
On failure, sets @error, returns FALSE
Remarks........: NOTE: Use <App.CloseAllDocs> to close all documents before calling this method.
Method does not work if application is visible (user is in control of it) - use <App.Hide> before calling this.
Author ........: exorcistas@github.com
Modified.......: 2020-07-31
#ce ===============================================================================================================================
Func _AcroExch_App_Exit($_oAcroApp)
If NOT IsObj($_oAcroApp) Then Return SetError(1, 0, False)
$_iRetVal = $_oAcroApp.Exit()
If $__ACROBAT_DEBUG Then ConsoleWrite("[_AcroExch_App_Exit]: " & Number($_iRetVal) & @CRLF & @CRLF)
If $_iRetVal = 0 Then Return SetError(2, 0, False)
Return True
EndFunc
#EndRegion AcroExch.App
#Region AcroExch.AVDoc
#cs #FUNCTION# ====================================================================================================================
Name...........: _AcroExch_AVDoc_Create()
Description ...: Creates AVDoc object for individual document
Documentation..: See <iac_api_reference.pdf>
Parameters.....: -
Returns........: {$_oAcroAVDoc} - object for individual document
On failure, sets @error, returns FALSE
Remarks........: A view of a PDF document in a window. There is one AVDoc object per displayed document.
Unlike a PDDoc object, an AVDoc object has a window associated with it.
Author ........: exorcistas@github.com
Modified.......: 2020-07-31
#ce ===============================================================================================================================
Func _AcroExch_AVDoc_Create()
Local $_oAcroAVDoc = ObjCreate("AcroExch.AVDoc")
If $__ACROBAT_DEBUG Then ConsoleWrite("[_AcroExch_AVDoc_Create]: " & $_oAcroAVDoc & @CRLF & @CRLF)
If NOT IsObj($_oAcroAVDoc) Then Return SetError(1, @extended, False)
Return $_oAcroAVDoc
EndFunc
#cs #FUNCTION# ====================================================================================================================
Name...........: _AcroExch_AVDoc_Open($_oAcroAVDoc, $_sFullFilePath, $_sTempTitle = "")
Description ...: Opens a file
Documentation..: See <iac_api_reference.pdf>
Parameters.....: {$_oAcroAVDoc} - object to be associated with opened document
{$_sFullFilePath} - path to PDF document
{$_sTempTitle} - (optional) title to be displayed for document
Returns........: On success, returns TRUE
On failure, sets @error, returns FALSE
Remarks........: A new instance of AVDoc must be created for each displayed PDF file.
Author ........: exorcistas@github.com
Modified.......: 2020-07-31
#ce ===============================================================================================================================
Func _AcroExch_AVDoc_Open($_oAcroAVDoc, $_sFullFilePath, $_sTempTitle = "")
If NOT IsObj($_oAcroAVDoc) Then Return SetError(1, 0, False)
$_iRetVal = $_oAcroAVDoc.Open($_sFullFilePath, $_sTempTitle)
If $__ACROBAT_DEBUG Then ConsoleWrite("[_AcroExch_AVDoc_Open]: " & Number($_iRetVal) & @CRLF & _
"FullFilePath: " & $_sFullFilePath & @CRLF & _
"TempTitle: " & $_sTempTitle & @CRLF & @CRLF)
If $_iRetVal = 0 Then Return SetError(2, 0, False)
Return True
EndFunc
#cs #FUNCTION# ====================================================================================================================
Name...........: _AcroExch_AVDoc_Close($_oAcroAVDoc, $_bNoSave = True)
Description ...: Closes a document
Documentation..: See <iac_api_reference.pdf>
Parameters.....: {$_oAcroAVDoc} - object to be associated with opened document
{$_bNoSave} - if TRUE, document closed without saving, otherwise if modified, user is prompted for choice
Returns........: On success, returns TRUE
On failure, sets @error, returns FALSE
Remarks........: -
Author ........: exorcistas@github.com
Modified.......: 2020-07-31
#ce ===============================================================================================================================
Func _AcroExch_AVDoc_Close($_oAcroAVDoc, $_bNoSave = True)
If NOT IsObj($_oAcroAVDoc) Then Return SetError(1, 0, False)
Local $_iSave = 1
If $_bNoSave Then $_iSave = 0
$_iRetVal = $_oAcroAVDoc.Close($_bNoSave)
If $__ACROBAT_DEBUG Then ConsoleWrite("[_AcroExch_AVDoc_Close]: " & Number($_iRetVal) & @CRLF & _
"NoSave: " & $_bNoSave & @CRLF & @CRLF)
If $_iRetVal = -1 Then Return SetError(2, 0, False)
Return True
EndFunc
#cs #FUNCTION# ====================================================================================================================
Name...........: _AcroExch_AVDoc_BringToFront($_oAcroAVDoc)
Description ...: Brings the window to the front
Documentation..: See <iac_api_reference.pdf>
Parameters.....: {$_oAcroAVDoc} - object to be associated with opened document
Returns........: On success, returns TRUE
On failure, sets @error, returns FALSE
Remarks........: -
Author ........: exorcistas@github.com
Modified.......: 2020-07-31
#ce ===============================================================================================================================
Func _AcroExch_AVDoc_BringToFront($_oAcroAVDoc)
If NOT IsObj($_oAcroAVDoc) Then Return SetError(1, 0, False)
$_iRetVal = $_oAcroAVDoc.BringToFront()
If $__ACROBAT_DEBUG Then ConsoleWrite("[_AcroExch_AVDoc_BringToFront]: " & Number($_iRetVal) & @CRLF & @CRLF)
If $_iRetVal = 0 Then Return SetError(2, 0, False)
Return True
EndFunc
#cs #FUNCTION# ====================================================================================================================
Name...........: _AcroExch_AVDoc_GetTitle($_oAcroAVDoc)
Description ...: Gets the window's title
Documentation..: See <iac_api_reference.pdf>
Parameters.....: {$_oAcroAVDoc} - object to be associated with opened document
Returns........: Window title of associated document object
Remarks........: -
Author ........: exorcistas@github.com
Modified.......: 2020-07-31
#ce ===============================================================================================================================
Func _AcroExch_AVDoc_GetTitle($_oAcroAVDoc)
If NOT IsObj($_oAcroAVDoc) Then Return SetError(1, 0, False)
$_sRetVal = $_oAcroAVDoc.GetTitle()
If $__ACROBAT_DEBUG Then ConsoleWrite("[_AcroExch_AVDoc_GetTitle]: " & $_sRetVal & @CRLF & @CRLF)
Return $_sRetVal
EndFunc
#cs #FUNCTION# ====================================================================================================================
Name...........: _AcroExch_AVDoc_GetViewMode($_oAcroAVDoc)
Description ...: Gets the current document view mode
Documentation..: See <iac_api_reference.pdf>
Parameters.....: {$_oAcroAVDoc} - object to be associated with opened document
Returns........: Window view mode of associated document object
Remarks........: 0 - leave the view mode as it is
1 - display without bookmarks or thumbnails
2 - display using thumbnails
3 - display using bookmarks
4 - display in full screen mode
Author ........: exorcistas@github.com
Modified.......: 2020-07-31
#ce ===============================================================================================================================
Func _AcroExch_AVDoc_GetViewMode($_oAcroAVDoc)
If NOT IsObj($_oAcroAVDoc) Then Return SetError(1, 0, False)
$_iRetVal = $_oAcroAVDoc.GetViewMode()
If $__ACROBAT_DEBUG Then ConsoleWrite("[_AcroExch_AVDoc_GetViewMode]: " & Number($_iRetVal) & @CRLF & @CRLF)
Return Number($_iRetVal)
EndFunc
#cs #FUNCTION# ====================================================================================================================
Name...........: _AcroExch_AVDoc_SetViewMode($_oAcroAVDoc, $_iType = $__ACROBAT_DontCare)
Description ...: Sets the mode in which the document will be viewed
Documentation..: See <iac_api_reference.pdf>
Parameters.....: {$_oAcroAVDoc} - object to be associated with opened document
{$_iType} - integer (0-4) representing mode type. See remarks
Returns........: On success, returns TRUE
On failure, sets @error, returns FALSE
Remarks........: 0 - leave the view mode as it is
1 - display without bookmarks or thumbnails
2 - display using thumbnails
3 - display using bookmarks
4 - display in full screen mode
Author ........: exorcistas@github.com
Modified.......: 2020-07-31
#ce ===============================================================================================================================
Func _AcroExch_AVDoc_SetViewMode($_oAcroAVDoc, $_iType = $__ACROBAT_DontCare)
If NOT IsObj($_oAcroAVDoc) Then Return SetError(1, 0, False)
$_iRetVal = $_oAcroAVDoc.SetViewMode($_iType)
If $__ACROBAT_DEBUG Then ConsoleWrite("[_AcroExch_AVDoc_SetViewMode]: " & Number($_iRetVal) & @CRLF & _
"Type: " & $_iType & @CRLF & @CRLF)
If $_iRetVal = 0 Then Return SetError(2, 0, False)
Return True
EndFunc
#cs #FUNCTION# ====================================================================================================================
Name...........: _AcroExch_AVDoc_FindText($_oAcroAVDoc, $_sText, $_bCaseSensitive = False, $_bReset = True)
Description ...: Finds the specified text, scrolls so that it is visible, and highlights it
Documentation..: See <iac_api_reference.pdf>
Parameters.....: {$_oAcroAVDoc} - object to be associated with opened document
{$_sText} - text to search
{$_bCaseSensitive} - search in case sensitive mode
{$_bReset} - start search from 1st page, if false, search from current page
Returns........: On success (text found), returns TRUE
On failure (or text not found), sets @error, returns FALSE
Remarks........: -
Author ........: exorcistas@github.com
Modified.......: 2020-07-31
#ce ===============================================================================================================================
Func _AcroExch_AVDoc_FindText($_oAcroAVDoc, $_sText, $_bCaseSensitive = False, $_bReset = True)
If NOT IsObj($_oAcroAVDoc) Then Return SetError(1, 0, False)
Local $_iCase = 0
If $_bCaseSensitive Then $_iCase = 1
Local $_iPageStart = 0
If $_bReset Then $_iPageStart = 1
$_iRetVal = $_oAcroAVDoc.FindText($_sText, $_iCase, $_iPageStart)
If $__ACROBAT_DEBUG Then ConsoleWrite("[_AcroExch_AVDoc_FindText]: " & Number($_iRetVal) & @CRLF & _
"Text: " & $_sText & @CRLF & _
"CaseSensitive: " & $_bCaseSensitive & @CRLF & _
"Reset: " & $_bReset & @CRLF & @CRLF)
If $_iRetVal = 0 Then Return False
Return True
EndFunc
#cs #FUNCTION# ====================================================================================================================
Name...........: _AcroExch_AVDoc_GetAVPageView($_oAcroAVDoc)
Description ...: Gets AVPageView object associated with AVDoc
Documentation..: See <iac_api_reference.pdf>
Parameters.....: {$_oAcroAVDoc} - object to be associated with opened document
Returns........: AVPageView object
On failure, sets @error, returns FALSE
Remarks........: -
Author ........: exorcistas@github.com
Modified.......: 2020-07-31
#ce ===============================================================================================================================
Func _AcroExch_AVDoc_GetAVPageView($_oAcroAVDoc)
If NOT IsObj($_oAcroAVDoc) Then Return SetError(1, 0, False)
$_oAcroAVPageView = $_oAcroAVDoc.GetAVPageView()
If $__ACROBAT_DEBUG Then ConsoleWrite("[_AcroExch_AVDoc_GetAVPageView]: " & $_oAcroAVPageView & @CRLF & @CRLF)
If NOT IsObj($_oAcroAVPageView) Then Return SetError(2, 0, False)
Return $_oAcroAVPageView
EndFunc
#cs #FUNCTION# ====================================================================================================================
Name...........: _AcroExch_AVDoc_GetPDDoc($_oAcroAVDoc)
Description ...: Gets PDDoc object associated with AVDoc
Documentation..: See <iac_api_reference.pdf>
Parameters.....: {$_oAcroAVDoc} - object to be associated with opened document
Returns........: PDDoc object
On failure, sets @error, returns FALSE
Remarks........: -
Author ........: exorcistas@github.com
Modified.......: 2020-07-31
#ce ===============================================================================================================================
Func _AcroExch_AVDoc_GetPDDoc($_oAcroAVDoc)
If NOT IsObj($_oAcroAVDoc) Then Return SetError(1, 0, False)
$_oAcroPDDoc = $_oAcroAVDoc.GetPDDoc()
If $__ACROBAT_DEBUG Then ConsoleWrite("[_AcroExch_AVDoc_GetPDDoc]: " & $_oAcroPDDoc & @CRLF & @CRLF)
If NOT IsObj($_oAcroPDDoc) Then Return SetError(2, 0, False)
Return $_oAcroPDDoc
EndFunc
#EndRegion AcroExch.AVDoc
#Region AcroExch.AVPageView
#cs #FUNCTION# ====================================================================================================================
Name...........: _AcroExch_AVPageView_GetDoc($_oAcroAVPageView)
Description ...: Gets PDDoc object corresponding to the current page
Documentation..: See <iac_api_reference.pdf>
Parameters.....: {$_oAcroAVPageView} - object to be associated with page of document
Returns........: PDDoc object
On failure, sets @error, returns FALSE
Remarks........: -
Author ........: exorcistas@github.com
Modified.......: 2020-07-31
#ce ===============================================================================================================================
Func _AcroExch_AVPageView_GetDoc($_oAcroAVPageView)
If NOT IsObj($_oAcroAVPageView) Then Return SetError(1, 0, False)
$_oAcroPDDoc = $_oAcroAVPageView.GetDoc()
If $__ACROBAT_DEBUG Then ConsoleWrite("[_AcroExch_AVPageView_GetDoc]: " & $_oAcroPDDoc & @CRLF & @CRLF)
If NOT IsObj($_oAcroPDDoc) Then Return SetError(2, 0, False)
Return $_oAcroPDDoc
EndFunc
#cs #FUNCTION# ====================================================================================================================
Name...........: _AcroExch_AVPageView_GetAVDoc($_oAcroAVPageView)
Description ...: Gets AVDoc object corresponding to the current page
Documentation..: See <iac_api_reference.pdf>
Parameters.....: {$_oAcroAVPageView} - object to be associated with page of document
Returns........: AVDoc object
On failure, sets @error, returns FALSE
Remarks........: -
Author ........: exorcistas@github.com
Modified.......: 2020-07-31
#ce ===============================================================================================================================
Func _AcroExch_AVPageView_GetAVDoc($_oAcroAVPageView)
If NOT IsObj($_oAcroAVPageView) Then Return SetError(1, 0, False)
$_oAcroAVDoc = $_oAcroAVPageView.GetAVDoc()
If $__ACROBAT_DEBUG Then ConsoleWrite("[_AcroExch_AVPageView_GetAVDoc]: " & $_oAcroAVDoc & @CRLF & @CRLF)
If NOT IsObj($_oAcroAVDoc) Then Return SetError(2, 0, False)
Return $_oAcroAVDoc
EndFunc
#cs #FUNCTION# ====================================================================================================================
Name...........: _AcroExch_AVPageView_GetPage($_oAcroAVPageView)
Description ...: Gets PDPage object corresponding to the current page
Documentation..: See <iac_api_reference.pdf>
Parameters.....: {$_oAcroAVPageView} - object to be associated with page of document
Returns........: PDPage object
On failure, sets @error, returns FALSE
Remarks........: -
Author ........: exorcistas@github.com
Modified.......: 2020-07-31
#ce ===============================================================================================================================
Func _AcroExch_AVPageView_GetPage($_oAcroAVPageView)
If NOT IsObj($_oAcroAVPageView) Then Return SetError(1, 0, False)
$_oAcroPDPage = $_oAcroAVPageView.GetPage()
If $__ACROBAT_DEBUG Then ConsoleWrite("[_AcroExch_AVPageView_GetPage]: " & $_oAcroPDPage & @CRLF & @CRLF)
If NOT IsObj($_oAcroPDPage) Then Return SetError(2, 0, False)
Return $_oAcroPDPage
EndFunc
#cs #FUNCTION# ====================================================================================================================
Name...........: _AcroExch_AVPageView_GoTo($_oAcroAVPageView, $_iPage = 0)
Description ...: Goes to specified page
Documentation..: See <iac_api_reference.pdf>
Parameters.....: {$_oAcroAVPageView} - object to be associated with page of document
{$_iPage} - page number (always starts from 0)
Returns........: On success, returns TRUE
On failure, sets @error, returns FALSE
Remarks........: -
Author ........: exorcistas@github.com
Modified.......: 2020-07-31
#ce ===============================================================================================================================
Func _AcroExch_AVPageView_GoTo($_oAcroAVPageView, $_iPage = 0)
If NOT IsObj($_oAcroAVPageView) Then Return SetError(1, 0, False)
$_iRetVal = $_oAcroAVPageView.GoTo($_iPage)
If $__ACROBAT_DEBUG Then ConsoleWrite("[_AcroExch_AVPageView_GoTo]: " & Number($_iRetVal) & @CRLF & _
"Page: " & $_iPage & @CRLF & @CRLF)
If $_iRetVal = 0 Then Return SetError(2, 0, False)
Return True
EndFunc
#EndRegion AcroExch.AVPageView
#Region AcroExch.PDDoc
#cs #FUNCTION# ====================================================================================================================
Name...........: _AcroExch_PDDoc_Create()
Description ...: Creates PDDoc object
Documentation..: See <iac_api_reference.pdf>
Parameters.....: -
Returns........: PDDoc object
On failure, sets @error, returns FALSE
Remarks........: The underlying PDF representation of a document. PDDoc object is the hidden object behind every AVDoc object.
Through PDDoc objects, your application can perform most of the Document menu items from Acrobat (i.e. retrieve information)
Author ........: exorcistas@github.com
Modified.......: 2020-07-31
#ce ===============================================================================================================================
Func _AcroExch_PDDoc_Create()
Local $_oAcroPDDoc = ObjCreate("AcroExch.PDDoc")
If $__ACROBAT_DEBUG Then ConsoleWrite("[_AcroExch_PDDoc_Create]: " & $_oAcroPDDoc & @CRLF & @CRLF)
If NOT IsObj($_oAcroPDDoc) Then Return SetError(2, @extended, False)
Return $_oAcroPDDoc
EndFunc
#cs #FUNCTION# ====================================================================================================================
Name...........: _AcroExch_PDDoc_Open($_oAcroPDDoc, $_sFullFilePath)
Description ...: Opens a file
Documentation..: See <iac_api_reference.pdf>
Parameters.....: {$_oAcroPDDoc} - PDDoc object to associate file
{$_sFullFilePath} - full path to file to open
Returns........: On success, returns TRUE
On failure, sets @error, returns FALSE
Remarks........: New instance of PDDoc must be created for each open PDF file
Author ........: exorcistas@github.com
Modified.......: 2020-07-31
#ce ===============================================================================================================================
Func _AcroExch_PDDoc_Open($_oAcroPDDoc, $_sFullFilePath)
If NOT IsObj($_oAcroPDDoc) Then Return SetError(1, 0, False)
$_iRetVal = $_oAcroPDDoc.Open($_sFullFilePath)
If $__ACROBAT_DEBUG Then ConsoleWrite("[_AcroExch_PDDoc_Open]: " & Number($_iRetVal) & @CRLF & _
"FullFilePath: " & $_sFullFilePath & @CRLF & @CRLF)
If $_iRetVal = 0 Then Return SetError(2, 0, False)
Return True
EndFunc
#cs #FUNCTION# ====================================================================================================================
Name...........: _AcroExch_PDDoc_OpenAVDoc($_oAcroPDDoc, $_sTitle = "")
Description ...: Opens a window and displays document in it
Documentation..: See <iac_api_reference.pdf>
Parameters.....: {$_oAcroPDDoc} - PDDoc object associated with file
{$_sTitle} - (optional) title display for document window
Returns........: AVDoc object
On failure, sets @error, returns FALSE
Remarks........: -
Author ........: exorcistas@github.com
Modified.......: 2020-07-31
#ce ===============================================================================================================================
Func _AcroExch_PDDoc_OpenAVDoc($_oAcroPDDoc, $_sTitle = "")
If NOT IsObj($_oAcroPDDoc) Then Return SetError(1, 0, False)
$_oAcroAVDoc = $_oAcroPDDoc.OpenAVDoc($_sTitle)
If $__ACROBAT_DEBUG Then ConsoleWrite("[_AcroExch_PDDoc_OpenAVDoc]: " & $_oAcroAVDoc & @CRLF & _
"Title: " & $_sTitle & @CRLF & @CRLF)
If NOT IsObj($_oAcroAVDoc) Then Return SetError(2, 0, False)
Return $_oAcroAVDoc
EndFunc
#cs #FUNCTION# ====================================================================================================================
Name...........: _AcroExch_PDDoc_Close($_oAcroPDDoc)
Description ...: Closes a file
Documentation..: See <iac_api_reference.pdf>
Parameters.....: {$_oAcroPDDoc} - PDDoc object associated with file
Returns........: On success, returns TRUE
On failure, sets @error, returns FALSE
Remarks........: If PDDoc and AVDoc are constructed with same file, this method destroys both objects
Author ........: exorcistas@github.com
Modified.......: 2020-07-31
#ce ===============================================================================================================================
Func _AcroExch_PDDoc_Close($_oAcroPDDoc)
If NOT IsObj($_oAcroPDDoc) Then Return SetError(1, 0, False)
$_iRetVal = $_oAcroPDDoc.Close()
If $__ACROBAT_DEBUG Then ConsoleWrite("[_AcroExch_PDDoc_Close]: " & Number($_iRetVal) & @CRLF & @CRLF)
If $_iRetVal = 0 Then Return SetError(2, 0, False)
Return True
EndFunc
#cs #FUNCTION# ====================================================================================================================
Name...........: _AcroExch_PDDoc_Save($_oAcroPDDoc, $_sSaveFullPath, $_iType = $__ACROBAT_SaveFull + $__ACROBAT_SaveCollectGarbage)
Description ...: Saves a document
Documentation..: See <iac_api_reference.pdf>
Parameters.....: {$_oAcroPDDoc} - PDDoc object associated with file
{$_sSaveFullPath} - full path where to save document
{$_iType} - (optional) integer to represent way to save document
Returns........: On success, returns TRUE
On failure, sets @error, returns FALSE
Remarks........: See documentation file for details
Author ........: exorcistas@github.com
Modified.......: 2020-07-31
#ce ===============================================================================================================================
Func _AcroExch_PDDoc_Save($_oAcroPDDoc, $_sSaveFullPath, $_iType = $__ACROBAT_SaveFull + $__ACROBAT_SaveCollectGarbage)
If NOT IsObj($_oAcroPDDoc) Then Return SetError(1, 0, False)
$_iRetVal = $_oAcroPDDoc.Save($_iType, $_sSaveFullPath)
If $__ACROBAT_DEBUG Then ConsoleWrite("[_AcroExch_PDDoc_Save]: " & Number($_iRetVal) & @CRLF & _
"SaveFullPath: " & $_sSaveFullPath & @CRLF & _
"Type: " & $_iType & @CRLF & @CRLF)
If $_iRetVal = 0 Then Return SetError(2, 0, False)
Return True
EndFunc
#cs #FUNCTION# ====================================================================================================================
Name...........: _AcroExch_PDDoc_GetFileName($_oAcroPDDoc)
Description ...: Gets filename associated with PDDoc object
Documentation..: See <iac_api_reference.pdf>
Parameters.....: {$_oAcroPDDoc} - PDDoc object associated with file
Returns........: Filename
On failure, sets @error, returns FALSE
Remarks........: -
Author ........: exorcistas@github.com
Modified.......: 2020-07-31
#ce ===============================================================================================================================
Func _AcroExch_PDDoc_GetFileName($_oAcroPDDoc)
If NOT IsObj($_oAcroPDDoc) Then Return SetError(1, 0, False)
$_sRetVal = $_oAcroPDDoc.GetFileName()
If $__ACROBAT_DEBUG Then ConsoleWrite("[_AcroExch_PDDoc_GetFileName]: " & $_sRetVal & @CRLF & @CRLF)
Return $_sRetVal
EndFunc
#cs #FUNCTION# ====================================================================================================================
Name...........: _AcroExch_PDDoc_GetNumPages($_oAcroPDDoc)
Description ...: Gets number of pages in a file
Documentation..: See <iac_api_reference.pdf>
Parameters.....: {$_oAcroPDDoc} - PDDoc object associated with file
Returns........: Number of pages
On failure, sets @error, returns FALSE
Remarks........: -
Author ........: exorcistas@github.com
Modified.......: 2020-07-31
#ce ===============================================================================================================================
Func _AcroExch_PDDoc_GetNumPages($_oAcroPDDoc)
If NOT IsObj($_oAcroPDDoc) Then Return SetError(1, 0, False)
$_iRetVal = $_oAcroPDDoc.GetNumPages()
If $__ACROBAT_DEBUG Then ConsoleWrite("[_AcroExch_PDDoc_GetNumPages]: " & Number($_iRetVal) & @CRLF & @CRLF)
If $_iRetVal = -1 Then Return SetError(2, 0, False)
Return Number($_iRetVal)
EndFunc
#cs #FUNCTION# ====================================================================================================================
Name...........: _AcroExch_PDDoc_AcquirePage($_oAcroPDDoc, $_iPageIndex = 0)
Description ...: Acquires specified page PDPage object
Documentation..: See <iac_api_reference.pdf>
Parameters.....: {$_oAcroPDDoc} - PDDoc object associated with file
{$_iPageIndex} - (optional) page index (always starts with 0)
Returns........: PDPage object
On failure, sets @error, returns FALSE
Remarks........: -
Author ........: exorcistas@github.com
Modified.......: 2020-07-31
#ce ===============================================================================================================================
Func _AcroExch_PDDoc_AcquirePage($_oAcroPDDoc, $_iPageIndex = 0)
If NOT IsObj($_oAcroPDDoc) Then Return SetError(1, 0, False)
$_oAcroPDPage = $_oAcroPDDoc.AcquirePage($_iPageIndex)
If $__ACROBAT_DEBUG Then ConsoleWrite("[_AcroExch_PDDoc_AcquirePage]: " & $_oAcroPDPage & @CRLF & _
"PageIndex: " & $_iPageIndex & @CRLF & @CRLF)
If NOT IsObj($_oAcroPDPage) Then Return SetError(2, 0, False)
Return $_oAcroPDPage
EndFunc
#cs #FUNCTION# ====================================================================================================================
Name...........: _AcroExch_PDDoc_InsertPages($_oAcroPDDoc, $_oAcroPDDocSource, $_iSourceNumPages, $_iSourceStartPage = 0, $_iInsertPageAfter = 0, $_bCopyBookmarks = False)
Description ...: Inserts specified pages from source document after indicated page with current document
Documentation..: See <iac_api_reference.pdf>