From: Mauro C. <inc...@ya...> - 2006-03-09 19:04:30
|
Hi to all, --- Tony Graham <Ton...@Su...> ha scritto: > "Mauro C." <inc...@ya...> writes: > > --- Tony Graham <Ton...@Su...> 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 |