[Gambas-user] Question about gb.cairo

willy at ...3474... willy at ...3474...
Mon May 23 19:58:11 CEST 2016


On 2016-05-23 17:39, Rolf-Werner Eilert wrote:
> I have used Cairo in a non GUI application, and it runs very well.
> 
Okay, good to know.
Some questions rise:
What version of Gambas is this non GUI application running on?
And is the system it is running on a non GUI install of some linux or a 
command line app running on a GUI install of some linux? Because that 
would make a world of difference.
What linux OS is it running on.

> Maybe you are using some other function which refers to GUI somewhere 
> in
> the code?

Well the library is a non GUI library I use for common stuff used by 
Gambas command line applications/daemons running on the server.
The library has been running for a while before I added gb.cairo as 
component and wrote the function to make the pdf. All other components 
are the ones that where there before.

The library (with added gb.cairo and function) still works well for the 
other command line applications/daemons as they do not se the function. 
Just the one command line application PrintKwartaal uses the function 
but will not produce the pdf.

Just to make sure, I will double or even triple check tomorrow at work, 
just to make sure. No access to the code right now.

Anyway thanks for the reply, it is hopeful to know it can work :)

Regards,

Willy
> 
> Regards
> Rolf
> 
> 
> 
> Am 23.05.2016 16:31, schrieb willy at ...3474...:
>> Hi all,
>> 
>> I have written a function to make a pdf from data in a mysql database.
>> This function is in a library. A command line application
>> 'PrintKwartaal' uses this function.
>> Goal is to print the pdf on a quarterly base using a cron job on 
>> Debain
>> server. The cron job starts the Gambas application 'PrintKwartaal', 
>> that
>> has to make the pdf and print it and next quit.
>> 
>> To write the function is started coding in a GUI environment (Gambas
>> 3.6.2 on Linux Mint 17.1 Rebecca), so I could check the layout more
>> easily and adjust.
>> 
>> When I run the function in a GUI application, it renders the pdf to 
>> the
>> location required (and I used Desktop.Open(sPdfFile) to get a preview 
>> of
>> the pdf to check for layout adjustment).
>> So, using Gambas 3.6.2 om Linux Mint 17.1 Rebecca the pdf does get 
>> made
>> on location sPdfFile
>> 
>> Once I was fine with the layout I wrote the 'PrintKwartaal' 
>> application
>> using the same function from the library.
>> In the function. the 'Desktop.Open(sPdfFile)' was replaced with 'Shell
>> "lpr " & sPdfFile Wait' as it is of little use to do a preview of a 
>> pdf
>> in a non-gui environment.
>> And the need is for a printed version of the quarterly overview of the
>> table content.
>> This change is past the Cairo.End and should be of no influence on the
>> rendering of the pdf.
>> That is all that changed in the function.
>> 
>> When I run the function in a commandline application 'PrintKwartaal' 
>> on
>> a non-gui system (Gambas 3.6.2 on Debian 7.10 Wheezy server), it 
>> doesn't
>> renders the pdf to the location required.
>> So, using Gambas 3.6.2 on Debian 7.10 Wheezy the pdf never gets made 
>> on
>> location sPdfFile
>> 
>> Could it be gb.cairo can be selected as component for a non GUI
>> application, but will not work when run in a non GUI environment?
>> Or could something else be wrong.
>> 
>> Kindest regards,
>> 
>> gbWilly
>> 
>> ------------------------------------------------------------------------------
>> Mobile security can be enabling, not merely restricting. Employees who
>> bring their own devices (BYOD) to work are irked by the imposition of 
>> MDM
>> restrictions. Mobile Device Manager Plus allows you to control only 
>> the
>> apps on BYO-devices by containerizing them, leaving personal data 
>> untouched!
>> https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
>> _______________________________________________
>> Gambas-user mailing list
>> Gambas-user at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gambas-user
>> 
> 
> 
> ------------------------------------------------------------------------------
> Mobile security can be enabling, not merely restricting. Employees who
> bring their own devices (BYOD) to work are irked by the imposition of 
> MDM
> restrictions. Mobile Device Manager Plus allows you to control only the
> apps on BYO-devices by containerizing them, leaving personal data 
> untouched!
> https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user




More information about the User mailing list