How load pdf file in new tab of the browser using dompdf plugin from cakephp3 - cakephp-3.0

I'm using cakephp 3 and a this dompdf plugin and need to show the pdf in a new tab of the browser and refresh the other page at the same time.
The method for this is run when the user send a form. So, I found a way for this adding target=_blank to the form but It is having problems with validators...when the form fails and return error messages, this page open a new tab...so...Can you help me with that?

Related

Add 'back'/'previous view' button to HTML that will be converted to PDF

I have been asked to add 'TOC' and 'Back' buttons to HTML files which output as PDF using Antenna-House formatter.
The 'TOC' button navigates to the table of contents-this is simple enough to do.
The 'Back' button should navigate to the view prior to clicking the 'TOC' button and it is this I am struggling with.
I can get the back button to work using JavaScript with the HTML file prior to conversion. But JavaScript does not work in the output PDF.
Anything else I use I get an error message 'file not found' or 'unexpected end of line feed'.
The PDF viewer my company has does have back buttons but they are not as easily accessible as a button on the PDF would be.
Is it possible to do this?
You can specify some JavaScript to run when the document opens (see "openaction" in https://www.antennahouse.com/product/ahf66/ahf-ext.html#axf.document-info) and you can specify JavaScript for a form field event (see https://www.antennahouse.com/product/ahf66/ahf-ext.html#form-action).
What the JavaScript can do will depend on the JavaScript capability of the PDF viewer, not on AH Formatter. You may be able to make a one-button form that runs JavaScript that instructs the PDF viewer to return to the previous view, but I've never tried it.

How to save an HTML page in a PDF whit a button?

Hi guys i need to save my HTML page in a PDF file how i can do that ?
Function or external app?
this is one example of my page:
|
v
Can anyone link me a tutorial? it's my first experience with these things
i need to store the pdf in a directory in the server .. whit window.print() user must click Print in the layout... i want a function that print in automatic without any user action
If you want to add a button to save a page as PDF, you might just assign window.print to the button. All of the modern browsers will allow the user to save document as a PDF from the print dialogue.
EDIT: for storing PDF on a server you may use a library like html-pdf

How to embed local HTML file to existing GWT page

I have a page that is constructed by GWT, when the page get loaded, I will display some required content in it. And then if user click a certain button on the page, I will send request to server side and server will return me a HTML file(a chart generated by jquery plotting tool) stored in local directory, I need to display this HTML file into the existing GWT page's certain widget.
I tried to use Frame in GWT to link to the local HTML file and display it, it get failed, googled and found it's because of browser security setting.Please share your thought, any idea is appreciated.

How to load a dynamic JSP page using ajax?

Recently I am doing a JSP website to get the information from database. Now I built a function that user can rewrite something on the webpage. But it will go to a new website. I want only to load the changed information in a HTML table(the table is worked out with JSP). I have tried to load text file with Ajax and it worked. But I have no idea how I can do it with dynamic message. I am totally new with Ajax.

webapp save webpage with form contents to pdf in iPad

I have a form with some boxes to use handwriting and signature in an ipad, it is
http://asbec.mx/form
I want a button to save as pdf and another one to print via airprint.
It is for a webapp.
I have already tried a button to save as pdf as you can see, the problem is that it creates a blank form.
Thanks for your support
This seems to be something that should be handled on the server end. You might try something like Zend PDF framework (extended PHP library).
http://framework.zend.com/manual/1.12/en/zend.pdf.html