{"id":14062840,"url":"https://github.com/ApryseSDK/pdftron-sign-app","last_synced_at":"2025-07-29T14:31:47.355Z","repository":{"id":38672189,"uuid":"267080050","full_name":"ApryseSDK/pdftron-sign-app","owner":"ApryseSDK","description":"Sign and request signatures on PDFs, MS Office documents","archived":false,"fork":false,"pushed_at":"2023-06-07T21:12:09.000Z","size":3980,"stargazers_count":210,"open_issues_count":23,"forks_count":58,"subscribers_count":16,"default_branch":"master","last_synced_at":"2024-12-30T02:30:32.255Z","etag":null,"topics":["digital-signature","esignature","firebase","pdf-signature","pdftron-sign","request-signatures","sign-documents","signatures"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ApryseSDK.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-26T15:24:45.000Z","updated_at":"2024-11-16T08:15:57.000Z","dependencies_parsed_at":"2024-07-30T20:00:13.549Z","dependency_job_id":null,"html_url":"https://github.com/ApryseSDK/pdftron-sign-app","commit_stats":null,"previous_names":["aprysesdk/pdftron-sign-app","pdftron/pdftron-sign-app"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/ApryseSDK/pdftron-sign-app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ApryseSDK%2Fpdftron-sign-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ApryseSDK%2Fpdftron-sign-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ApryseSDK%2Fpdftron-sign-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ApryseSDK%2Fpdftron-sign-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ApryseSDK","download_url":"https://codeload.github.com/ApryseSDK/pdftron-sign-app/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ApryseSDK%2Fpdftron-sign-app/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267703019,"owners_count":24130463,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-29T02:00:12.549Z","response_time":2574,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["digital-signature","esignature","firebase","pdf-signature","pdftron-sign","request-signatures","sign-documents","signatures"],"created_at":"2024-08-13T07:02:31.237Z","updated_at":"2025-07-29T14:31:47.006Z","avatar_url":"https://github.com/ApryseSDK.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# PDFTron Sign App\r\n\r\nPDFTron Sign App demonstrates building a signing application where users can request signatures on the documents by placing fields, sign documents, review signed documents using [PDFTron PDF SDK](https://www.pdftron.com).\r\n\r\nWatch the video here:\r\n[![image](https://img.youtube.com/vi/tSpYY8IenJw/maxresdefault.jpg)](https://youtu.be/tSpYY8IenJw)\r\n\r\nThis repo is designed to help to get started in creating your own signing workflow.\r\n\r\n## What is new in the latest release\r\n\r\n[Watch a quick recap](https://youtu.be/Q6-8s9uAe1s)\r\n\r\n- Ability to add date fields\r\n- Ability to see when the document was requested and signed\r\n- Update WebViewer to 10.0\r\n\r\n## Install\r\n\r\n[Watch this quick video to setup this project](https://youtu.be/R5zBs28_TVQ).\r\n\r\n```\r\nnpm install\r\n```\r\n\r\n## Firebase Configuration\r\n\r\nThis application uses Firebase to store PDFs and data for signatures. You can use any other backend of your choice. \r\nHowever, to get started with this sample, please register a new app with [Firebase](https://firebase.google.com/).\r\n\r\nAfter you have registered an app, create `.env` file in the root of the directory and place the following:\r\n\r\n```\r\nREACT_APP_API_KEY=your_key_goes_here\r\nREACT_APP_MESSAGING_SENDER_ID=your_key_goes_here\r\nREACT_APP_APP_ID=your_key_goes_here\r\nREACT_APP_AUTH_DOMAIN=your_domain_goes_here\r\nREACT_APP_DATABASE_URL=your_database_go_here\r\nREACT_APP_PROJECT_ID=your_project_id\r\nREACT_APP_STORAGE_BUCKET=your_storage_bucket\r\n```\r\nThe above information can be found under settings of your Firebase app.\r\n![Screenshot](https://github.com/PDFTron/pdftron-sign-app/blob/master/firebase.png)\r\n\r\nMake sure you create a storage bucket, and enable authentication for email and Google.\r\n![Screenshot](https://github.com/PDFTron/pdftron-sign-app/blob/master/firebase_authentication.png)\r\n\r\nAfter you have your storage bucket and Firestore setup give authenticated users read and write permissions.\r\n\r\nRules for storage which will host your PDF documents.\r\n![Screenshot](https://github.com/PDFTron/pdftron-sign-app/blob/master/firebase-storage-rules.png)\r\n\r\nRules for Firestore which will host document signing metadata.\r\n![Screenshot](https://github.com/PDFTron/pdftron-sign-app/blob/master/firebase-firestore-rules.png)\r\n\r\nChange `Firestore Database` rules to:\r\n```\r\nrules_version = '2';\r\nservice cloud.firestore {\r\n  match /databases/{database}/documents {\r\n    match /{document=**} {\r\n      allow read, write: if request.auth != null;\r\n    }\r\n  }\r\n}\r\n```\r\n\r\nChange `Storage` rules to:\r\n```\r\nrules_version = '2';\r\nservice firebase.storage {\r\n  match /b/{bucket}/o {\r\n    match /{allPaths=**} {\r\n      allow read, write: if request.auth != null;\r\n    }\r\n  }\r\n}\r\n```\r\n\r\nNow you can run the application and start requesting signatures.\r\n\r\n## CORS\r\n\r\nYou will need to set up CORS on your Firestore to allow WebViewer to access files stored in your bucket. I created a CORS file called `cors.json`: \r\n\r\n```\r\n[\r\n  {\r\n    \"origin\": [\"*\"],\r\n    \"method\": [\"GET\"],\r\n    \"maxAgeSeconds\": 3600\r\n  }\r\n]\r\n```\r\n\r\nAnd then used gsutil to update it:\r\nhttps://cloud.google.com/storage/docs/configuring-cors\r\n\r\nThe walkthrough recommends siging up for billing but that is not necessary to use this demo.\r\n\r\n## Run\r\n\r\n```\r\nnpm start\r\n```\r\n\r\n## Project structure\r\n\r\n```\r\nsrc/\r\n  app/             - Redux Store Configuration\r\n  components/      - React components\r\n    Assign/              - Add users to a document that needs to be signed \r\n    Lists/               - List components to list files for signing and review\r\n    MergeAnnotations/    - Merge all signatures and flatten them onto a PDF \r\n    PasswordReset/       - Reset password\r\n    PrepareDocument/     - Drag and drop signatures, text fields onto a PDF to prepare it for signing\r\n    Profile/             - Profile information and a sign out button\r\n    SignDocument/        - Sign PDF\r\n    SignIn/              - Sign in\r\n    SignUp/              - Sign up\r\n    ViewDocument/        - Review document after signing\r\n    AssignUsers          - Component combines Profile and Assign\r\n    Header               - Header when the user is not logged in\r\n    Preparation          - Component combines Profile and PrepareDocument\r\n    Sign                 - Component combines Profile and SignDocument\r\n    View                 - Component combines Profile and ViewDocument\r\n    Welcome              - Component combines Profile, SignList, Preparation, SignedList\r\n  App              - Configuration for navigation, authentication\r\n  index            - Entry point and configuration for React-Redux\r\n  firebase/        - Firebase configuration for authentication, updating documents, storing PDFs\r\n  tools/           - Helper function to copy over PDFTron dependencies into /public on post-install\r\n```\r\n\r\n## Firebase Document Structure\r\n\r\n```\r\ndocRef: docToSign/c4Y72M0d0pZx3476jxJFxrFA3Qo21593036106369.pdf\"\r\nemail: \"andrey@email.com\"\r\nemails: [\"julia@email.com\"]\r\nsigned: true\r\nsignedBy: [\"julia@email.com\"]\r\nrequestedTime: July 17, 2020 at 12:01:24 PM UTC-7\r\nsignedTime: July 17, 2020 at 12:01:24 PM UTC-7\r\nuid: \"c4Y72M0d0pZx3476jxJFxrFA3Qo2\"\r\nxfdf: [\"\u003c?xml version=\"1.0\" encoding=\"UTF-8\" ?\u003e\u003cxfdf xmlns=\"http://ns.adobe.com/xfdf/\" xml:space=\"preserve\"\u003e...\u003c/xfdf\u003e\"]\r\n ```\r\n \r\n- docRef - string - storage reference to the actual PDF\r\n- email - string - email of the requestor of the signature\r\n- emails - an array of strings - users to sign the document\r\n- signed - boolean - value for whether or not all users have signed the document (gets determined by checking lengths of emails array and xfdf array)\r\n- requestedTime - TimeStamp - value for when the signature was requested\r\n- signedTime - TimeStamp - value for when the document was signed\r\n- uid - string - unique identifier for the requestor of the signature\r\n- xfdf - an array of strings - signature appearance/form field values for each user\r\n\r\n## API documentation\r\n\r\nSee [API documentation](https://www.pdftron.com/documentation/web/guides/ui/apis).\r\n\r\n## License\r\n\r\nSee [license](./LICENSE).\r\n![](https://onepixel.pdftron.com/webviewer-ui)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FApryseSDK%2Fpdftron-sign-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FApryseSDK%2Fpdftron-sign-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FApryseSDK%2Fpdftron-sign-app/lists"}