| <<<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 svg | 05:55.52 |
| also | 06:05.09 |
| vector must be preserved as vector | 06:05.19 |
| no rasterization must take place on vector | 06:05.34 |
| rasterized components shall remain rasterized | 06:05.45 |
chrisl | djwraith: gs doesn't support svg output | 06: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 question | 06: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 not | 06:14.53 |
| gs does its own rendering | 06: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 emf | 06:15.35 |
| if you folks are not on direct2d and friends, then almost surely you are on gdi | 06:16.08 |
| which means somewhere in between all the abstraction I can export the gdi drawing commands to an emf | 06:16.37 |
chrisl | No, as I said, gs does it's own rendering | 06:16.38 |
| What you see when gs displays an image on Windows is a raster, created by ghostscript, and blitted to display buffer | 06: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.c | 06:19.35 |
djwraith | so gs already internally rasterized the image before it reaches windows, correct? | 06:19.57 |
chrisl | Yes | 06: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 devices | 06: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 printer | 06:24.52 |
| We may, at some point, look at using GPU acceleration for rendering, but the case hasn't been compelling enough so far | 06:26.44 |
djwraith | got the file here: http://git.ghostscript.com/?p=ghostpdl.git;a=blob;f=devices/vector/gdevxps.c;h=f1034d5975d881436c263bb2f025fe2dbcb11825;hb=HEAD | 06:27.26 |
| 2484 lines... | 06:29.20 |
| probably not that file, chrisl | 06:33.53 |
| that file mostly deals with writing to a zip file | 06:34.10 |
| well some stuffs can be seen towards the end | 06:35.39 |
chrisl | xps *is* a zip file | 06:36.47 |
| For that matter, so is svg..... | 06:37.25 |
djwraith | they are xml files | 06:37.35 |
chrisl | In a zip file | 06:37.44 |
| djwraith: Oh, no, sorry, not svg.... I'm getting mixed up. But xps is bundled up as a zip archive | 06:39.39 |
| djwraith: so, from about line 864 onwards is the code handling the actual page marking | 06: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 description | 06:41.33 |
| Anyway, xpswrite is about the simplest vector device we have | 06: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 needs | 06:46.37 |
| I can feed printer raw bytes of postscript on windows | 06:46.51 |
| so I can feed those ps/eps to a printer directly | 06:47.08 |
| and probably get xps on the other end | 06: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_annot | 09: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 lgtm | 15: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 release | 15:03.58 |
kens | September, like usual | 15:04.05 |
sebras | chrisl: pushed. | 15:04.12 |
chrisl | sebras: cool | 15: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)>>> | |