I'm trying to save the form data with a pdf that's being display with react-pdf. My current setup is calling the pdf bytes as a base64 string from a database entry, and loading the pdf through canvas. I've got all the necessary functions to save the actual data as strings, but I don't know how to "save" the pdf with the form fields saved with the pdf. Does someone know this last step?
<div>
<Document
file={{
data: fileBytes,
}}
onLoadSuccess={onDocumentLoadSuccess}
options={options}
>
<Page
renderForms={true}
pageNumber={pageNumber}
onClick={setVariable}
onInput={setVariable}
canvasRef={canvasRef}
/>
</Document>
<p>
Page {pageNumber} of {totalPages}
</p>
</div>