Skip to content

Component Architecture #1

@boehlke

Description

@boehlke

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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions