Log of #ghostscript at irc.freenode.net.

Search:
 <<<Back 1 day (to 2017/06/20)20170621 
djwraith how does one convert with gs from eps / ps / pdf to emf / emf+ (windows enhanced metafile)?05:55.44 
  or rather to svg05:55.52 
  also06:05.09 
  vector must be preserved as vector06:05.19 
  no rasterization must take place on vector06:05.34 
  rasterized components shall remain rasterized06:05.45 
chrisl djwraith: gs doesn't support svg output06:09.47 
djwraith chrisl: what of emf though? also can gs render pdf / ps / eps to a gdi device so that I can export the content of that device to emf?06:10.57 
chrisl djwraith: no, not emf, either. We don't render to a gdi device.06:12.19 
djwraith what type of device does gs render to then on windows?06:12.45 
chrisl I don't really understand the question06:14.03 
djwraith well, you just told me gs rendering a pdf on windows doesn't depend on gdi, am I correct?06:14.43 
chrisl It does not06:14.53 
  gs does its own rendering06:15.28 
djwraith then, I need the name of the object / class to which the pdf is rendered to so that I can check the method for exporting emf06:15.35 
  if you folks are not on direct2d and friends, then almost surely you are on gdi06:16.08 
  which means somewhere in between all the abstraction I can export the gdi drawing commands to an emf06:16.37 
chrisl No, as I said, gs does it's own rendering06:16.38 
  What you see when gs displays an image on Windows is a raster, created by ghostscript, and blitted to display buffer06:17.31 
  If you are contemplating writing an emf output module, then the place to start is probably our xps output code, which is in: ghostpdl/devices/vector/gdevxps.c06:19.35 
djwraith so gs already internally rasterized the image before it reaches windows, correct?06:19.57 
chrisl Yes06:20.02 
djwraith all right. I shall take a look at the xps code then.06:20.44 
chrisl Now, also have a class of "device" called vector "vector devices" which do not (or try not) to rasterize the content. xpswrite is one of those devices06:21.21 
djwraith from the perspective of design, shouldn't you folks relegate rasterizing to windows instead?06:22.42 
  (wherever it makes sense)06:24.24 
chrisl Well, a) the Windows imaging model doesn't match Postscript/PDF. And b) How that work on Linux/Solaris/OpenBSD or some weird-ass embedded system inside a printer06:24.52 
  We may, at some point, look at using GPU acceleration for rendering, but the case hasn't been compelling enough so far06:26.44 
djwraith got the file here: http://git.ghostscript.com/?p=ghostpdl.git;a=blob;f=devices/vector/gdevxps.c;h=f1034d5975d881436c263bb2f025fe2dbcb11825;hb=HEAD06:27.26 
  2484 lines...06:29.20 
  probably not that file, chrisl06:33.53 
  that file mostly deals with writing to a zip file06:34.10 
  well some stuffs can be seen towards the end06:35.39 
chrisl xps *is* a zip file06:36.47 
  For that matter, so is svg.....06:37.25 
djwraith they are xml files06:37.35 
chrisl In a zip file06:37.44 
  djwraith: Oh, no, sorry, not svg.... I'm getting mixed up. But xps is bundled up as a zip archive06:39.39 
  djwraith: so, from about line 864 onwards is the code handling the actual page marking06:40.24 
djwraith it's ok.and right, which is "towards the end"06:40.43 
chrisl "Less than halfway through" would be a better description06:41.33 
  Anyway, xpswrite is about the simplest vector device we have06:42.23 
djwraith yeah, the real monsters are pdt[a-z]06:43.10 
  and I just came up with another plan for my conversion needs06:46.37 
  I can feed printer raw bytes of postscript on windows06:46.51 
  so I can feed those ps/eps to a printer directly06:47.08 
  and probably get xps on the other end06:47.21 
Franck-isk Hello everyone,09:00.16 
  Can anyone help me with mupdf file attachments? I know how to create an annotation of type attachment but I don't know how to attach a file actually.09:02.08 
Robin_Watts Hello Franck-isk 09:02.11 
  Franck-isk: You will need to be doing some work at the PDF level for that, I think.09:03.35 
  You presumably have an fz_document pointer.09:04.47 
  You'll need to call pdf_specifics to get a pdf_document pointer.09:05.00 
  Then you can call pdf_trailer(ctx, doc) to get the trailer object.09:05.33 
  Then you can navigate through the structure of the file to find your annotation.09:05.54 
  Then you can add the required FS entry to that.09:06.07 
  If that's sounding scarier than you'd like, sorry.09:06.27 
Franck-isk I have no annotation, but I'll create a new one with pdf_create_annot09:07.12 
Robin_Watts Morning tor8.09:07.30 
Franck-isk So I understand that I have to add a FS entry to my annotation, is that correct? What king of object does it need?09:10.11 
tor8 Robin_Watts: morning. which channel should we use today?09:10.22 
Robin_Watts tor8: Morning. Let's use #mupdf unless it gets too noisy.09:10.37 
  Franck-isk: You need to check the pdf reference manual.09:10.49 
  I can give general direction, but I don't have time to explain everything in detail - sorry!09:11.12 
chrisl sebras: You're gpcl6 commit lgtm15:02.25 
sebras chrisl: thanks! :)15:03.09 
chrisl TBH, I didn't even know we had those scripts!15:03.38 
miqlas chrisl: how doin? when can we expect a nerelease?15:03.53 
  *new release15:03.58 
kens September, like usual15:04.05 
sebras chrisl: pushed.15:04.12 
chrisl sebras: cool15:04.22 
miqlas ok, i can surely have a bit time to update the gs port. i'm on blender right now.15:04.47 
 Forward 1 day (to 2017/06/22)>>> 
ghostscript.com #mupdf
Search: