gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Creating PDF reports


From: Steven LeMaire
Subject: Re: Creating PDF reports
Date: Wed, 27 Feb 2013 07:09:04 -0500

Hmm, I would have liked to avoid needing X. I just ran in the debugger and it's 
really the moment you get the sharedApplication that it complains:

Uncaught exception WindowServerCommunication, reason: Unable to connect to X 
Server `'

I also found some old threads about pretty much what I'm try to do, a tool that 
makes use of AppKit classes:

http://lists.gnu.org/archive/html/discuss-gnustep/2004-06/msg00041.html

I guess it wasn't solved ?

Perhaps there's another way i could go about creating a PDF ? Mind you, this 
would have been a nice and easy way to go about it. I was also thinking about 
having a view in a Nib i could load, with predefined areas (and/or labels) to 
place the report text, making a sort of "report template".


On 2013-02-27, at 6:35 AM, Robert Slover wrote:

> If you have Xvfb available, that can serve as a dummy X server for such 
> purposes. (vfb==virtual frame buffer). Unfortunately, it still requires a 
> bunch of X infrastructure such as font libraries, X shared libs, etc.
> 
> On Feb 27, 2013, at 6:02, Steven LeMaire <address@hidden> wrote:
> 
>> I tried adding the [NSApplication sharedApplication] but when I run the 
>> program with that in the code, it attempts to connect to a X server (which 
>> there is none in this case) and ends.
>> 
>> For the NEEDS_GUI=YES, do I just plug that anywhere in the makefile ?
>> 
>> thsnks !
>> 
>> 
>> On 2013-02-27, at 3:10 AM, Fred Kiefer wrote:
>> 
>>> 
>>> 
>>> Am 27.02.2013 um 05:07 schrieb Germán "A. Arias" <address@hidden>:
>>> 
>>>> El mar, 26-02-2013 a las 22:04 -0500, Steven LeMaire escribió:
>>>>> Hello Everyone,
>>>>> 
>>>>> I'm looking at writing a simple program that will run scheduled on a 
>>>>> server, which will query a database and using the results, generate a PDF 
>>>>> report to be emailed to some users. I'm not too sure how I should go 
>>>>> about doing this, my first attempt at this was to write a tool that 
>>>>> creates an NSTextView, and simply inserts the text into it. It would then 
>>>>> use the NSPrintOperation PDFOperationWithTextView method to create an 
>>>>> NSMutableData object, which could them be written to a file.
>>>>> 
>>>>> The problem I'm having now is, it requires AppKit, so I'm building with 
>>>>> application.make included in my makefile, but it then is complaining 
>>>>> there's no shared application object.
>>>>> Basically, I don't want a graphical interface, so I'm not sure where to 
>>>>> go from here.
>>>>> 
>>>>> Any guidance would be appreciated.
>>>>> 
>>>>> Thanks
>>>>> Steven
>>>>> 
>>>> 
>>>> Make a tool instead an app. You only need add in GNUmakefile:
>>>> 
>>>> NEEDS_GUI = YES
>>> 
>>> That wont help much. What you need to do is initialize the application. 
>>> Just add [NSApplication sharedApplication] somewhere in your code before 
>>> you use any of the other gui classes.
>>> 
>> 
>> 
>> _______________________________________________
>> Gnustep-dev mailing list
>> address@hidden
>> https://lists.gnu.org/mailman/listinfo/gnustep-dev




reply via email to

[Prev in Thread] Current Thread [Next in Thread]