{"id":3814,"date":"2021-09-07T15:44:50","date_gmt":"2021-09-07T15:44:50","guid":{"rendered":"https:\/\/ionicframework.com\/blog\/?p=3814"},"modified":"2021-09-07T15:48:14","modified_gmt":"2021-09-07T15:48:14","slug":"creating-a-native-plugin-for-pspdfkit","status":"publish","type":"post","link":"https:\/\/ionic.io\/blog\/creating-a-native-plugin-for-pspdfkit","title":{"rendered":"Creating a Native Plugin for PSPDFKit"},"content":{"rendered":"<blockquote><p>\n  The following is a guest blog post from Stefan Kieleithner, a developer at PSPDFKit. PSPDFKit is a tool for working with documents in your app. Head over to <a href=\"https:\/\/pspdfkit.com\/\">PSPDFKit.com<\/a> to learn more about all their products.\n<\/p><\/blockquote>\n<p>Third-party plugins are a vital part of the Ionic platform, helping developers to easily enhance their apps with new functionality. In this post, we would like to show you how PSPDFKit created a plugin using their native platform\u2019s SDKs to bring PDF functionality to <a href=\"https:\/\/ionicframework.com\">Ionic<\/a> apps.<\/p>\n<p><!--more--><\/p>\n<h2>Creating a Third-Party Plugin: From Cordova to Capacitor<\/h2>\n<p>Creating a third party plugin for Ionic is quite straightforward. The first step would be to decide what technology to use for creating a new plugin. With <a href=\"https:\/\/capacitorjs.com\">Capacitor<\/a> being at the forefront and becoming more and more popular, the decision is easy nowadays.<\/p>\n<p>When we created our plugin, Capacitor was not yet available, so we opted for creating a Cordova plugin at the time. Since Capacitor is <a href=\"https:\/\/capacitorjs.com\/docs\/plugins\/cordova\">backwards compatible<\/a> with most existing Cordova plugins, integrating our plugin nowadays with Capacitor works as well without any issues.<\/p>\n<p>Ideally, plugins should be small, and focus on a single task that helps developers achieve a specific task in their apps. That&#8217;s why having multiple smaller plugins is preferred and useful for the community, as the added functionality is better suited for a single feature. For PSPDFKit, this task is viewing and annotating PDFs, enabling users to work with documents easily, and providing developers with a very straightforward and uncomplicated integration of PDF features in their apps.<\/p>\n<h2>How to Approach Creating a Plugin<\/h2>\n<p>The most important questions are how you want the plugin to look and what features and API should be exposed?<\/p>\n<p>We used our existing <a href=\"https:\/\/pspdfkit.com\/pdf-sdk\/ios\/\">iOS<\/a> and <a href=\"https:\/\/pspdfkit.com\/pdf-sdk\/android\/\">Android SDKs<\/a> to provide a unified plugin with a similar JavaScript API that can be used on both platforms.<\/p>\n<p>We started implementing the plugin by following the <a href=\"https:\/\/cordova.apache.org\/docs\/en\/10.x\/guide\/hybrid\/plugins\/\">Plugin Development Guide<\/a>.<\/p>\n<p>Since we already have native SDKs available, we actually use those under the hood of the plugin to offer a native platform experience, running with our optimized PDF rendering and annotation engine.<\/p>\n<p>For iOS, this meant creating a new <code>CDVPlugin<\/code>, that handles all functionality of the plugin. The iOS part of the plugin is created using Objective-C, so the starting point would look something like this:<\/p>\n<pre><code class=\"language-objectivec\">#import &lt;Foundation\/Foundation.h&gt;\n#import &lt;Cordova\/CDV.h&gt;\n\n@interface PSPDFKitPlugin : CDVPlugin\n@end\n<\/code><\/pre>\n<p>In the implementation of this custom plugin class, all the code and the wrapping methods for the plugin are located here.<\/p>\n<p>The logic for wrapping a function call from JavaScript to Objective-C allowing custom parameters could look like this:<\/p>\n<pre><code class=\"language-objectivec\">- (void)present:(CDVInvokedUrlCommand *)command {\n    NSString *path = [command argumentAtIndex:0];\n    NSDictionary *options = [command argumentAtIndex:1];\n\n    [self configurePDFViewControllerWithPath:path options:options];\n\n    \/\/ Present the PDF View controller.\n    [self.viewController presentViewController:pdfController animated:YES completion:^{\n        [self.commandDelegate sendPluginResult:[CDVPluginResult resultWithStatus:CDVCommandStatus_OK] callbackId:command.callbackId];\n    }];\n}\n<\/code><\/pre>\n<p>The approach for Android is similar.<\/p>\n<p>If you would rather use Capacitor instead of Cordova, creating a Capacitor plugin from scratch can be done as explained in the <a href=\"https:\/\/capacitorjs.com\/docs\/plugins\/creating-plugins\">Creating Capacitor Plugins guide<\/a>.<\/p>\n<h2>Cross Platform Approach<\/h2>\n<p>We, at PSPDFKit, offer our native SDK on various platforms, with an API that feels at home on every single system. That sometimes means that the API needs to be structured differently across platforms. This turned out to be a challenge that needed more thought once we started developing the plugin.<\/p>\n<p>In the beginning, we offered a separate plugin for each platform. However, this turned out to be not optimal for Ionic developers creating apps for both iOS and Android, as it works against its premise of being a cross-platform technology, and adds a maintenance cost. So we made a push and made it a goal to <a href=\"https:\/\/pspdfkit.com\/blog\/2019\/pspdfkit-cordova\/\">unify the plugins<\/a>, and only offer a single Cordova plugin that works across both platforms.<\/p>\n<p>Therefore, since we wanted to offer a single combined plugin that covers both iOS and Android, we had to make sure that the API we exposed worked the same on both platforms with minimal exceptions, to accommodate for platform and feature differences. It was important for the API to be as similar as possible, so users of the plugin wouldn\u2019t have to conditionalize logic depending on the platform.<\/p>\n<p>For example, to present a PDF, we adhere to platform conventions on iOS and Android in the UI, but we expose a unified JavaScript API in the plugin that handles presentation of a PDF using ways that are native on each platform.<\/p>\n<p>Using our native iOS SDK, the code would look like this:<\/p>\n<pre><code class=\"language-objectivec\">let document = Document(url: url)\nlet pdfController = PDFViewController(document: document)\npresent(UINavigationController(rootViewController: pdfController), animated: true)\n<\/code><\/pre>\n<p>On Android the logic would look like this:<\/p>\n<pre><code class=\"language-java\">val config = PdfActivityConfiguration.Builder(context).build()\nPdfActivity.showDocument(this, uri, config)\n<\/code><\/pre>\n<p>And the unified API in our plugin that handles presentation on each platform simultaneously is this:<\/p>\n<pre><code class=\"language-ts\">PSPDFKit.present(path, options, success, failure);\n<\/code><\/pre>\n<h2>Using the Plugin in an App<\/h2>\n<p>When using the PSPDFKit plugin in your app, here are some of the most useful features that can be done programmatically via the JavaScript API.<\/p>\n<p>To simply present a document, you can call the <code>present<\/code> function:<\/p>\n<pre><code class=\"language-ts\">const documentPath = cordova.file.applicationDirectory + &quot;www\/Document.pdf&quot;\nPSPDFKit.present(documentPath);\n<\/code><\/pre>\n<p>The plugin also supports additional customization options, like changing the page transition mode and changing the background color:<\/p>\n<pre><code class=\"language-ts\">PSPDFKit.present(documentPath, {\n    pageTransition: &#039;scrollContinuous&#039;,\n    backgroundColor: &#039;black&#039;,\n});\n<\/code><\/pre>\n<p>It\u2019s also possible to programmatically switch pages by setting a specific page index:<\/p>\n<pre><code class=\"language-ts\">PSPDFKit.setPage(3, true);\n<\/code><\/pre>\n<h2>Capacitor Compatibility<\/h2>\n<p>Even though the PSPDFKit plugin was originally made for Cordova, it is also fully compatible with Ionic and Capacitor. Since Capacitor is backwards compatible and supports most Cordova plugins, we verified that our plugin can be integrated in Capacitor apps without any issues. Capacitor is very good at supporting existing plugins, and they should run fine in most cases.<\/p>\n<p>To install a Cordova plugin in a Capacitor app, have a look at <a href=\"https:\/\/capacitorjs.com\/docs\/plugins\/cordova\">the dedicated documentation explaining this<\/a>. Plugins can be installed like any other package.<\/p>\n<p>For PSPDFKit, the main install steps would look like this:<\/p>\n<pre><code class=\"language-bash\">npm install https:\/\/github.com\/PSPDFKit\/PSPDFKit-Cordova.git\n<\/code><\/pre>\n<p>For further steps and troubleshooting, please have a look at <a href=\"https:\/\/github.com\/PSPDFKit\/PSPDFKit-Cordova\/blob\/master\/src\/ios\/PSPDFKitPlugin.m\">the installation instructions of the PSPDFKit Cordova plugin<\/a>.<\/p>\n<h2>What is PSPDFKit?<\/h2>\n<p>PSPDFKit for iOS and Android, which runs under the hood of the Cordova plugin, is a feature-rich SDK for viewing, annotating, editing, and creating PDFs. It offers developers powerful APIs for quickly adding PDF functionality to any application. It contains a beautiful UI, which is simple and easy to use, and is highly customizable; a highly accurate and reliable PDF rendering engine; support for viewing, annotating, editing, signing, filling forms, and more PDF related features.<\/p>\n<p>PSPDFKit offers a variety of products for working with documents. The native iOS and Android SDKs that are used to provide the Ionic plugin are only a subset of the solutions that PSPDFKit offers.<\/p>\n<p>Head over to <a href=\"https:\/\/pspdfkit.com\/\">PSPDFKit.com<\/a> to learn more about all our products.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The following is a guest blog post from Stefan Kieleithner, a developer at PSPDFKit. PSPDFKit is a tool for working with documents in your app. Head over to PSPDFKit.com to learn more about all their products. Third-party plugins are a vital part of the Ionic platform, helping developers to easily enhance their apps with new [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":3821,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"publish_to_discourse":"0","publish_post_category":"23","wpdc_auto_publish_overridden":"","wpdc_topic_tags":"","wpdc_pin_topic":"","wpdc_pin_until":"","discourse_post_id":"","discourse_permalink":"","wpdc_publishing_response":"","wpdc_publishing_error":"","_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[124],"tags":[133,220,221],"class_list":["post-3814","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-cross-platform","tag-pdf","tag-plugins"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v23.0 (Yoast SEO v23.0) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Creating a Native Plugin for PSPDFKit - Ionic Blog<\/title>\n<meta name=\"description\" content=\"PSPDFKit developed a plugin to take advantage of their native platform&#039;s SDKs, bringing PDF functionality to mobile for Ionic applications.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ionic.io\/blog\/creating-a-native-plugin-for-pspdfkit\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Creating a Native Plugin for PSPDFKit\" \/>\n<meta property=\"og:description\" content=\"PSPDFKit developed a plugin to take advantage of their native platform&#039;s SDKs, bringing PDF functionality to mobile for Ionic applications.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ionic.io\/blog\/creating-a-native-plugin-for-pspdfkit\" \/>\n<meta property=\"og:site_name\" content=\"Ionic Blog\" \/>\n<meta property=\"article:published_time\" content=\"2021-09-07T15:44:50+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-09-07T15:48:14+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2021\/09\/pspdfkit-ionic-feature-image.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1600\" \/>\n\t<meta property=\"og:image:height\" content=\"880\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Mike Hartington\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@mhartington\" \/>\n<meta name=\"twitter:site\" content=\"@ionicframework\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Mike Hartington\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/ionic.io\/blog\/creating-a-native-plugin-for-pspdfkit#article\",\"isPartOf\":{\"@id\":\"https:\/\/ionic.io\/blog\/creating-a-native-plugin-for-pspdfkit\"},\"author\":{\"name\":\"Mike Hartington\",\"@id\":\"https:\/\/ionic.io\/blog\/#\/schema\/person\/c8c92b04d526adb925ea514c619a267b\"},\"headline\":\"Creating a Native Plugin for PSPDFKit\",\"datePublished\":\"2021-09-07T15:44:50+00:00\",\"dateModified\":\"2021-09-07T15:48:14+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/ionic.io\/blog\/creating-a-native-plugin-for-pspdfkit\"},\"wordCount\":1043,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/ionic.io\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/ionic.io\/blog\/creating-a-native-plugin-for-pspdfkit#primaryimage\"},\"thumbnailUrl\":\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2021\/09\/pspdfkit-ionic-feature-image.png\",\"keywords\":[\"Cross-Platform\",\"pdf\",\"plugins\"],\"articleSection\":[\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/ionic.io\/blog\/creating-a-native-plugin-for-pspdfkit#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ionic.io\/blog\/creating-a-native-plugin-for-pspdfkit\",\"url\":\"https:\/\/ionic.io\/blog\/creating-a-native-plugin-for-pspdfkit\",\"name\":\"Creating a Native Plugin for PSPDFKit - Ionic Blog\",\"isPartOf\":{\"@id\":\"https:\/\/ionic.io\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/ionic.io\/blog\/creating-a-native-plugin-for-pspdfkit#primaryimage\"},\"image\":{\"@id\":\"https:\/\/ionic.io\/blog\/creating-a-native-plugin-for-pspdfkit#primaryimage\"},\"thumbnailUrl\":\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2021\/09\/pspdfkit-ionic-feature-image.png\",\"datePublished\":\"2021-09-07T15:44:50+00:00\",\"dateModified\":\"2021-09-07T15:48:14+00:00\",\"description\":\"PSPDFKit developed a plugin to take advantage of their native platform's SDKs, bringing PDF functionality to mobile for Ionic applications.\",\"breadcrumb\":{\"@id\":\"https:\/\/ionic.io\/blog\/creating-a-native-plugin-for-pspdfkit#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/ionic.io\/blog\/creating-a-native-plugin-for-pspdfkit\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/ionic.io\/blog\/creating-a-native-plugin-for-pspdfkit#primaryimage\",\"url\":\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2021\/09\/pspdfkit-ionic-feature-image.png\",\"contentUrl\":\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2021\/09\/pspdfkit-ionic-feature-image.png\",\"width\":1600,\"height\":880},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/ionic.io\/blog\/creating-a-native-plugin-for-pspdfkit#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/ionic.io\/blog\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Creating a Native Plugin for PSPDFKit\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/ionic.io\/blog\/#website\",\"url\":\"https:\/\/ionic.io\/blog\/\",\"name\":\"ionic.io\/blog\",\"description\":\"Build amazing native and progressive web apps with the web\",\"publisher\":{\"@id\":\"https:\/\/ionic.io\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/ionic.io\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/ionic.io\/blog\/#organization\",\"name\":\"Ionic\",\"url\":\"https:\/\/ionic.io\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/ionic.io\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2020\/10\/white-on-color.png\",\"contentUrl\":\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2020\/10\/white-on-color.png\",\"width\":1920,\"height\":854,\"caption\":\"Ionic\"},\"image\":{\"@id\":\"https:\/\/ionic.io\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/ionicframework\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/ionic.io\/blog\/#\/schema\/person\/c8c92b04d526adb925ea514c619a267b\",\"name\":\"Mike Hartington\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/ionic.io\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2018\/08\/mike-headshot-2-smaller-150x150.png\",\"contentUrl\":\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2018\/08\/mike-headshot-2-smaller-150x150.png\",\"caption\":\"Mike Hartington\"},\"description\":\"Director of Developer Relations\",\"sameAs\":[\"https:\/\/twitter.com\/mhartington\",\"https:\/\/x.com\/mhartington\"],\"url\":\"https:\/\/ionic.io\/blog\/author\/mike\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Creating a Native Plugin for PSPDFKit - Ionic Blog","description":"PSPDFKit developed a plugin to take advantage of their native platform's SDKs, bringing PDF functionality to mobile for Ionic applications.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/ionic.io\/blog\/creating-a-native-plugin-for-pspdfkit","og_locale":"en_US","og_type":"article","og_title":"Creating a Native Plugin for PSPDFKit","og_description":"PSPDFKit developed a plugin to take advantage of their native platform's SDKs, bringing PDF functionality to mobile for Ionic applications.","og_url":"https:\/\/ionic.io\/blog\/creating-a-native-plugin-for-pspdfkit","og_site_name":"Ionic Blog","article_published_time":"2021-09-07T15:44:50+00:00","article_modified_time":"2021-09-07T15:48:14+00:00","og_image":[{"width":1600,"height":880,"url":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2021\/09\/pspdfkit-ionic-feature-image.png","type":"image\/png"}],"author":"Mike Hartington","twitter_card":"summary_large_image","twitter_creator":"@mhartington","twitter_site":"@ionicframework","twitter_misc":{"Written by":"Mike Hartington","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/ionic.io\/blog\/creating-a-native-plugin-for-pspdfkit#article","isPartOf":{"@id":"https:\/\/ionic.io\/blog\/creating-a-native-plugin-for-pspdfkit"},"author":{"name":"Mike Hartington","@id":"https:\/\/ionic.io\/blog\/#\/schema\/person\/c8c92b04d526adb925ea514c619a267b"},"headline":"Creating a Native Plugin for PSPDFKit","datePublished":"2021-09-07T15:44:50+00:00","dateModified":"2021-09-07T15:48:14+00:00","mainEntityOfPage":{"@id":"https:\/\/ionic.io\/blog\/creating-a-native-plugin-for-pspdfkit"},"wordCount":1043,"commentCount":0,"publisher":{"@id":"https:\/\/ionic.io\/blog\/#organization"},"image":{"@id":"https:\/\/ionic.io\/blog\/creating-a-native-plugin-for-pspdfkit#primaryimage"},"thumbnailUrl":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2021\/09\/pspdfkit-ionic-feature-image.png","keywords":["Cross-Platform","pdf","plugins"],"articleSection":["Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/ionic.io\/blog\/creating-a-native-plugin-for-pspdfkit#respond"]}]},{"@type":"WebPage","@id":"https:\/\/ionic.io\/blog\/creating-a-native-plugin-for-pspdfkit","url":"https:\/\/ionic.io\/blog\/creating-a-native-plugin-for-pspdfkit","name":"Creating a Native Plugin for PSPDFKit - Ionic Blog","isPartOf":{"@id":"https:\/\/ionic.io\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/ionic.io\/blog\/creating-a-native-plugin-for-pspdfkit#primaryimage"},"image":{"@id":"https:\/\/ionic.io\/blog\/creating-a-native-plugin-for-pspdfkit#primaryimage"},"thumbnailUrl":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2021\/09\/pspdfkit-ionic-feature-image.png","datePublished":"2021-09-07T15:44:50+00:00","dateModified":"2021-09-07T15:48:14+00:00","description":"PSPDFKit developed a plugin to take advantage of their native platform's SDKs, bringing PDF functionality to mobile for Ionic applications.","breadcrumb":{"@id":"https:\/\/ionic.io\/blog\/creating-a-native-plugin-for-pspdfkit#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ionic.io\/blog\/creating-a-native-plugin-for-pspdfkit"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ionic.io\/blog\/creating-a-native-plugin-for-pspdfkit#primaryimage","url":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2021\/09\/pspdfkit-ionic-feature-image.png","contentUrl":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2021\/09\/pspdfkit-ionic-feature-image.png","width":1600,"height":880},{"@type":"BreadcrumbList","@id":"https:\/\/ionic.io\/blog\/creating-a-native-plugin-for-pspdfkit#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/ionic.io\/blog"},{"@type":"ListItem","position":2,"name":"Creating a Native Plugin for PSPDFKit"}]},{"@type":"WebSite","@id":"https:\/\/ionic.io\/blog\/#website","url":"https:\/\/ionic.io\/blog\/","name":"ionic.io\/blog","description":"Build amazing native and progressive web apps with the web","publisher":{"@id":"https:\/\/ionic.io\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ionic.io\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/ionic.io\/blog\/#organization","name":"Ionic","url":"https:\/\/ionic.io\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ionic.io\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2020\/10\/white-on-color.png","contentUrl":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2020\/10\/white-on-color.png","width":1920,"height":854,"caption":"Ionic"},"image":{"@id":"https:\/\/ionic.io\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/ionicframework"]},{"@type":"Person","@id":"https:\/\/ionic.io\/blog\/#\/schema\/person\/c8c92b04d526adb925ea514c619a267b","name":"Mike Hartington","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ionic.io\/blog\/#\/schema\/person\/image\/","url":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2018\/08\/mike-headshot-2-smaller-150x150.png","contentUrl":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2018\/08\/mike-headshot-2-smaller-150x150.png","caption":"Mike Hartington"},"description":"Director of Developer Relations","sameAs":["https:\/\/twitter.com\/mhartington","https:\/\/x.com\/mhartington"],"url":"https:\/\/ionic.io\/blog\/author\/mike"}]}},"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2021\/09\/pspdfkit-ionic-feature-image.png","_links":{"self":[{"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/posts\/3814","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/comments?post=3814"}],"version-history":[{"count":0,"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/posts\/3814\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/media\/3821"}],"wp:attachment":[{"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/media?parent=3814"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/categories?post=3814"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/tags?post=3814"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}