Log of #mupdf at irc.freenode.net.

 <<<Back 1 day (to 2021/03/02) 20210303 
artifexirc-bot <Robin_Watts> macwinne_: Urm... cos the two formats do different things.00:22.31 
  <Robin_Watts> a PNG is a lossless bitmap rendering.00:22.40 
  <Robin_Watts> an SVG is a vector rendering.00:22.49 
  <Robin_Watts> More potential quality in the SVG rendering (assuming it's capable of properly encoding all the data in the file losslessly, which in general it is not, but in common cases it is).00:23.33 
  <Robin_Watts> But an SVG renderer is MUCH heavier than a PNG renderer.00:23.51 
  <Robin_Watts> So if you are never going to zoom the PDF in or out, rendering to PNG can be a smarter choice.00:24.20 
macwinne_ Robin_Watts, got it. we do plan on scaling it.. curious about your statement: "assuming it's capable of properly encoding all the data in the file losslessly, which in general it is not, but in common cases it is"00:54.42 
  do you know of an example PDF off hand where the SVG rendering at a given DPI would be worse than PNG?00:55.16 
  i understand elements of the PDF may not be vector..00:55.46 
artifexirc-bot <Robin_Watts> PDF has much richer transparency capabilities than SVG does.00:57.29 
  <Robin_Watts> for example.00:57.46 
  <Robin_Watts> So converting PDF to SVG can lose data.00:58.11 
macwinne_ ahh, thank you for that00:58.45 
  is there a good library of PDFs out there that illuestrate the various hard cases?00:59.09 
artifexirc-bot <Robin_Watts> So if you take a PDF that uses strange blend modes (or shadings or something else) that can't be represented in SVG, then however good your SVG renderer is, it'll look bad.00:59.22 
  <Robin_Watts> Well, the Ghent PDF test suite is a reasonable place to start I guess?00:59.40 
macwinne_ cool, thanks! i'll check that out00:59.52 
  oh, is there a way to know if a PDF contains complicated shading ahead of time?01:00.29 
artifexirc-bot <Robin_Watts> https://www.gwg.org/workflow-tools-downloads/test-suites/ghent-output-suite/01:00.31 
  <Robin_Watts> Not without parsing it completely.01:00.49 
macwinne_ thank you.. really appreciate the guidance01:01.46 
artifexirc-bot <Robin_Watts> no worries.01:02.52 
macwinne_ but given that the whole file is parsed, is there a way to know ahead of time that the rendering will likely be off because we can detect the PDF is using some of these problematic shadings? ie, we don't need to wait for a human to report it01:05.21 
  Robin_Watts, I've done a visual comparison of the Ghent PDF vs the SVG rendered by MuPDF, and they pretty much look the same except for the following swatches: GWG 12.0, 13.0, 16.0,16.1,16.2 16.4 18.0, 18.1, 18.3, 18.2, 18.4, 22.0. 22.1, 23.007:39.21 
  are these known rendering differences? My guess is they probably are, but figured I would just report it if it's helpful.07:39.55 
  actually disregard.. I was looking at app Mac Preview and it seems to be rendering stuff wrong compared to adobe viewer07:53.36 
  so after loading the that Ghent PDF in Adobe, Mac Preview, Mudraw and Chromium, it looks like they are all different :)15:59.58 
  Mudraw SVG and MuDrag PNG i mean.. it does look like Mudraw PNG is closer to Adobe's viewer16:00.34 
ator macwinne_: it also depends on what you use to view the SVG ... since it's a vector format, the renderer used to show it can vary the appearance (unlike PNG which is fixed because ... well, it's a bitmap)18:32.39 
macwinne_ good point.. I was viewing in chrome18:33.13 
  is it the case that with current SVG capabilities, it would be impossible to match the PDF blending requirements? Or is it more a matter of reporting rendering issues and tweaking?18:34.12 
  do you happen to know what rendering engine Mac Preview uses?18:34.51 
artifexirc-bot <KenSharp> Fonts are a problem with SVG too IIRC18:35.05 
  <KenSharp> And the transparency blending is much more complicated in PDF18:35.16 
  <Robin_Watts> The SVG standard is less powerful than the PDF standard in many respects, including blending.18:42.19 
  <Robin_Watts> So there will always be PDF stuff that cannot be mapped naturally down into SVG.18:42.35 
ator it's also limited to what our PDF-to-SVG conversion can accomplish. which is not too much, it falls down when it encounters complicated fonts, patterns, gradients and transparency.18:49.26 
macwinne_ got it.. ok. I'm going to do a large sample of document to see how well it behaves with SVG within our domain. We deal with business documents and presentations, so it may be that they generally don't use these not-so-well supported PDF features20:33.16 
 <<<Back 1 day (to 2021/03/02)  
ghostscript.com #ghostscript