Skip to content

Instantly share code, notes, and snippets.

Luna Graysen non-binary

Block or report user

Report or block non-binary

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View checkbox.js
insertCheckboxFormField(pageRect, pageNo, type) {
let instance = this.PSPDF;
async function createNewFormField(instance) {
try {
const formFieldName = type + "_formfield";
const newFormFieldName = `${formFieldName}_${Math.random()
.toString(36)
.replace(/[^a-z]+/g, "")}`;
View custom-button-toolbar-example.js
const toolbarItems = PSPDFKit.defaultToolbarItems;
let pagerIndex = toolbarItems.findIndex(item => item.type == "pager");
toolbarItems.splice(pagerIndex - 1, 0, {
type: "custom",
title: "click me",
onPress: function() {
console.log("click");
}
});
You can’t perform that action at this time.