PDF print doesn't return anything

Discuss all problems you have with Servoy here. It might help to mention the Servoy version and Operating System version you are using

PDF print doesn't return anything

Postby Karel Broer » Tue Oct 03, 2006 6:41 pm

Would it be possible to have this method returning true or false?
Code: Select all
//to print current record without printdialog to pdf file in temp dir.
controller.print(true,false,plugins.pdf_output.getPDFPrinter('c:/temp/out.pdf'))

I like to be sure if the PDF is created.
Karel Broer
ServoyCamp - http://www.servoycamp.com
User avatar
Karel Broer
 
Posts: 779
Joined: Mon May 03, 2004 12:49 am
Location: Doetinchem

Postby Harjo » Tue Oct 03, 2006 8:38 pm

see the sample of: startMetaData:



Code: Select all
//to print multiple forms to one pdf document (on file system).
var success = plugins.pdf_output.startMetaPrintJob('c:/temp/out.pdf')
if (success)
{
controller.print(true,false,plugins.pdf_output.getPDFPrinter());
forms.otherform.controller.print(true,false,plugins.pdf_output.getPDFPrinter());
}
plugins.pdf_output.endMetaPrintJob()

//to print multiple forms to one pdf document (to store in dataprovider).
var success = plugins.pdf_output.startMetaPrintJob()
if (success)
{
controller.print(true,false,plugins.pdf_output.getPDFPrinter());
forms.otherform.controller.print(true,false,plugins.pdf_output.getPDFPrinter());
}
mediaDataProvider = plugins.pdf_output.endMetaPrintJob()
Harjo Kompagnie
Direct ICT / Servoy Hosting / ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
User avatar
Harjo
 
Posts: 4269
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Re: PDF print doesn't return anything

Postby japink.m » Thu Dec 18, 2014 8:50 pm

//to print multiple forms to one pdf document (to store in dataprovider).
var success = plugins.pdf_output.startMetaPrintJob()
if (success)
{
controller.print(true,false,plugins.pdf_output.getPDFPrinter());
forms.otherform.controller.print(true,false,plugins.pdf_output.getPDFPrinter());
}
mediaDataProvider = plugins.pdf_output.endMetaPrintJob()


How can I make this mediaDataProvider thing downloadable to the webclient user? Do I have to turn this mediaDataProvider object into an JSFile object? How should I do this?
japink.m
 
Posts: 20
Joined: Fri Jun 14, 2013 9:13 pm

Re: PDF print doesn't return anything

Postby jcompagner » Mon Dec 22, 2014 11:47 am

plugins.file.write("name", mediaDataProvider)

should also work, you can write the bytes directly
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 7974
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet


Return to Discuss possible Issues and Bugs

Who is online

Users browsing this forum: No registered users and 1 guest

cron