[scilab-Users] Printing graphics

Antoine Monmayrant antoine.monmayrant at laas.fr
Mon Mar 7 09:13:54 CET 2011


Le 06/03/2011 20:05, Mike Page a écrit :
> Hi Mathieu,
>
> Thanks for the suggestions.  I am using SendScilabJob from a C program to
> use the Scilab engine for graphics.  When I want to print, I can send the
> Scilab job "toprint (0)" or "printfigure (0)".  This works, but I cannot set
> the paper size and margins, nor set it to landscape unless I enter the
> required values in a dialog box.  This is quite tedious for printing a
> series of graphs.
>
> I think you are right that the paper size default is set by the locale,
> because on one of my machines it is set to A4 and on the other to Letter.
> However, I don't know what determines whether portrait or landscape is the
> default.
>
> Maybe I just have to do it the hard way :-(
Here is a workaround that could work: why don't you generate some 
graphic files (*.png, *.pdf) from Scilab and print them from your C 
program or from any script you could run in your OS? That way you 
delegate the task of printing to your C program (or any other program) 
where you might be able to specify printer settings...

Antoine
> Thanks again,
> Mike.
>
>
> -----Original Message-----
> From: Mathieu Dubois [mailto:mathieu.dubois at limsi.fr]
> Sent: 05 March 2011 21:46
> To: users at lists.scilab.org
> Subject: Re: [scilab-Users] Printing graphics
>
>
> Hello Mike,
>
> How do you print your figure? With C code or calling a scilab function
> like toprint()?
>
> I think that the default paper size is set by your operating system
> (maybe somewhere in the locale settings or maybe at the printer level)...
>
>
> Mathieu
>
> Le 03/03/2011 12:28, Mike Page a écrit :
>> Hi,
>>
>> I am trying to print graphics from within an application that calls the
>> Scilab engine from C code.  Everything works fine, except that the graphs
>> have the wrong paper setup as a default.
>>
>> Is there any way I can set up the print properties, such as paper size,
>> landscape/portrait, etc programmatically?
>>
>> I can call printfigure (0) and printsetupbox () to show the relevant
>> dialogs, but I then have to fill them in by hand.  Is there a way to set
> the
>> values from within Scilab?
>>
>> As an alternative, is there a way to change the default values, for
> example
>> in an ini file somewhere?
>>
>> Thanks for any help with this.
>>
>> Mike.
>>
> No virus found in this incoming message.
> Checked by AVG - www.avg.com
> Version: 9.0.872 / Virus Database: 271.1.1/3482 - Release Date: 03/05/11
> 07:34:00
>





More information about the users mailing list