An external service email editor is used on the front-end side.
The mail editor outputs HTML in the end, but we need to save that data.
In this case, what is the appropriate processing flow?
1Save the data as text in DB.
2Save the data as a file in S3.
The saved data is supposed to be used when editing the data again in the mail editor and when actually sending the mail.
Related
I am trying generate several individual pdfs from html in a group of elements within a node on a webpage with jsPDF. (Report cards for students). Then I need to email the individual report cards to each students parent using JavaMail.
The problem is: I don't want to save the pdf files to disk as they are generated, instead I want to programmatically loop through the report card elements in the page (id="'studentCard_' + studentId", generate the individual pdfs from the html and store or push each individual pdf into an array or object on the fly (as they are created) that I can then pass over to JavaMail and loop through to attach each individual pdf to the associated parents email.
I can convert the html to pdf without a hitch...
I am just not sure as to how to then attach this pdf to the email since the only option is to pdf.save(filename), and I don't want to actually SAVE each individually generated pdf in the loop to disk - I just want to temporarily store the generated file before I attach it to the emails and send it out.
I have converted the pdf to a blob and a blob URL and I am able to then push the blob into an array. Can I just convert the pdf to a blob or blob url and push it to an array and then loop through that array and attach that to the email. Is this my Solution to convert each pdf to a blob, then push the blob to an array to be passed on to JavaMail to loop through?
I don't know anything about this aspect of my problem. If I attach a blob to the email, or insert the blob URL in the body, when the parent clicks on the file to download it, or clicks on the link inserted into the body, will it automatically be converted back to PDF format for them to read by their own mail program or in the browser? How do I do this correctly?
You may use IndexedDB, the client-side storage of the browser. I like JsStore, an IndexedDB wrapper. I have used it for a couple of my projects. It's pretty neat.
pdf.save(filename) is NOT the only option. You should be able to use pdf.output(datauristring) or pdf.output('blob') and save it to IndexedDB. Depends on your pdf file size, you may even use localStorage, which is easier to use but has much less storage than idb.
I need to create a pdf so that all the responses got in google form should be present in that pdf.
What I did
I clicked on response tab of google-form then clicked on print all responses which generated pdf for all responses but I don't like the format of that pdf.
Then I used Document studio add-on for google spreadsheet (which contains the responses for each user) but it generates pdf for each user rather than all responses in single pdf.
What I need
Is there a way that creates pdf for all responses in a custom format just like Document Studio?
I am having a PDF form that saves the data and validate the data entered by user e.g. a client information PDF document that takes client data and when user click on send button, it must post the data to the web service that further process it or saves to database.
I am using Acrobat Professional for this. Can anyone help in this?
Acrobat and Adobe Reader can submit form data to any URL using a button on the document and the "Submit a Form" action or via Acrobat JavaScript (probably unnecessary). You just need something on the server to interpret the data. If you submit as HTML, the submission will look just like query parameters where the key names are the same as the names of the fields and the values, same as the field values without the formatting. To the server, it looks like it was submitted from a standard HTML form so just about anything you have will be able to work with the submission.
You need to use Acrobat Pro to add this button to the document but then Standard and Reader can use it.
See https://helpx.adobe.com/acrobat/using/setting-action-buttons-pdf-forms.html
You can also submit as FDF or XFDF, an XML(ish) expression of FDF, in which case you'll want to use something like the FDF Toolkit to read it but based on your question, I don't think you need to do that.
3rd party edit
Information from the linked page
FDF
Returns the user input without sending back the underlying PDF file.
You can select options to include Field Data, Comments, and
Incremental Changes To The PDF.
XFDF
Returns the user input as an XML file. You can include Comments with
the field data or just the field data.
I have created a LiveCycle PDF form that includes a Submit button to send it as XDP (including the base64 encoded PDF) to a server that pulls out the XML data and saves that to a database and then pulls out the encoded stream, decodes it and saves that back as a PDF on the server.
The issue that I am having is that once I open the PDFs made from the base64 encoded data, it seems that they are empty. After some testing I found that if I manually save the PDF before Submitting it, the information that was entered up to when it was saved is included in the encoded PDF (whereas the full data is included in the XML portion).
So my question is there a way to either:
Automatically save the PDF or otherwise preserve the data so it is sent in the base64 encoded portion of the XDP? (preferable)
Recognize when a change in the document has changed and request that the user save the PDF before clicking submit?
It seems the issue I described above was actually due to using Foxit reader instead of Adobe reader.
Adobe reader of course requires the Reader Extensions in order to be able to save form data and submit it.
Foxit does not have that restriction but does not embed the updated version of the PDF in the XDP XML data sent to the server. The only way to perform this would be ensure the user saves the PDF first which removes the Reader Extensions as per Adobe's licensing requirements.
I have made a wizard with a button. On buttons action the function generates a PDF file on the server. How can I send back this file from server disk to the client ?
If it's not a report, write the PDF file in a binary field.
See the export language wizard for example