About Extension
PrimePDFViewer is an extension created by Akshat Developer. This extension allows you to seamlessly integrate PDF viewing functionality into your app without the need for a web viewer. With a range of customizable options, you can enhance the user experience of viewing PDF files within your application.
Author: Akshat Developer
Version:- 1.0
Features
- Dark Mode
- Load Online, Local, Asset PDF
- Fast And Smooth
- Ability to Render Large PDF
- Access Links In PDF
- PDF Cache Function
- Light Weight
- Works In Companion Too
- Vertical And Horizontal Scroll
- And Many More
Blocks
Methods
LoadLibraries
Loads the native libraries required by the extension.
LoadLibraries(libs1: text, libs2: text)
LoadFromAssets
Loads a PDF file from assets.
LoadFromAssets(assetName: text, defaultPage: number, password: text, snap: boolean, fling: boolean)
LoadFromPath
Loads a PDF file from a file path.
LoadFromPath(path: text, defaultPage: number, password: text, snap: boolean, fling: boolean)
LoadFromUri
Loads a PDF file from a URI.
LoadFromUri(uri: text, defaultPage: number, password: text, snap: boolean, fling: boolean)
LoadFromUrl
Loads a PDF file from an online URL.
LoadFromUrl(url: text, defaultPage: number, useCache: boolean, password: text, snap: boolean, fling: boolean)
JumpTo
Jumps to the provided page.
JumpTo(page: number, animate: boolean)
SetPositionOffsetWith
Sets the position offset for the current PDF page.
SetPositionOffsetWith(position: number, moveHandle: boolean)
StopFling
Stops fling on PDF View.
StopFling()
Recycle
Resets the PDF View. Removes the currently loaded PDF.
Recycle()
LoadPages
Reloads the pages of the PDF.
LoadPages()
PerformSnap
Performs snap on the PDF View.
PerformSnap()
Zoom
Zooms to the current PDF page with the specified amount.
Zoom(zoom: number)
FitToWidth
Fits the page to full width.
FitToWidth(page: number)
ResetZoom
Resets the zoom. The action is performed in an animated way if animate
is true.
ResetZoom(animate: boolean)
ZoomWithAnimation
Zooms in the page with animation.
ZoomWithAnimation(zoom: number)
GetPageAtPositionOffset
Gets the page present at the provided position offset.
GetPageAtPositionOffset(offset: number) : number
GetPdfMetadata
Gets the metadata from the provided PDF file.
GetPdfMetadata()
GetLinksAt
Gets a list of links present in the provided PDF page.
GetLinksAt(page: number)
DeleteCache
Deletes the cache of PDF View.
DeleteCache()
IsCachedLocally
Returns if the cached PDF file for the provided URL is available.
IsCachedLocally(url: text) : boolean
GetFilePathForCache
Returns the path for the cached PDF file of the provided URL. Returns an empty text if no cache is available.
GetFilePathForCache(url: text) : text
Properties
- Layout: Set the parent layout arrangement for showing the PDF View.
- AutoSpacing: Enable/Disable autospacing for PDF pages.
- Spacing: Set the spacing for PDF pages.
- SwipeHorizontal: Check if the pages are being loaded horizontally.
- DoubleTapEnabled: Check if double tap to zoom is enabled.
- ScrollbarEnabled: Check if the scrollbar is enabled.
- PositionOffset: Set the position offset for the current PDF page.
- PageCount: Get the total page count of the currently loaded PDF.
- NightMode: Enable/Disable night mode.
- Recycled: Check if the PDF View is recycled.
- PageFillsScreen: Check if the currently loaded page fills the screen.
- DocumentFillsView: Check if the currently loaded PDF fills the layout.
- CurrentPage: Get the current page of the PDF shown to the user.
- CurrentXOffset: Get the current x offset of PDF View.
- CurrentYOffset: Get the current y offset of PDF View.
- Zoom: Get the zoom amount of the PDF View.
- Zooming: Check if the user is currently zooming in the PDF View.
- MinZoom: Set the minimum zoom for PDF View.
- MidZoom: Set the mid zoom for PDF View.
- MaxZoom: Set the maximum zoom for PDF View.
- UseBestQuality: Check if the pages are being loaded in the best quality.
- SwipeVertical: Check if swiping is being done vertically.
- SwipeEnabled: Check if swiping is enabled.
- AnnotationRenderingEnabled: Check if the PDF View is rendering annotations.
- AntiAliasing: Check if anti-aliasing is enabled for the PDF View.
- SpacingPx: Get the spacing between PDF pages in Pixels.
- AutoSpacingEnabled: Check if automatic spacing is enabled.
- PageFling: Check if fling is enabled for PDF pages.
- FitEachPage: Check if PDF View is fitting each page.
- PageSnap: Check if snapping is enabled for PDF pages.
- RenderDuringScale: Check if PDF View will render pages even during scale.
Events
- OnlineFileLoaded: Triggered when an online file is loaded successfully.
- FailedToLoadOnlineFile: Triggered when an error is encountered while downloading an online file.
- OnlineFileLoadProgress: Triggered when the progress for downloading an online PDF file changes.
- LinkClicked: Triggered when the user clicks on a link present in the PDF.
- LongPress: Triggered when the user long clicks at a point in the PDF view.
- Tap: Triggered when the user taps on a point in the PDF view.
- InitiallyRendered: Triggered when the initial rendering of pages has succeeded.
- PageChanged: Triggered when the current page has changed.
- PageError: Triggered when an error is encountered while loading the page.
- ErrorOccurred: Triggered when an error occurs while loading PDF files.
- PageScrolled: Triggered when the PDF view is scrolled.
- PagesLoaded: Triggered when all the pages have been loaded successfully.
- PageDrawn: Triggered when a specific page is drawn successfully.
- ErrorLoadingLibraries: Triggered when an error is encountered while loading the native libraries.
- LibrariesLoaded: Triggered when all the native libraries are loaded successfully.
- GotMetadata: Triggered when the metadata from the current PDF file is retrieved.
- GotLinks: Triggered when the list of links present in the PDF page is retrieved successfully.
Demo
Basic Usage
Price
Please Go Through Extension Buying Policy Before Purchasing The Extension
499 INR (UPI)
or
7.99$ (PayPal)
We also accept other payment gateways (Additional fees may apply for certain payment gateways.)
DM Me Here In The Community Or In Telegram To Buy.
For Other Payment Methods DM in the community or message me on Telegram.