Skip to content

Commit 02bfb8f

Browse files
authored
Merge pull request #64 from PSPDFKit/rad/add-pageLabelEnabled-documentLabelEnabled
Adds the ability to set `pageLabelEnabled` and `documentLabelEnabled`
2 parents c6d0ad1 + 8c43826 commit 02bfb8f

File tree

3 files changed

+26
-2
lines changed

3 files changed

+26
-2
lines changed

PSPDFKitPlugin/PSPDFKitPlugin.m

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -966,6 +966,30 @@ - (NSNumber *)pageGrabberEnabledAsJSON
966966
return @(_pdfController.configuration.pageGrabberEnabled);
967967
}
968968

969+
- (void)setPageLabelEnabledForPSPDFViewControllerWithJSON:(NSNumber *)pageLabelEnabled
970+
{
971+
[_pdfController updateConfigurationWithBuilder:^(PSPDFConfigurationBuilder *builder) {
972+
builder.pageLabelEnabled = pageLabelEnabled.boolValue;
973+
}];
974+
}
975+
976+
- (NSNumber *)pageLabelEnabledAsJSON
977+
{
978+
return @(_pdfController.configuration.pageLabelEnabled);
979+
}
980+
981+
- (void)setDocumentLabelEnabledForPSPDFViewControllerWithJSON:(NSNumber *)documentLabelEnabled
982+
{
983+
[_pdfController updateConfigurationWithBuilder:^(PSPDFConfigurationBuilder *builder) {
984+
builder.documentLabelEnabled = documentLabelEnabled.boolValue;
985+
}];
986+
}
987+
988+
- (NSNumber *)documentLabelEnabledAsJSON
989+
{
990+
return @(_pdfController.configuration.documentLabelEnabled);
991+
}
992+
969993
#pragma mark PDFProcessing methods
970994

971995
- (void)convertPDFFromHTMLString:(CDVInvokedUrlCommand *)command

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "pspdfkit-cordova-ios",
3-
"version": "1.2.3",
3+
"version": "1.2.4",
44
"description": "PSPDFKit Cordova Plugin for iOS",
55
"cordova": {
66
"id": "pspdfkit-cordova-ios",

plugin.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<plugin id="pspdfkit-cordova-ios" version="1.2.3" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android">
2+
<plugin id="pspdfkit-cordova-ios" version="1.2.4" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android">
33
<engines>
44
<engine name="cordova" version=">=6.3.1"/>
55
</engines>

0 commit comments

Comments
 (0)