Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Component Architecture #1

Open
boehlke opened this issue Nov 29, 2018 · 0 comments
Open

Component Architecture #1

boehlke opened this issue Nov 29, 2018 · 0 comments

Comments

@boehlke
Copy link
Contributor

boehlke commented Nov 29, 2018

Overview

The purpose of react-pdf-workflows is to support creating applications involving PDF workflows like electronic contract signing. A given PDF is rendered into a canvas. Actions elements like buttons can be added for the user to interact with. The action elements will be rendered in the canvas on top of the PDF. The source PDF will not be changed but just augmented.

The component should work well in a redux setup, so it should have the least possible local state.

Example of a two-page document which is in a state where some action elements are all pinned (neither movable nor resizable), some are movable and one of the <SignHere> is shown to the user to be signed:

<PdfWorkflow
    onLoadSuccess={onDocumentLoadSuccess}
    file="document.pdf">
   <WorkflowPage pageNumber="1">
     <Approve top="5cm" left="5cm"
       removable="true"
       onRemove={removeElement}
       onResize={resize}
       onDrag={move}
       value={approveValue} draggable="true" resizable="true">
     <SignHere top="27cm" left="5cm" value={signer1}
       readonly="true"
       draggable="false" resizable="false"/>
   </WorkflowPage>
   <WorkflowPage pageNumber="2">
     <SignHere top="27cm" left="19cm"
        onClick={signHereClicked}
        info="Please sign here"
        draggable="false" resizable="false"/>
   </WorkflowPage>
</PdfWorkflow>

Issues/Ideas:

Links:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant