Producing PDF from form without replacing current window

Forum to discuss the Web client version of Servoy.

Producing PDF from form without replacing current window

Postby phschmid » Sat Mar 26, 2016 12:52 pm

I have to produce a PDF from a Servoy form and have it downloaded to the browser/desktop/client. Problem, this works fine with Servoy Dev, not with the production application server.

I tried
Code: Select all
forms.rendez_vous_personnes_paper_form.controller.print(true, true);
forms.rendez_vous.controller.show();

and
Code: Select all
forms.rendez_vous_personnes_paper_form.controller.print(true, false, plugins.pdf_output.getPDFPrinter());
forms.rendez_vous.controller.show();


With Servoy 7.4.5 Developer, the PDF is produced and downloaded (tried with Firefox and Chrome).
With Servoy 7.4.5 production, no PDF, instead I get HTML displayed in the current window and replacing the previous content.

This should be possible, but I have no clue what I am doing wrong. Many thanks for help/ideas.
br,
Philippe
phschmid
 
Posts: 9
Joined: Tue May 08, 2012 4:15 pm

Re: Producing PDF from form without replacing current window

Postby phschmid » Mon Mar 28, 2016 4:15 pm

Found the bug(s). I left a previous controller.show() for another form before the printing and I also found that Java 1.6 and Mac OX X 10.6.8 cannot produce the PDF (crash in Java/Apple code). More recent OS/Java combination seem to work.

Br,
Philippe
phschmid
 
Posts: 9
Joined: Tue May 08, 2012 4:15 pm


Return to Servoy Web Client

Who is online

Users browsing this forum: No registered users and 2 guests