Re: xmlroff interface for writing output? [Was: libfo interface and PHP ext]

"Mauro C." <[email protected]> Thu, 9 Mar 2006 20:04:22 +0100 (CET)
Newsgroups gmane.text.xml.xmlroff.general
Message-ID <[email protected]>
Hi to all,

--- Tony Graham <[email protected]> ha scritto: 

> "Mauro C." <[email protected]> writes:
> > --- Tony Graham <[email protected]> ha scritto: 
> ...
> >> > I have the same problem with the output result:
> >> > where can I get a pointer to result doc
> >> > (FoDocGP->job)?
> >> 
> >> Yes, I guess so.
> >> 
> >> > is the output file written when
> fo_doc_gp_finalize
> >> is
> >> > invoked?
> >> 
> >> Yes, which really happens when you run:
> >> 
> >>    'g_object_unref (fo_doc);'
> >> 
> >> I am open for suggestions on how to change that.
> >
> > my idea is to separate creation and file writing
> and
> > have to call explicitly function to generate and
> other
> >  one to get result or to write file.
> >
> > not see all the source of libgnomeprint, but ther
> is:
> >
> > GnomePrintJob->meta->buf
> >
> > guchar *buf;
> >
> > maybe the buffer used for the output result.
> >
> >> 
> >> I don't want to expose the GnomePrintJob
> underneath
> >> FoDoc any more than I
> >> wanted to expose the xmlDocPtr under FoXmlDoc,
> but
> >> it's obvious that the
> >> current setup is not useful for your purposes.
> >
> > good strategy to not expose implementation
> expecially
> > for libgnomeprint. so you can change print engine
> > without force to recompile apllication that rely
> on
> > libfo.
> 
> The real point of doing the Cairo backend now was so
> any changes we make to
> the interface for writing output will also work with
> a Cairo backend.
> 
> Cairo is similar to GNOME Print in that the output
> isn't completely written
> until you dereference the object representing the
> Cairo document.

Just start to look cairo src, in particular
cairo-pdf-surface.c (cairo_pdf_surface_create).

for now the solution is to write a tmp file and then
for examples if necessary a php script can read file
and send it within an http response.


it would be interesting to have the pdf object
hierarchy directly for post elaboration, for examples
insert encrypt or/and digital sign or linearize pdf
file.


ciao

Mauro Casciari


	

	
		
___________________________________ 
Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB 
http://mail.yahoo.it


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642