Is it possible with Print.js to send the PDF to storage in a folder online instead of printing it? - pdf

I am trying to use print.js(crabbly) https://github.com/crabbly/print.js to send a PDF to a folder on my website instead of printing it.
My task is to save form data into a PDF and save the PDF in a folder on my website once the user submits. I like the way print.js creates the PDF and sends it to print but I need it to send to my folder...maybe through php?
Thanks for anyone's help!!

You need to handle that form submission on the server side. Once you receive the form request or the payload, you can then use it to create your own PDF.
Looks like you may be using Php in the back-end, if that's the case, the FPDF class should have everything you need to create your PDF:
http://www.fpdf.org/
If you use Laravel, here is a convenient package wrapping the FPDF class so we can import it with composer:
https://github.com/crabbly/fpdf-laravel

Related

Read application/pdf from Request Body - .NET CORE

I am submitting a PDF file to my .NET CORE back-end.
The PDF was created using iText 7. I have added to the page few paragraphs and a PdfButtonFormField button with the following action
button.SetAction(PdfAction.CreateSubmitForm("http://localhost:4200/api/PdfSign/UploadPdfForSign", null, PdfAction.SUBMIT_PDF));
My endpoint gets the request. It looks like the request body has the binary data of the file but I have no idea how to read it.
Any help will be much appreciated!
** EDIT **
The goal is to get a PDF and sign it using iText.
The flow is - I am creating a PDF, adding the button to it and sends it to my customer. They do whatever they do on the PDF and send it back using the button from within the PDF.
I then want to read the details in my back end and sign it.
Hope this clears things.
Thank you,
Yaniv

Android camera, take picture(s) and save as multipage PDF, then upload to server via <input type="file" />

I have a webform with and want to open it on smartphone - than take pictures of some documents which need to be merged in one PDF, and on the end this file need to be uploaded to server.
My solution is to use Google Drive to upload PDF (scan) to GDrive and then somehow download this file from gdrive to server via some sort of widget (any links appreciate) installed on website.
Maybe someone have a better idea?
I know its late but my answer might help others. I also face the same challenge and implemented a custom solution based on Javascript and Since you are using web form so this solution will perfectly fits on your need.
You have to use JSPdf javascript library, JSPdf provide you pdf object in your browser and you can upload it download it and there are many other thing to play with.
First you have to initialize JSPdf object as per your requirement. I am creating PDF with page size width:500px and height 500px.
pdf = new jsPDF("l", "pt", [500,500]);
Simply when you will take picture from camera you will have each picture in form of base64, that base64 format you have to insert in JSPdf object
pdf.addImage(imgData, 'JPEG', 0, 0);
you can repeat the above code to add pictures from camera as much as you want, at the back-end these images are compiling and creating pdf document where each page have each images in sequence.
Once you are done, you can get PDF object in form of base64 object using below code that you can upload to any server.
pdf.output('datauristring')
above is only pdf part, you can find complete working example including camera part here Javascript Component to Scan Document

Export PHP Chart to PDF

I'm looking for suggestions on exporting PHP Charts to PDF format.
I am currently using Flot Chart. I have got all my charts working perfect I only need to exporting them to PDF. Any idea please?
Thank you,
Zina
Flot Chart is a client side solution for charts, so you would need to use javascript PDF library such as jsPDF to export image to PDF; Or you can serialize image and post back to server side using base64 or other binary to text encoding methods, then you can process the image however you want once images are sent to server side. If you use PHP, you can use FPDF. Personally, I prefer the later.
PHP Chart has code snippets demonstrates the later approach sending data to server side for process.
URL: Export phpChart on the server side.

CMSMS Formbuilder Multi Page Form Not uploading Files

I have created a multi page form using the formbuilder module for CMS Made Simple.
The form is submitting all other fields correctly however the upload file inputs are not uploading to the uploads directory.
I have created other forms that work perfectly using the exact same settings so it seems there is a bug in formbuilder itself for multi page forms however I am unable to figure out what it is to be able to fix it.
Does anyone have any suggestions as to why the files are not being uploaded.
Once this is fixed it will also be attached to the email that is sent as the form is submitted but this is an easy fix (just un ticking the box).
Thanks in advance.
The issue is a bug in the formbuilder module itself. A request was made on the CMSMS forge but no replies have been received.
Unfortunately there is no fix so depending on the version of formbuilder you are using you will not be able to upload files if you have a multi page form.

Multiple photo upload using struts1

We happened to get requirement to upload the multiple files ( like the gmail attachments ) using struts 1.3.5 and Ajax.
I happened to go thorough lot of resources but no luck.
Can someone shed light on this possibly by suggesting or pointing to some useful resources.
I was also looking for a multiple file upload solution for my struts2 application. Since ajax form submit do not support image submission the only option to use was a hidden iframe strategy. However, i found this wonderful plugin which uploads multiple files withour reloading the page and also shows a cool progress bar. The best thing about this plugin is that it doesn't uses flash and works on IE too. I strongly recommend using this plugin
Donot use taglibrary defined file upload for uploading. You can still use
common- fileupload to handle file upload. By doing this you can dynamically
add one more input type file element below the current input type upload using
javascript. I doubt if there is any way to do this using pure struts 1.3.5 :) .