GNOME Bugzilla – Bug 429627
Evince pspdf backend
Last modified: 2014-05-05 17:50:45 UTC
Please describe the problem: This is a proposed PostScript backend for Evince, that achieve PostScript document display by converting the document into pdf and then using Poppler to achieve the actual drawing. Some cleaning may be needed, and the selection of the appropriate backend is done using --with-postscript=no/ps/pspdf in ./configure Steps to reproduce: Actual results: Expected results: Does this happen every time? Other information:
Created attachment 86334 [details] pspdf backend
I think we can avoid copy and paste code from pdf backend. We can just use the backend or, as you propose, inherit from PdfDocument.
Confirm request, so we are waiting for the patch update
Created attachment 236430 [details] [review] Evince pspdf backend I am just re-attaching the patch, this time as patch. To keep it track easily.
I wonder what would be the best approach for this? PdfDocument is local to backends/pdf/libpdfdocument and IIUC it would be necessary to load one backend from another one.
Created attachment 245301 [details] [review] Updated patch This is an updated patch against master, which tries to avoid duplicated code. It has plenty of missing things, it is very hacky just to compile it and then to discuss how to proceed. I tried to inherit from PDFDocument. However, this approach has issues because apparently they were not made to be subclassed. For instance: * Backends API is private, AFAIU. * The libraries at runtime only see themselves, but not other backends. So, before I go any further: what would you suggest to proceed from the architectural point of view? (that is, forget the style, the trailing spaces, commented code for the moment) Is it worth to continue this backend in spite of libspectre?
Closing after a char on IRC: <gpoo> KaL, jaliste: if libspectre already calls ghostsctipt to export to pdf, why don't we ask libspectre to give a pdf? <gpoo> and render the pdf with poppler <KaL> to avoid rendering twice? <gpoo> it would be only twice to convert the document <KaL> you might lose someting in the pdf conversion too, or change the fonts, or whatever, I don't know <gpoo> it is possible, but ps has a lot of limitations <gpoo> same as dvi <KaL> gpoo: yes, people are free to convert their ps/dvi to pdf <gpoo> shall we close https://bugzilla.gnome.org/show_bug.cgi?id=429627 as wonfix, then? <Services> Bug 429627: normal, Normal, ---, evince-maint, NEW, Evince pspdf backend <KaL> I think so, that should be converted by the user IMO <gpoo> fair enough