[Gambas-user] Anybody have an example using DCOP?

johnf jfabiani at ...1109...
Tue Jan 10 21:55:44 CET 2006


On Tuesday 10 January 2006 11:23, Rob Kudla wrote:
> On Tue January 10 2006 13:18, johnf wrote:
> > Your suggestion on the editing of the saved XML (btw it is a
> > jar with different sub-levels) can be done and is what I was
>
> There's a subdirectory in the zip file (all jar files are zip
> files), but as of yet, I have never had to edit any of the files
> in that subdirectory (which is just where they put the manifest
> of files contained within the zip file, in XML format.)  If I
> wanted to add a graphic, I would have to edit manifest.xml in
> the subdirectory.
>
> > going to attempt.  But how do I control OpenOffice so that the
> > printing of the invoice is transparent to the user.  I want
> > the user to click and have the document print.  I do this sort
>
> I have done this before using soffice's command line options.  I
> think it's something like
>
> soffice -invisible -p document.odt
>
> Do "soffice -help" to get more info, including the syntax for
> specifying a printer.
>
> > Maybe I could use a word processor to create the
> > postscript document and then edit that??????
>
> I've done this too.  Postscript files are programs with a syntax
> that's like a cross between LISP (tons of parentheses) and FORTH
> (reverse polish notation, i.e. "a b +").  You probably want to
> avoid trying this if possible, because it's very easy to make
> postscript files that cause acroread and ghostscript barf.
>
> > I saw that someone had started on a report writer but I did
> > not see that anything was really done.
>
> If you were going so far as considering the use of raw
> postscript, I really think you'll be pleased with the results of
> using the Draw class to write to a printer object; I have
> implemented a number of reports this way already.  You need to
> track your X and Y position and write methods to automatically
> advance the "cursor" and add new pages, etc., but the stuff I
> have done for my clients has been very sharp-looking.
>
> And if you're just doing reports, it seems possible to me that
> you'd be able to generate reports in Kugar's format (also xml,
> but I think it uses flat files rather than jars) and then print
> them just as you would with Openoffice, except that it would be
> faster.  But I really think you ought to look into the "draw to
> printer object" approach.
>
> Rob
The soffice thing looks like it might work.  The fact that I'm a newbie with  
Linux and Gambas is sure evident. I did not even think about some sort of 
command line interface for OpenOffice.  Of course I still have to edit the 
(or copy and edit) the xml file.  I wonder if it would be possible to store 
the xml in the database?  I would think I could using a text field to get 
that done.  

But I also like the idea of using the Draw class.  Do you have an example of 
creating a report and then printing.  It does not have to work just something 
I can sort of follow.  The datareport demo uses html for output.  But I have 
not found anything on how to print directly to a printer (without using a 
browser).  Are there browers that will allow command line printing of a html 
document?

John 




More information about the User mailing list