Generate PDF report based on the data contained in GWT DataGrid - gwt

with GWT 2.4, i'm developing a web ordering system wherein user can select items and put it in the cart then check it out after providing the quantity of each item. then, when user clicks PDF button, a pdf report will be generated based on the items found on the CellTable then the open with/save file dialog will appear.
How can do this one with GWT?

You have to make a request containing the data from client to server.
On the server side you handle the request, parse the data and generate the PDF file and then you send the response containing the PDF file and in the header you should set:
("Content-Disposition","attachment; filename="yourFileName.pdf");

when you click on PDF button the Asyncmethod call.You have to passed all details in async method to Serviceimplementaion class where your method going to implement.
After that you can use it itextPdf library for generate PDF.
You can use below link for create PDF file.
http://www.vogella.de/articles/JavaPDF/article.html

Related

iTextSharp edit generated PDF and save back to database

I have process that I want to do that I'm not sure it is possible. I am using iTextSharp to generate and populate a PDF with collected data that a user has entered in a previous screen.
Then the PDF is saved to a SQL Server Database as binary data. Then it is pulled back for the user to view in the browser if they would like too.
It is possible to generate the PDF, do not flatten the form, and then allow the user to edit areas that may have not been prefilled by the users information. Then I will need to be able to save this back to the database.
I have some findings on using a adobe submit button that submits the pdf to a URL that would collect the data, but I want to know if iTextSharp is capable of this. Using ASP.NET or another example.
I do not want to save the form field information, but save the whole pdf to the database with some sort of submit button.

Blue Imps jQuery file upload send files with form like normal field

Is it possible to send file with form as normal file upload? When I check a file field it is always empty, and I need to send it with form data in one call. IS that possible?
There might be better answers out there, but I ended up solving this by following steps.
Having 2 forms on the page. One for file upload and one for other form data.
Format both forms using CSS so that user gets look and feel of one form.
Have only one div (which looks like button) to submit. Hide the actual form's submit button, if you are using them (I don't. Because I preprocess data and then send by ajax)
Once user submits forms (by clicking the dummy button), Using JS programatically click the file upload button.
Optional Once that call is finished, if there are no errors only then continue.
Submit the form with other form data.
The advantage I had in this approach was that I could have more control over user's form data as well as my file upload's settings. Because I had some settings (like max number of files and max file size) were dependent on user's form entry.

Open generated PDF in new tab / window in perl

Please help. I want to open generated PDF in new window / Tab in perl.
User needs to fill the form like First Name,Last Name, Email in web page. The form contents will be filled in PDF using PDF generator. The PDF will be generate dynamically.
In my case,
There is no issue with PDF generation. The generated PDF opens in the same window. This should be open in new tab/ window.
I have tried with "_blank" in form level. The form have certain validations. So it's opening
in new tab when the form have validation errors.
The below the content type which i have used in the pdf page.
content_type : application/pdf
Content-Disposition : inline
If you set the target attribute of a HTML <form> element, the page resulting from the form submission will always displayed using that target. Having a form which either returns a HTML page on invalid input or a PDF is generally a bad idea.
IMO the following is a better solution also from a usability standpoint:
Don't set a target on your form.
If the form is submitted successfully, return a new HTML page in the same window.
Create a link or a form with hidden inputs on that page that contain the parameters entered before.
Name the link something like "Open PDF".
Point the link to your script which actually creates the PDF.
Make the link open in a new window.
Alternatively, you could implement a JavaScript-based solution, possibly using AJAX.

Joomla Form Creation & PDF Conversion

I want to convert my client registration form online.I want to have
PHP Form with validation
Form data should be inserted in database
After form submission,end user should be able to download form as pdf.
I am having pdf file format ready with me,form data should be added at specific position in pdf
Backoffice should be able to view all forms filled & able to create csv file for same.
Can i achieve my requirement using Joomla?
I am new to joomla.
Please see this link: http://www.rsjoomla.com/joomla-extensions/joomla-form.html
RSForm Pro has the feature to download the form submission in PDF form. You will have to specify the layout of the PDF in the extension itself.

Jeditable displays entire HTML document as replacement for the editable field after trigger/submit

I am using jeditable and had it working very weird.
after editing the editable field and submits it instead of printing the new content it displays the entire document window in the textbox(placeholder of editable content).
question: from the example where the author used save.php. what was the content of save.php?
is it necessary to send the result on a php file?? can't an HTML file work?
I believe within the comments box at the bottom of the author's main page - somebody has kindly provided a version of the save.php file for people to use and modify as needed.
The save.php file is used to actually save the values of the editable field/s. Without it, nothing would happen to the data and it would reset to the default text if the page is refreshed.
Options instead of a php file could be:
Saving the text/select changes to a Cookie
Using another server side methos such as asp, jsp, rails or .NET to process the saving of the changes.
an html page is a static page with no processing facility per say to communicate with the website server, so no.. html is not suitable for such a need.
Saving script must return the string you want to display on page after editing. You are now returning full html page.
Source of for all demofiles can be found from GitHub.