Foxit PDF SDK  9.1
FSPDFViewControl.h
1 
22 #import "FSPDFObjC.h"
23 #import <UIKit/UIKit.h>
24 #import "FSLocalization.h"
25 
26 NS_ASSUME_NONNULL_BEGIN
27 
33 typedef enum {
48 
50 
56 typedef enum {
64 
65 
71 typedef enum {
79 
85 typedef enum {
95 
101 typedef enum {
110 } PDF_CROP_MODE;
111 
116 typedef NS_ENUM(NSInteger, FS_PAGESPACING_DIRECTION) {
120  FS_PAGESPACING_VERTICAL = 0x0002
121 };
122 
127 typedef enum {
139 
140 typedef NS_ENUM(NSUInteger, FSNightColorMode) {
145 };
146 
147 typedef NS_ENUM(NSUInteger, FSGestureLockOptions) {
162 };
163 
165 @protocol IRecoveryEventListener <NSObject>
166 @optional
170 - (void)onWillRecover;
174 - (void)onRecovered;
175 @end
176 
178 @protocol IRotationEventListener <NSObject>
179 @optional
186 - (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration;
193 - (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration;
199 - (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation;
200 @end
201 
203 @protocol IDocEventListener <NSObject>
204 @optional
208 - (void)onDocWillOpen;
215 - (void)onDocOpened:(FSPDFDoc * _Nullable)document error:(int)error;
221 - (void)onDocWillClose:(FSPDFDoc *)document;
228 - (void)onDocClosed:(FSPDFDoc * _Nullable)document error:(int)error;
234 - (void)onDocWillSave:(FSPDFDoc *)document;
241 - (void)onDocSaved:(FSPDFDoc *)document error:(int)error;
242 
250 - (void)onDocLoading:(FSPDFDoc *)document progress:(int)progress;
251 
252 @end
253 
255 @protocol IPageEventListener <NSObject>
256 @optional
265 - (void)onPageChanged:(int)oldIndex currentIndex:(int)currentIndex;
272 - (void)onPageVisible:(int)index;
279 - (void)onPageInvisible:(int)index;
283 - (void)onPageJumped;
290 - (void)onPagesWillRemove:(NSArray<NSNumber *> *)indexes;
298 - (void)onPagesWillMove:(NSArray<NSNumber *> *)indexes dstIndex:(int)dstIndex;
306 - (void)onPagesWillRotate:(NSArray<NSNumber *> *)indexes rotation:(int)rotation;
313 - (void)onPagesRemoved:(NSArray<NSNumber *> *)indexes;
321 - (void)onPagesMoved:(NSArray<NSNumber *> *)indexes dstIndex:(int)dstIndex;
329 - (void)onPagesRotated:(NSArray<NSNumber *> *)indexes rotation:(int)rotation;
335 - (void)onPagesInsertedAtRange:(NSRange)range;
342 - (void)onPagesWillFlatten:(int)index;
349 - (void)onPagesFlattened:(int)index;
350 @end
351 
353 @protocol ILayoutEventListener <NSObject>
354 @optional
363 - (void)onLayoutModeChanged:(PDF_LAYOUT_MODE)oldLayoutMode newLayoutMode:(PDF_LAYOUT_MODE)newLayoutMode;
367 - (void)onLayoutFinished;
368 @end
369 
371 @protocol IScrollViewEventListener <NSObject>
372 @optional
378 - (void)onScrollViewDidScroll:(UIScrollView *)scrollView;
384 - (void)onScrollViewDidZoom:(UIScrollView *)scrollView;
390 - (void)onScrollViewWillBeginDragging:(UIScrollView *)scrollView;
397 - (void)onScrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate;
403 - (void)onScrollViewWillBeginDecelerating:(UIScrollView *)scrollView;
409 - (void)onScrollViewDidEndDecelerating:(UIScrollView *)scrollView;
415 - (void)onScrollViewWillBeginZooming:(UIScrollView *)scrollView;
421 - (void)onScrollViewDidEndZooming:(UIScrollView *)scrollView;
422 @end
423 
424 @class FSPDFViewCtrl;
426 @protocol IViewAppleEventListener <NSObject>
427 @optional
428 
432 - (void)layoutSubviewsFromPDFViewCtrl:(FSPDFViewCtrl *)pdfViewCtrl;
433 
437 - (void)didMoveToWindowFromPDFViewCtrl:(FSPDFViewCtrl *)pdfViewCtrl;
438 
439 @end
440 
442 @protocol IGestureEventListener <NSObject>
443 @optional
452 - (BOOL)onLongPress:(UILongPressGestureRecognizer *)gestureRecognizer;
461 - (BOOL)onTap:(UITapGestureRecognizer *)gestureRecognizer;
470 - (BOOL)onDoubleTap:(UITapGestureRecognizer *)gestureRecognizer;
479 - (BOOL)onPan:(UIPanGestureRecognizer *)gestureRecognizer;
488 - (BOOL)onShouldBegin:(UIGestureRecognizer *)gestureRecognizer;
499 - (BOOL)onPageGestureRecognizer:(int)pageIndex gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch;
500 @end
501 
503 @protocol IDrawEventListener <NSObject>
504 @required
512 - (void)onDraw:(int)pageIndex inContext:(CGContextRef)context;
513 @end
514 
516 @protocol IRenderEventListener <NSObject>
527 - (void)onWillRender:(FSRenderer *)render flags:(FSRendererContentFlag)flags pageIndex:(int)pageIndex;
528 
538 - (void)onRenderedFlags:(FSRendererContentFlag)flags pageIndex:(int)pageIndex;
539 @end
540 
542 @protocol IReflowEventListener <NSObject>
555 - (void)onWillStartParseReflowPage:(FSReflowPage *)reflowPage zoom:(int)zoom flags:(FSReflowPageFlags)flags pageIndex:(int)pageIndex;
556 
569 - (void)onParsedReflowPage:(FSReflowPage *)reflowPage zoom:(int)zoom flags:(FSReflowPageFlags)flags pageIndex:(int)pageIndex;
570 @end
571 
573 @protocol ITouchEventListener <NSObject>
574 @optional
584 - (BOOL)onTouchesBegan:(NSSet *)touches withEvent:(UIEvent *)event;
594 - (BOOL)onTouchesMoved:(NSSet *)touches withEvent:(UIEvent *)event;
604 - (BOOL)onTouchesEnded:(NSSet *)touches withEvent:(UIEvent *)event;
614 - (BOOL)onTouchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event;
615 @end
616 
619 @optional
627 - (BOOL)shouldDrawAnnot:(FSAnnot *)annot;
628 @end
629 
631 @protocol FSPageOrganizerDelegate <NSObject>
637 -(NSString *)getDocumentFilePath ;
646 - (BOOL)movePagesFromIndexes:(NSArray<NSNumber *> *)sourcePageIndexes toIndex:(NSUInteger)pageIndex;
654 - (BOOL)deletePagesAtIndexes:(NSArray<NSNumber *> *)pageIndexes;
672 - (BOOL)flattenPageAtIndex:(int)pageIndex display:(BOOL)display options:(FSPDFPageFlattenOptions)options;
681 - (BOOL)rotatePagesAtIndexes:(NSArray<NSNumber *> *)pageIndexes clockwise:(BOOL)clockwise;
693 - (BOOL)insertPageFromImage:(UIImage *__nonnull)image atIndex:(NSUInteger)pageIndex;
694 
712 - (BOOL)insertPages:(int)index width:(float)width height:(float)height style:(PDF_PAGE_STYLE_TYPE)style color:(unsigned int)color rotation:(FSRotation)rotation count:(int)count;
713 
731 - (BOOL)insertPages:(int)index pageSize:(FSPDFPageSize)pageSize style:(PDF_PAGE_STYLE_TYPE)style color:(unsigned int)color rotation:(FSRotation)rotation count:(int)count;
732 
756 - (void)insertPagesFromDocument:(FSPDFDoc *)document withSourceIndexes:(NSArray<NSNumber *> *)sourcePagesIndexes flags:(FSPDFDocImportPageFlags)flags layerName:(NSString * _Nullable)layerName atIndex:(NSUInteger)destinationIndex success:(void (^)(NSString *result))success error:(void (^)(NSString *errorInfo))error ;
757 
758 @end
759 
761 @protocol FSExceptionLoggerDelegate <NSObject>
763 -(void)stacktraceInfo:(NSString*)stackInfo ;
764 @end
765 
784 
786 @property (nonatomic, weak, nullable) id<FSPDFUIExtensionsManager> extensionsManager;
788 @property (nonatomic, strong, nullable) FSPDFDoc *currentDoc;
790 @property (nonatomic, assign) BOOL isNightMode;
795 @property (nonatomic, assign) FSRendererColorMode colorMode;
797 @property (nonatomic, strong, nullable) UIColor *mappingModeBackgroundColor;
799 @property (nonatomic, strong, nullable) UIColor *mappingModeForegroundColor;
801 @property (nonatomic, strong, nullable) UIColor *reflowBackgroundColor;
803 @property (nonatomic, assign) int bottomOffset;
805 @property (nonatomic, assign) BOOL shouldRecover;
807 @property (nonatomic, strong, readonly, nullable) NSString *filePath;
809 @property (nonatomic) CGFloat maxZoomLimit;
811 @property (nonatomic) CGFloat minZoomLimit;
813 @property (nonatomic, assign) BOOL enablePageFlippingByTouchBorder;
815 @property (nonatomic, assign) BOOL keepZoomRatio;
817 @property (nonatomic) BOOL IsChangeLayoutMode;
819 @property (nonatomic, assign) FSNightColorMode nightColorMode;
821 @property (nonatomic) NSTimeInterval minimumPressDuration;
824 @property (nonatomic, assign) PDF_PAGE_BINDING_EDGE pageBindingEdge;
825 #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000
826 
827 @property (nonatomic, weak) UIWindowScene *windowScene API_AVAILABLE(ios(13.0));
828 #endif
829 
830 @property (nonatomic, assign, readonly) BOOL supportsMultipleScenes;
831 
832 @property (nonatomic, assign) BOOL refreshReflowAnnot;
833 
834 #pragma mark - View control Initialize
835 
842 - (instancetype)initWithFrame:(CGRect)frame;
843 
844 #pragma mark - Events
845 
850 - (void)registerDocEventListener:(id<IDocEventListener>)listener;
856 - (void)registerPageEventListener:(id<IPageEventListener>)listener;
862 - (void)registerScrollViewEventListener:(id<IScrollViewEventListener>)listener;
868 - (void)registerLayoutEventListener:(id<ILayoutEventListener>)listener;
876 - (void)registerGestureEventListener:(id<IGestureEventListener>)listener;
882 - (void)registerDrawEventListener:(id<IDrawEventListener>)listener;
888 - (void)registerRenderEventListener:(id<IRenderEventListener>)listener;
894 - (void)registerReflowEventListener:(id<IReflowEventListener>)listener;
900 - (void)registerRecoveryEventListener:(id<IRecoveryEventListener>)listener;
906 - (void)registerViewAppleEventListener:(id<IViewAppleEventListener>)listener;
907 
913 - (void)unregisteRecoveryEventListener:(id<IRecoveryEventListener>)listener;
919 - (void)unregisterDrawEventListener:(id<IDrawEventListener>)listener;
925 - (void)unregisterRenderEventListener:(id<IRenderEventListener>)listener;
931 - (void)unregisterReflowEventListener:(id<IReflowEventListener>)listener;
937 - (void)unregisterGestureEventListener:(id<IGestureEventListener>)listener;
943 - (void)unregisterDocEventListener:(id<IDocEventListener>)listener;
949 - (void)unregisterPageEventListener:(id<IPageEventListener>)listener;
955 - (void)unregisterScrollViewEventListener:(id<IScrollViewEventListener>)listener;
961 - (void)unregisterLayoutEventListener:(id<ILayoutEventListener>)listener;
962 
968 - (void)unregisterViewAppleEventListener:(id<IViewAppleEventListener>)listener;
969 
970 #pragma mark - Open/Close/Save Document
971 
976 - (void)setDoc:(FSPDFDoc *)doc;
977 
984 - (void)setPDFDoc:(FSPDFDoc *)doc XFADoc:(FSXFADoc *)xfadoc;
985 
991 - (FSPDFDoc *)getDoc;
992 
999 
1001 - (bool)isOwner;
1002 
1004 - (bool)isPPDF;
1005 
1014 - (void)openDoc:(NSString *)filePath password:(NSString *_Nullable)password completion:(void (^_Nullable)(FSErrorCode error))completion;
1023 - (void)openDocFromMemory:(NSData *)buffer password:(NSString *_Nullable)password completion:(void (^_Nullable)(FSErrorCode error))completion;
1032 - (void)openDocFromFileReader:(id<FSFileReaderCallback>)fileReader password:(NSString *_Nullable)password completion:(void (^_Nullable)(FSErrorCode error))completion;
1038 - (void)closeDoc:(void (^_Nullable)(void))cleanup;
1039 
1048 - (BOOL)saveDoc:(NSString *)filePath flag:(FSPDFDocSaveFlags)flag;
1049 - (BOOL)saveDoc:(NSString *)filePath flag:(FSPDFDocSaveFlags)flag complete:(void(^)(FSErrorCode errorCode))complete;
1050 
1059 - (BOOL)saveDocToFileWriter:(id<FSFileWriterCallback>)fileWriter flag:(FSPDFDocSaveFlags)flag;
1060 
1061 #pragma mark - Get Page
1062 
1067 - (int)getPageCount;
1073 - (int)getCurrentPage;
1081 - (int)getPageIndex:(CGPoint)displayViewPt;
1082 
1088 - (float)getReflowPageScale;
1089 
1095 - (float)getUIDevicePPI;
1103 - (NSMutableArray *)getVisiblePages;
1115 - (BOOL)isPageVisible:(int)pageIndex;
1116 
1117 #pragma mark - Rotation View
1118 
1124 -(void)rotateView:(int)rotation;
1129 -(int)getViewRotation;
1130 
1131 #pragma mark - Page Navigation
1132 
1143 - (BOOL)gotoPage:(int)index animated:(BOOL)animated;
1156 - (BOOL)gotoPage:(int)index withDocPoint:(FSPointF *)point animated:(BOOL)animated;
1157 
1170 - (BOOL)gotoPage:(int)index zoomToDocRect:(FSRectF *)rect animated:(BOOL)animated;
1185 - (BOOL)gotoPage:(int)index animated:(BOOL)animated needJumpedNode:(BOOL)needJumpedNode;
1199 - (void)addPageJumpedNode:(int)indexOld index:(int)indexNew animated:(BOOL)animated;
1209 - (BOOL)gotoFirstPage:(BOOL)animated;
1219 - (BOOL)gotoLastPage:(BOOL)animated;
1229 - (BOOL)gotoNextPage:(BOOL)animated;
1239 - (BOOL)gotoPrevPage:(BOOL)animated;
1248 - (BOOL)hasPrevView;
1257 - (BOOL)hasNextView;
1261 - (void)clearPrevNextStack;
1268 - (void)gotoPrevView:(BOOL)animated;
1275 - (void)gotoNextView:(BOOL)animated;
1276 
1277 #pragma mark - Reflow
1278 
1290 - (void)setReflowMode:(PDF_REFLOW_REFLOWMODE)reflowMode;
1291 #pragma mark - Scale
1292 
1297 - (float)getScale;
1303 - (float)getDefaultPageScale;
1304 #pragma mark - Zoom
1305 
1312 - (float)getZoom;
1320 - (void)setZoom:(float)zoom;
1329 - (void)setZoom:(float)zoom withSlider:(BOOL)isWithSlider;
1338 - (void)setZoom:(float)zoom origin:(CGPoint)origin;
1339 
1350 - (void)setZoomMode:(PDF_DISPLAY_ZOOMMODE)zoomMode;
1351 
1352 #pragma mark - Display mode
1353 
1367 - (void)setPageLayoutMode:(PDF_LAYOUT_MODE)mode;
1375 - (void)setDefaultPageWhenDocumentOpened:(int)index;
1381 - (BOOL)isContinuous;
1387 - (void)setContinuous:(BOOL)isContinuous;
1393 - (BOOL)isViewSignedDocument;
1399 - (void)setViewSignedDocument:(BOOL)isViewSignedDocument;
1400 #pragma mark - Crop mode
1401 
1408 - (UIEdgeInsets)getCropInsets:(int)pageIndex;
1430 - (BOOL)setCropMode:(PDF_CROP_MODE)mode;
1442 - (BOOL)setCropPageRect:(int)pageIndex pdfRect:(FSRectF *_Nullable)pdfRect;
1443 
1444 #pragma mark - Viewer preference
1445 
1450 - (void)setBackgroundColor:(UIColor *_Nullable)color;
1451 
1452 #pragma mark - Viewer properties
1453 
1458 - (double)getHScrollPos;
1464 - (double)getVScrollPos;
1472 - (void)setHScrollPos:(double)pos animated:(BOOL)animated;
1480 - (void)setVScrollPos:(double)pos animated:(BOOL)animated;
1486 - (double)getHScrollRange;
1492 - (double)getVScrollRange;
1493 
1499 - (void)scrollDisplayView:(float)distanceX distanceY: (float)distanceY;
1500 
1501 #pragma mark - Viewer dimension
1502 
1507 - (float)getDisplayViewWidth;
1513 - (float)getDisplayViewHeight;
1523 - (float)getPageViewWidth:(int)pageIndex;
1533 - (float)getPageViewHeight:(int)pageIndex;
1539 - (UIView *)getDisplayView;
1551 - (UIView *)getPageView:(int)pageIndex;
1564 - (UIView *)getOverlayView:(int)pageIndex;
1565 
1571 - (UIScrollView *)getPageContainer;
1572 
1583 - (BOOL)appendPageView:(UIView *)pageView;
1584 
1587 
1588 #pragma mark - Coordinate Conversion
1589 
1599 - (CGRect)convertPageViewRectToDisplayViewRect:(CGRect)rect pageIndex:(int)pageIndex;
1610 - (CGRect)convertDisplayViewRectToPageViewRect:(CGRect)rect pageIndex:(int)pageIndex;
1621 - (CGPoint)convertDisplayViewPtToPageViewPt:(CGPoint)point pageIndex:(int)pageIndex;
1632 - (CGPoint)convertPageViewPtToDisplayViewPt:(CGPoint)point pageIndex:(int)pageIndex;
1643 - (CGPoint)convertPdfPtToPageViewPt:(FSPointF *)point pageIndex:(int)pageIndex;
1654 - (FSPointF *)convertPageViewPtToPdfPt:(CGPoint)point pageIndex:(int)pageIndex;
1666 - (CGPoint)convertReflowPagePtToPageViewPt:(FSPointF *)point reflowPage:(FSReflowPage *)reflowPage pageIndex:(int)pageIndex;
1678 - (FSPointF *)convertPageViewPtToReflowPagePt:(CGPoint)point reflowPage:(FSReflowPage *)reflowPage pageIndex:(int)pageIndex;
1690 - (CGRect)convertReflowPageRectToPageViewRect:(FSRectF *)rect reflowPage:(FSReflowPage *)reflowPage pageIndex:(int)pageIndex;
1702 - (FSRectF *)convertPageViewRectToReflowPageRect:(CGRect)rect reflowPage:(FSReflowPage *)reflowPage pageIndex:(int)pageIndex;
1713 - (CGRect)convertPdfRectToPageViewRect:(FSRectF *)rect pageIndex:(int)pageIndex;
1724 - (FSRectF *)convertPageViewRectToPdfRect:(CGRect)rect pageIndex:(int)pageIndex;
1734 - (FSMatrix2D *)getDisplayMatrix:(int)pageIndex;
1735 
1746 - (FSMatrix2D *)getDisplayMatrix:(int)pageIndex fromOrigin:(CGPoint)originPoint;
1747 
1748 #pragma mark - Refresh
1749 
1751 -(void)lockRefresh;
1753 -(void)unlockRefresh;
1761 - (void)refresh:(CGRect)rect pageIndex:(int)pageIndex;
1770 - (void)refresh:(CGRect)rect pageIndex:(int)pageIndex needRender:(BOOL)needRender;
1771 
1781 - (void)refresh:(CGRect)rect pageIndex:(int)pageIndex needRender:(BOOL)needRender clearCache:(BOOL)clearCache;
1782 
1790 - (void)refresh:(int)pageIndex;
1798 - (void)refresh:(int)pageIndex needRender:(BOOL)needRender;
1799 
1808 - (void)refresh:(int)pageIndex needRender:(BOOL)needRender clearCache:(BOOL)clearCache;
1812 - (void)refresh;
1816 - (void)refreshOverlay;
1820 - (void)clearRenderCache;
1821 
1822 #pragma mark - Gesture
1823 
1834 - (UITapGestureRecognizer *)getPageViewDoubleTapGesture:(int)pageIndex;
1835 
1845 - (void)lockGesturesForRequires:(FSGestureLockOptions)options;
1846 
1860 + (void)recoverForOOM;
1866 -(void)setPageSpacing:(int)pageSpace;
1879 -(void)setPageSpacing:(int)pageSpace direction:(FS_PAGESPACING_DIRECTION)direction;
1885 +(void)setExceptionLogger:(nullable id<FSExceptionLoggerDelegate>) logger;
1886 
1894 - (void)setPageViewEdgeInsets:(UIEdgeInsets)pageViewEdgeInsets moveOffset:(BOOL)moveOffset;
1895 @end
1896 
1897 #pragma mark - XML Forms Architecture File
1900 -(BOOL)isDynamicXFA;
1902 -(FSXFADoc *)getXFADoc;
1909 -(BOOL)reloadXFADoc:(FSDocProviderCallbackPageViewEventType)page_view_event_type page_index:(NSArray<NSNumber *> *)pageIndexes;
1910 @end
1911 
1912 #pragma mark - Rights Management Services
1934 + (BOOL)handleMSALResponse:(nonnull NSURL *)response sourceApplication:(nullable NSString *)sourceApplication;
1939 - (void)setRMSAppClientId:(nonnull NSString *)appClientId redirectURI:(nonnull NSString *)redirectURI;
1941 - (BOOL)isRMSProtected;
1942 @end
1943 
1944 #pragma mark - Open file async
1945 @interface CacheFileOption : NSObject
1949 @property (nonatomic, strong, nullable) NSString *cacheFilePath;
1953 @property (nonatomic, assign) BOOL isDownloadAll;
1954 
1955 @end
1956 
1957 @interface HttpRequestProperties : NSObject
1961 @property (nonatomic, strong) NSMutableDictionary *properties;
1962 
1970 -(void) setRequestProperty:(NSString *)key Value:(NSString *)value ;
1971 
1972 @end
1973 
1975 
1987 - (void)openDocAtURL:(NSURL *)url password:(NSString *)password completion:(void (^)(FSErrorCode error))completion;
2000 - (void)openDocFromURL:(NSURL *)url password:(NSString *)password cacheOption:(nullable CacheFileOption *)cacheOption httpRequestProperties:(nullable HttpRequestProperties *)properties completion:(void (^)(FSErrorCode error))completion;
2001 
2007 -(void)clearCacheFile:(NSString *)url;
2008 
2012 -(void)clearAllCacheFile;
2013 
2014 @end
2015 
2018 +(BOOL) fipsMode;
2019 @end
2020 
2021 
2022 @interface CERT_INFO : NSObject
2023 @property (nonatomic, copy) NSString *certSerialNum;
2024 @property (nonatomic, copy) NSString *certPublisher;
2025 @property (nonatomic, copy) NSString *certStartDate;
2026 @property (nonatomic, copy) NSString *certEndDate;
2027 @property (nonatomic, copy) NSString *certEmailInfo;
2028 @property (nonatomic, copy) NSString *certOrganization;
2029 @property (nonatomic, copy) NSString *certOrganizationUnit;
2030 @property (nonatomic, strong) FSDateTime *signDate;
2031 @property (nonatomic, assign) const unsigned int *byteRangeArray;
2032 @property (nonatomic, assign) int sizeofArray;
2033 @property (nonatomic, assign) int ltvState;
2034 @property (nonatomic, copy) NSDictionary *cerInfoDic;
2035 @end
2036 
2037 @interface DIGITALSIGNATURE_PARAM : NSObject
2038 @property (nonatomic, copy) NSString *certFile;
2039 @property (nonatomic, copy) NSString *certPwd;
2040 @property (nonatomic, copy) NSString *subfilter;
2041 @property (nonatomic, copy) NSString *signFilePath;
2042 @property (nonatomic, copy) NSString *imagePath;
2043 @property (nonatomic, strong) FSRectF *rect;
2044 @property (nonatomic, copy) NSString *sigName;
2045 @end
2046 
2051 typedef enum {
2058 
2059 @interface FSPDFCertUtil : NSObject
2060 +(PDF_CERT_ERROR_CODE)getCertInfo:(NSString *) path password:(NSString *)pwd certInfo:(CERT_INFO *)info;
2061 +(NSMutableArray *)getCertFromSignatureContent:(FSSignature *)signature ;
2062 +(NSMutableDictionary *)getTrustCertificateInformation:(NSData *)certData ;
2063 +(BOOL)isCertTrusted:(NSData *)cert toTrust:(NSData*)needBeTrustedCertData;
2064 @end
2065 
2066 API_AVAILABLE(ios(13.0)) @protocol FSPDFMultipleScenes <NSObject>
2067 @property (class, nonatomic, readonly) BOOL supportsMultipleScenes;
2068 + (NSSet<id<FSPDFMultipleScenes>> *)connectedScenes;
2069 @end
2070 
2071 @protocol FSMultipleScenesListener <NSObject>
2072 @optional
2073 - (void)willAddPdfViewCtrl:(FSPDFViewCtrl *)pdfViewCtrl;
2074 - (void)willRemovePdfViewCtrl:(FSPDFViewCtrl *)pdfViewCtrl;
2075 @end
2076 
2077 API_AVAILABLE(ios(13.0)) @interface FSPDFViewCtrl (SupportsMultipleScenes) <FSPDFMultipleScenes>
2078 + (NSSet<FSPDFViewCtrl *> *)openedPdfViewCtrls;
2079 + (void)registerMultipleScenesListener:(id<FSMultipleScenesListener>)listener;
2080 + (void)unregisterMultipleScenesListener:(id<FSMultipleScenesListener>)listener;
2081 @end
2082 
2083 NS_ASSUME_NONNULL_END
PDF_CERT_ERROR_FILE
@ PDF_CERT_ERROR_FILE
File format error or invalid file.
Definition: FSPDFViewControl.h:2054
FSFileReaderCallback-p
file reading interface.
Definition: FSPDFObjC.h:7593
-[IDocEventListener-p onDocWillOpen]
void onDocWillOpen()
Triggered when the document will be opened.
FSPDFViewCtrl::pageBindingEdge
PDF_PAGE_BINDING_EDGE pageBindingEdge
Set or get the Page Binding.
Definition: FSPDFViewControl.h:824
PDF_DISPLAY_ZOOMMODE_FITHEIGHT
@ PDF_DISPLAY_ZOOMMODE_FITHEIGHT
Zoom mode: fit page height.
Definition: FSPDFViewControl.h:93
PDF_LAYOUT_MODE_TWO_RIGHT
@ PDF_LAYOUT_MODE_TWO_RIGHT
Facing mode. Cover page right.
Definition: FSPDFViewControl.h:45
IDocEventListener-p
The PDF document event listener.
Definition: FSPDFViewControl.h:203
PDF_PAGE_BINDING_EDGE
PDF_PAGE_BINDING_EDGE
Enumeration for page binding edge.
Definition: FSPDFViewControl.h:71
PDF_DISPLAY_ZOOMMODE_FITWIDTH
@ PDF_DISPLAY_ZOOMMODE_FITWIDTH
Zoom mode: fit page width.
Definition: FSPDFViewControl.h:91
FS_PAGESPACING_HORIZONTAL
@ FS_PAGESPACING_HORIZONTAL
PageSpcaing horizontal direction.
Definition: FSPDFViewControl.h:118
FSRendererContentFlag
FSRendererContentFlag
Enumeration for rendering content flags.
Definition: FSPDFObjC.h:1224
FSGestureLockOptions
FSGestureLockOptions
Definition: FSPDFViewControl.h:147
FSGestureLockOptionDoubleTap
@ FSGestureLockOptionDoubleTap
Lock double-tap gesture.
Definition: FSPDFViewControl.h:153
PDF_PAGE_STYLE_TYPE_MUSIC
@ PDF_PAGE_STYLE_TYPE_MUSIC
Insert page music style.
Definition: FSPDFViewControl.h:137
-[FSPDFViewCtrl getVScrollRange]
double getVScrollRange()
Get the maximum vertical scroll range.
-[FSPDFViewCtrl getReflowMode]
PDF_REFLOW_REFLOWMODE getReflowMode()
Get reflow mode.
PDF_LAYOUT_MODE_TWO_MIDDLE
@ PDF_LAYOUT_MODE_TWO_MIDDLE
Facing mode. Cover page middle.
Definition: FSPDFViewControl.h:47
PDF_PAGE_BINDING_RIGHT_EDGE
@ PDF_PAGE_BINDING_RIGHT_EDGE
Definition: FSPDFViewControl.h:77
PDF_REFLOW_WITHIMAGE
@ PDF_REFLOW_WITHIMAGE
Reflow both text and image on PDF page.
Definition: FSPDFViewControl.h:60
IRotationEventListener-p
Device rotation delegate.
Definition: FSPDFViewControl.h:178
-[FSPDFViewCtrl getZoom]
float getZoom()
Get the zoom level. Valid range: from 1.0 to 20.0 for reflow mode, others 1.0 to 10....
HttpRequestProperties
Definition: FSPDFViewControl.h:1958
-[FSPDFViewCtrl getHScrollRange]
double getHScrollRange()
Get the maximum horizontal scroll range.
FSPDFViewCtrl::keepZoomRatio
BOOL keepZoomRatio
Whether keep same page zoom when turning pages. Defaults is YES.
Definition: FSPDFViewControl.h:815
PDF_REFLOW_NONE
@ PDF_REFLOW_NONE
No reflow.
Definition: FSPDFViewControl.h:58
IGestureEventListener-p
The gesture event listener.
Definition: FSPDFViewControl.h:442
FSPDFUIExtensionsManager-p
The UI extensions manager.
Definition: FSPDFViewControl.h:618
FSRenderer
Definition: FSPDFObjC.h:1235
DIGITALSIGNATURE_PARAM
Definition: FSPDFViewControl.h:2038
-[FSPDFViewCtrl getZoomMode]
PDF_DISPLAY_ZOOMMODE getZoomMode()
get the zoom mode.
PDF_CROP_MODE_NONE
@ PDF_CROP_MODE_NONE
No crop.
Definition: FSPDFViewControl.h:103
FSPDFViewCtrl::shouldRecover
BOOL shouldRecover
Whether or not should view control recover itself when runs out of memory. Default is YES.
Definition: FSPDFViewControl.h:805
FSPDFDoc
Definition: FSPDFObjC.h:4922
PDF_DISPLAY_ZOOMMODE
PDF_DISPLAY_ZOOMMODE
Enumeration for PDF display zoom mode.
Definition: FSPDFViewControl.h:85
-[FSPDFViewCtrl clearRenderCache]
void clearRenderCache()
Clear the render cache.
-[FSPDFViewCtrl getVScrollPos]
double getVScrollPos()
Get the vertical scroll position.
-[IRecoveryEventListener-p onRecovered]
void onRecovered()
Triggered after the view control has recovered from running out of memory.
PDF_REFLOW_ONLYTEXT
@ PDF_REFLOW_ONLYTEXT
Reflow just text on PDF page.
Definition: FSPDFViewControl.h:62
FSPDFViewCtrl(rms)
Definition: FSPDFViewControl.h:1913
IReflowEventListener-p
The reflow event listener.
Definition: FSPDFViewControl.h:542
+[FSPDFViewCtrl recoverForOOM]
void recoverForOOM()
Do the recovering when Foxit PDF SDK runs out of memory.
PDF_DISPLAY_ZOOMMODE_FITPAGE
@ PDF_DISPLAY_ZOOMMODE_FITPAGE
Zoom mode: fit page.
Definition: FSPDFViewControl.h:89
FSPDFViewCtrl(async)
Definition: FSPDFViewControl.h:1974
FSPDFViewCtrl::isNightMode
BOOL isNightMode
Night mode. A convenient way to set FSPDFViewControl::colorMode to FSRendererColorMode::FSRendererCol...
Definition: FSPDFViewControl.h:790
FSPDFViewCtrl::IsChangeLayoutMode
BOOL IsChangeLayoutMode
is change layout mode.
Definition: FSPDFViewControl.h:817
FSGestureLockOptionAll
@ FSGestureLockOptionAll
Lock all gestures.
Definition: FSPDFViewControl.h:161
PDF_PAGE_BINDING_UNKNOWN
@ PDF_PAGE_BINDING_UNKNOWN
Definition: FSPDFViewControl.h:73
FSPDFDocImportPageFlags
FSPDFDocImportPageFlags
Enumeration for flags used for importing pages.
Definition: FSPDFObjC.h:4881
-[FSPDFViewCtrl isOwner]
bool isOwner()
Check if the current document is opened with the owner access.
FSPageOrganizerDelegate-p
The page organizer delegate, which handles moving/deleting/inserting pages..etc.
Definition: FSPDFViewControl.h:631
-[FSPageOrganizerDelegate-p getDocumentFilePath]
NSString * getDocumentFilePath()
get file path to use in thumbnail
PDF_REFLOW_REFLOWMODE
PDF_REFLOW_REFLOWMODE
Enumeration for page reflow mode.
Definition: FSPDFViewControl.h:56
PDF_LAYOUT_MODE_REFLOW
@ PDF_LAYOUT_MODE_REFLOW
Reflow mode.
Definition: FSPDFViewControl.h:41
-[FSPDFViewCtrl getDocPermissions]
FSPDFDocUserPermissions getDocPermissions()
Get the permissions of the current PDF document.
-[IRecoveryEventListener-p onWillRecover]
void onWillRecover()
Triggered before recovering the view control.
FSMultipleScenesListener-p
Definition: FSPDFViewControl.h:2071
PDF_CERT_ERROR_CODE
PDF_CERT_ERROR_CODE
Enumeration for certificate related error code.
Definition: FSPDFViewControl.h:2051
-[FSPDFViewCtrl getDisplayViewHeight]
float getDisplayViewHeight()
Get the height of the display view.
FS_PAGESPACING_DIRECTION
FS_PAGESPACING_DIRECTION
Enumeration for page spacing direction.
Definition: FSPDFViewControl.h:116
FSRectF
Definition: FSPDFObjC.h:365
-[FSPDFViewCtrl hasPrevView]
BOOL hasPrevView()
Check if there it is a page view in the preceding of current page view on the page navigation stack.
FSNightColorMode
FSNightColorMode
Definition: FSPDFViewControl.h:140
FSReflowPageFlags
FSReflowPageFlags
Enumeration for parsing flags used for a reflow page.
Definition: FSPDFObjC.h:5961
FSSignature
Definition: FSPDFObjC.h:6959
FSGestureLockOptionPinch
@ FSGestureLockOptionPinch
Lock pinch-to-zoom gesture.
Definition: FSPDFViewControl.h:157
IDrawEventListener-p
The draw event listener.
Definition: FSPDFViewControl.h:503
-[FSPDFViewCtrl getPageLayoutMode]
PDF_LAYOUT_MODE getPageLayoutMode()
Get the page layout mode.
-[FSPDFViewCtrl getReflowPageScale]
float getReflowPageScale()
Gets the scale at which the reflowpage was generated.
IPageEventListener-p
The page event listener.
Definition: FSPDFViewControl.h:255
PDF_CERT_ERROR_SUCESSS
@ PDF_CERT_ERROR_SUCESSS
Definition: FSPDFViewControl.h:2052
FSPDFViewCtrl
Foxit PDF view control for viewing/editing/saving the PDF file.
Definition: FSPDFViewControl.h:783
IRenderEventListener-p
The render event listener.
Definition: FSPDFViewControl.h:516
-[FSPDFViewCtrl hasNextView]
BOOL hasNextView()
Check if there it is a page view next to the current page view on the page navigation stack.
FSPDFViewCtrl::minimumPressDuration
NSTimeInterval minimumPressDuration
Minimum long press interval.
Definition: FSPDFViewControl.h:821
PDF_PAGE_STYLE_TYPE_LINED
@ PDF_PAGE_STYLE_TYPE_LINED
Insert page lined style.
Definition: FSPDFViewControl.h:131
PDF_LAYOUT_MODE_TWO
@ PDF_LAYOUT_MODE_TWO
Facing mode.
Definition: FSPDFViewControl.h:39
FSMatrix2D
Definition: FSPDFObjC.h:408
-[FSPDFViewCtrl getDoc]
FSPDFDoc * getDoc()
Get the current PDF document object from view control.
FSGestureLockOptionPan
@ FSGestureLockOptionPan
Lock pan gesture.
Definition: FSPDFViewControl.h:159
FSPDFDocUserPermissions
FSPDFDocUserPermissions
Enumeration for user access permissions in a PDF document.
Definition: FSPDFObjC.h:4860
FSXFADoc
Definition: FSPDFObjC.h:1590
FSPDFViewCtrl::enablePageFlippingByTouchBorder
BOOL enablePageFlippingByTouchBorder
Whether enable page flipping by touch border. Defaults is YES.
Definition: FSPDFViewControl.h:813
-[FSPDFViewCtrl getVisiblePages]
NSMutableArray * getVisiblePages()
Get the visible pages in current view control.
PDF_PAGE_STYLE_TYPE_BLANK
@ PDF_PAGE_STYLE_TYPE_BLANK
Insert page blank style.
Definition: FSPDFViewControl.h:129
PDF_PAGE_STYLE_TYPE
PDF_PAGE_STYLE_TYPE
Enumeration for page style direction.
Definition: FSPDFViewControl.h:127
PDF_CERT_ERROR_PASSWORD
@ PDF_CERT_ERROR_PASSWORD
Invalid password.
Definition: FSPDFViewControl.h:2056
CERT_INFO
Definition: FSPDFViewControl.h:2023
FSAnnot
Definition: FSPDFObjC.h:3901
FSNightColorModeDefault
@ FSNightColorModeDefault
Night color mode: defaul.
Definition: FSPDFViewControl.h:142
PDF_LAYOUT_MODE
PDF_LAYOUT_MODE
Enumeration for PDF layout mode.
Definition: FSPDFViewControl.h:33
FSNightColorModeMappingGray
@ FSNightColorModeMappingGray
Definition: FSPDFViewControl.h:144
-[FSPDFViewCtrl(async) clearAllCacheFile]
void clearAllCacheFile()
Clear all files cached by SDK.
PDF_LAYOUT_MODE_UNKNOWN
@ PDF_LAYOUT_MODE_UNKNOWN
Unknown page mode.
Definition: FSPDFViewControl.h:35
-[FSPDFViewCtrl getCropMode]
PDF_CROP_MODE getCropMode()
Get crop mode.
FSPDFViewCtrl(xfa)
Definition: FSPDFViewControl.h:1898
FSPDFViewCtrl(fips)
Definition: FSPDFViewControl.h:2016
PDF_CROP_MODE
PDF_CROP_MODE
Enumeration for page crop mode.
Definition: FSPDFViewControl.h:101
-[FSPDFViewCtrl getLockedOptions]
FSGestureLockOptions getLockedOptions()
Retrieves the currently locked options.
PDF_DISPLAY_ZOOMMODE_UNKNOWN
@ PDF_DISPLAY_ZOOMMODE_UNKNOWN
Zoom mode: unknown.
Definition: FSPDFViewControl.h:87
-[ILayoutEventListener-p onLayoutFinished]
void onLayoutFinished()
Triggered when current page layout is finished.
-[FSPDFViewCtrl clearPrevNextStack]
void clearPrevNextStack()
Clear prev and next stack.
-[FSPDFViewCtrl getDisplayView]
UIView * getDisplayView()
Get the display view. PDF pages and page transition effects are displayed on the display view.
-[IPageEventListener-p onPageJumped]
void onPageJumped()
Triggered by the page navigation or link jump.
PDF_CROP_MODE_DETECTION
@ PDF_CROP_MODE_DETECTION
Crop margin by detecting paths or images.
Definition: FSPDFViewControl.h:107
FSPDFPageSize
FSPDFPageSize
Enumeration for page size type.
Definition: FSPDFObjC.h:5741
FSPDFCertUtil
Definition: FSPDFViewControl.h:2060
FSPDFViewCtrl::supportsMultipleScenes
BOOL supportsMultipleScenes
A Boolean value that indicates whether the FSPDFViewCtrl may display multiple scenes simultaneously.
Definition: FSPDFViewControl.h:830
FSPDFViewCtrl::nightColorMode
FSNightColorMode nightColorMode
The night color mode.
Definition: FSPDFViewControl.h:819
FSPointF
Definition: FSPDFObjC.h:185
FSPDFViewCtrl::extensionsManager
id< FSPDFUIExtensionsManager > extensionsManager
The UI extensions manager. UI extensions manager will implement the UI related features such as annot...
Definition: FSPDFViewControl.h:786
FSErrorCode
FSErrorCode
Intent: converted result file will be used for printing.
Definition: FSPDFObjC.h:471
-[FSPDFViewCtrl(xfa) isDynamicXFA]
BOOL isDynamicXFA()
Whether the current document is dynamic XFA.
FSGestureLockOptionNone
@ FSGestureLockOptionNone
Unset, requires a separate value.
Definition: FSPDFViewControl.h:149
-[FSPDFViewCtrl getPageCount]
int getPageCount()
Get the page count of PDF document.
PDF_PAGE_BINDING_LEFT_EDGE
@ PDF_PAGE_BINDING_LEFT_EDGE
Definition: FSPDFViewControl.h:75
FSPDFViewCtrl::refreshReflowAnnot
BOOL refreshReflowAnnot
Definition: FSPDFViewControl.h:832
-[FSPDFViewCtrl getHScrollPos]
double getHScrollPos()
Get the horizontal scroll position.
PDF_PAGE_STYLE_TYPE_GRAPH
@ PDF_PAGE_STYLE_TYPE_GRAPH
Insert page graph style.
Definition: FSPDFViewControl.h:135
PDF_CROP_MODE_CUSTOMIZED
@ PDF_CROP_MODE_CUSTOMIZED
Crop margin with specified pages & rects.
Definition: FSPDFViewControl.h:109
FSPDFViewCtrl::bottomOffset
int bottomOffset
Get or set position of display view from the bottom of control.
Definition: FSPDFViewControl.h:803
PDF_CROP_MODE_CONTENTSBOX
@ PDF_CROP_MODE_CONTENTSBOX
Crop margin according to bounding box of all contents.
Definition: FSPDFViewControl.h:105
ITouchEventListener-p
The touch event listener.
Definition: FSPDFViewControl.h:573
FSPDFViewCtrl::minZoomLimit
CGFloat minZoomLimit
The minimum zoom scale.
Definition: FSPDFViewControl.h:811
FSPDFViewCtrl::mappingModeBackgroundColor
UIColor * mappingModeBackgroundColor
Background color for FSRendererColorMode::FSRendererColorModeMapping or FSRendererColorMode::FSRender...
Definition: FSPDFViewControl.h:797
FSGestureLockOptionSingleTap
@ FSGestureLockOptionSingleTap
Lock single-tap gesture.
Definition: FSPDFViewControl.h:151
-[FSPDFViewCtrl getDisplayViewWidth]
float getDisplayViewWidth()
Get the width of the display view.
-[FSPDFViewCtrl getDefaultPageScale]
float getDefaultPageScale()
Get the default page scale.
FSDateTime
Definition: FSPDFObjC.h:578
-[FSPDFViewCtrl getUIDevicePPI]
float getUIDevicePPI()
Get the ppi of the current device.
-[FSPDFViewCtrl getPageContainer]
UIScrollView * getPageContainer()
Get the page container.
FSPDFViewCtrl::currentDoc
FSPDFDoc * currentDoc
The current PDF document.
Definition: FSPDFViewControl.h:788
PDF_LAYOUT_MODE_TWO_LEFT
@ PDF_LAYOUT_MODE_TWO_LEFT
Facing mode. Cover page left.
Definition: FSPDFViewControl.h:43
-[FSPDFViewCtrl isContinuous]
BOOL isContinuous()
Get the page layout mode wether is continuous.
IViewAppleEventListener-p
The event listener for pdfview, Some of apple's interfaces
Definition: FSPDFViewControl.h:426
FSPDFViewCtrl::filePath
NSString * filePath
The file path of current document, which is from openDoc.
Definition: FSPDFViewControl.h:807
CacheFileOption
Definition: FSPDFViewControl.h:1946
FSGestureLockOptionLongPress
@ FSGestureLockOptionLongPress
Lock long press gesture.
Definition: FSPDFViewControl.h:155
-[FSPDFViewCtrl isViewSignedDocument]
BOOL isViewSignedDocument()
Get the value wether is view sign history document.
-[FSPDFViewCtrl stopCurrentGestureRecognizerShouldBegin]
void stopCurrentGestureRecognizerShouldBegin()
Stop the current gesture recognizer immediately.
FSFileWriterCallback-p
Definition: FSPDFObjC.h:7614
FSPDFViewCtrl::colorMode
FSRendererColorMode colorMode
Color mode.
Definition: FSPDFViewControl.h:795
FSRotation
FSRotation
Enumeration for rotation.
Definition: FSPDFObjC.h:606
PDF_PAGE_STYLE_TYPE_GRID
@ PDF_PAGE_STYLE_TYPE_GRID
Insert page grid style.
Definition: FSPDFViewControl.h:133
PDF_LAYOUT_MODE_SINGLE
@ PDF_LAYOUT_MODE_SINGLE
Single page mode.
Definition: FSPDFViewControl.h:37
FSPDFViewCtrl::reflowBackgroundColor
UIColor * reflowBackgroundColor
Get or set the background color for reflow mode. Format: 0.0~1.0, 0.0~1.0, 0.0~1.0,...
Definition: FSPDFViewControl.h:801
-[FSPDFViewCtrl lockRefresh]
void lockRefresh()
If page content is currently being edited or annotation is reseting the appearance,...
-[FSPDFViewCtrl(rms) isRMSProtected]
BOOL isRMSProtected()
Check whether the current document is protected by RMS(Right Management Services).
ILayoutEventListener-p
The page layout event listener.
Definition: FSPDFViewControl.h:353
FS_PAGESPACING_VERTICAL
@ FS_PAGESPACING_VERTICAL
PageSpcaing vertical direction.
Definition: FSPDFViewControl.h:120
-[FSPDFViewCtrl refresh]
void refresh()
Refresh the display view.
IScrollViewEventListener-p
The event listener for scroll view, which is the container of page views.
Definition: FSPDFViewControl.h:371
FSPDFViewCtrl::maxZoomLimit
CGFloat maxZoomLimit
The maximum zoom scale.
Definition: FSPDFViewControl.h:809
-[FSPDFViewCtrl isPPDF]
bool isPPDF()
Check if the current document is PPDF format, which is Microsoft Rights Management PDF protected docu...
FSPDFViewCtrl::mappingModeForegroundColor
UIColor * mappingModeForegroundColor
Foreground color for FSRendererColorMode::FSRendererColorModeMapping or FSRendererColorMode::FSRender...
Definition: FSPDFViewControl.h:799
-[FSPDFViewCtrl getScale]
float getScale()
Get the page scale.
-[FSPDFViewCtrl getCurrentPage]
int getCurrentPage()
Get current page index.
-[FSPDFViewCtrl refreshOverlay]
void refreshOverlay()
Refresh the overlay view.
FSReflowPage
Definition: FSPDFObjC.h:5968
+[FSPDFViewCtrl(fips) fipsMode]
BOOL fipsMode()
Check that whether the view control works on the FIPS mode (Federal Information Processing Standard)....
IRecoveryEventListener-p
Recovery event listener used when view control runs out of memory.
Definition: FSPDFViewControl.h:165
FSExceptionLoggerDelegate-p
The excecption logger delegate.
Definition: FSPDFViewControl.h:761
FSRendererColorMode
FSRendererColorMode
Enumeration for rendering color mode.
Definition: FSPDFObjC.h:1218
-[FSPDFViewCtrl getViewRotation]
int getViewRotation()
-[FSPDFViewCtrl(xfa) getXFADoc]
FSXFADoc * getXFADoc()
Return XFA document object if the current document is XFA, else return nil.
-[FSPDFViewCtrl unlockRefresh]
void unlockRefresh()
Unlock refreshing.
FSPDFDocSaveFlags
FSPDFDocSaveFlags
Enumeration for PDF document saving flags.
Definition: FSPDFObjC.h:4871
FSPDFPageFlattenOptions
FSPDFPageFlattenOptions
Enumeration for flatten options.
Definition: FSPDFObjC.h:5727