npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

cordova-plugin-pdf-viewer-ios

v1.0.9

Published

cordova pdf viewer plugin

Downloads

10

Readme

PDFViewer

This plugin allows you to view pdf file base64 using ios native library PDFKit and it has print, digital signature and share functionality also.

Supported Platforms

  • iOS 13+
  • Cordova/Phonegap >=10.0.0

Installation

cordova plugin add cordova-plugin-pdf-viewer-ios

Removal

cordova plugin rm cordova-plugin-pdf-viewer-ios

Using the plugin

The plugin creates the global object PDFViewer in the window scope.

Open a Document file

const options = {
  fileName: "dummy.pdf"
};
PDFViewer.viewPDF(base64, options);

Options

const options = {
  page: 1,
  mode: 0,
  direction: "vertical",
  fileName: "dummy.pdf",
  toolbarColour: "#ababab",
  doneBtnColour: "#ababab",
  doneBtnText: "done",
  titleColour: "#000000",
  titleText: "dummy",
  shareBtnColour: "#000000",
  shareBtnText: "share",
  printBtnColour: "#000000",
  printBtnText: "print",
  showShareBtn: "true",
  showPrintBtn: "true",
  pdfBackgroundColour: "#ababab",
  disableCopy: "true",
  shareText: "Hello, World",
  signPDF: "false",
  signaturePlaceHolders: []
};
page
  • Its take 0, 1, 2 this specify the index of the document page need to be visible
mode
  • Its take 0, 1, 2 this specify the display mode of the document.

  • kPDFDisplaySinglePage = 0,

  • kPDFDisplaySinglePageContinuous = 1,

  • kPDFDisplayTwoUp = 2,

  • kPDFDisplayTwoUpContinuous = 3

direction
  • Its take vertical or horizontal this specify the display direction of the document.
fileName
  • Its take name of the file with extension like this dummy.pdf
toolbarColour
  • Its take toolbar colour code in hexadecimal format
doneBtnColour
  • Its take done button colour code in hexadecimal format
doneBtnText
  • Its take done button text which is visible to user instead of button
titleColour
  • Its take title text colour code in hexadecimal format
titleText
  • Its take title text which is visible in toolbar center
shareBtnColour
  • Its take share button colour code in hexadecimal format
shareBtnText
  • Its take share button text which is visible to user instead of button
printBtnColour
  • Its take print button colour code in hexadecimal format
printBtnText
  • Its take print button text which is visible to user instead of button
pdfBackgroundColour
  • Its take background colour code in hexadecimal format
disableCopy
  • Its take values as "true" or "false" to disable or enable copy text from pdf

shareText

  • Its take values to share with pdf file like title or description
showShareBtn
  • Its take values as "true" or "false" to show or hide share button
showPrintBtn
  • Its take values as "true" or "false" to show or hide print button
signPDF
  • Its take values as "true" or "false" to enable or disable digital signature in pdf

signaturePlaceHolders

  • Its take values as
[{
  sid: "Signature1",
  page: 4, //page no
  x: 420.0, // coordinate for placeholder box
  y: 600.0, // coordinate for placeholder box
  width: 100, // width for placeholder box and signature
  height: 30, // height for placeholder box and signature
  dx: 420.0, // coordinate for signature
  dy: 150.0, // coordinate for signature
  optional: "false",
  signatureTitle: "Signature of Application"
}]