The new export-to-PDF renders things on a PDF cairo surface, which I imagine is more or less the same as using File -> Print -> Print to File -> PDF with the main difference that we create the cairo context ourselves and set the page sizes to match ours, rather than letting gtkprint set up the cairo context and use the page sizes set in the virtual printer.
So, basically, we create a cairo PDF surface, and then ask poppler to render the appropriate page of the existing PDF file to that cairo surface (and then add the annotations on top). I am not aware of any resolution parameters that we could set in there. Well, actually, there is one: cairo_surface_set_fallback_resolution () (see the documentation of cairo_surface_t) but I don't see why it would matter since it's only for falling back to rendering to a bitmap and putting that bitmap in the PDF when cairo is asked to do something it can't directly do into a PDF, and presumably whatever poppler tries to do to show the scanned image is just read the PDF-embedded image and draw another embedded image into the other PDF, which shouldn't require any fallback. Besides, the fallback resolution is apparently 300 dpi by default according to the cairo docs, so that should be plenty. Does export also drop the resolution of other bitmaps -- either those inserted by the user into xournal (if so it means the cairo surface we're writing to silently compresses bitmaps without asking us -- xournal wouldn't change the resolution), or bitmaps contained in the PDF file that we're annotating? Anyway: I've seen this happen as well, on PDFs where I thought the background was actual vector stuff and not bitmap, but I didn't double-check. It's definitely annoying and worth investigating. In principle poppler is used both to render the PDF on-screen for xournal and to export it to the new PDF, so if it can do one well it should also be able to do the other well. Denis On 06/17/2015 04:09 PM, D M German wrote: > > Hi Denis, > > One question about the new exporter. > > I have PDFs that each page is a scan (images). When I use export to PDF > it drops the resolution significantly. If use the old exporter, things > look ok. > > Is this based on some variable that controls the resolution of the > background PDF? > > > thanks! > > > -- > Daniel M. German "My friends would think I was a nut, > turning water into wine, > Solsbury Hill, Peter Gabriel -> opening doors that seem to be shut." > http://turingmachine.org/ > http://silvernegative.com/ > dmg (at) uvic (dot) ca > replace (at) with @ and (dot) with . > > > > ------------------------------------------------------------------------------ > _______________________________________________ > Xournal-devel mailing list > Xournal-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/xournal-devel > -- Denis Auroux UC Berkeley, Department of Mathematics 817 Evans Hall, Berkeley CA 94720-3840, USA aur...@math.berkeley.edu ------------------------------------------------------------------------------ _______________________________________________ Xournal-devel mailing list Xournal-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xournal-devel