| <<<Back 1 day (to 2019/01/14) | 20190115 |
loke | Hello Ghostscript | 13:06.30 |
| Is this is place to ask questions about it? | 13:06.40 |
ator | loke: yes. | 13:25.12 |
loke | ator: Thanks :-) | 13:25.21 |
| It should be a simple question: | 13:25.46 |
| I have a set of PDF's which I'm converting to PNG. Each PDF is a graph generatef from Gnuplot originally (I think) | 13:26.28 |
| Some of these becomes very small, and what I want to do is to find a way to tell GS to always generate the PNG with a given size (for example, I want to say that they all should be 600 pixels wide). | 13:27.09 |
| Is there a way to do that? The only way I found was to use the -r flag, but that requires manually experimentation to figure out what the correct value is for each document. | 13:27.42 |
ator | loke: have you tried -g<width>x<height>? | 13:28.39 |
| ah, nevermind, that doesn't do what you want | 13:29.56 |
loke | I tried that, and you're right. It doesn't do what I want. | 13:30.22 |
ator | well, you could try mupdf to convert PDF to PNG as well: mutool draw -w <width> -h <height> -o out%d.png input.pdf | 13:31.42 |
| that scales to fit | 13:31.54 |
loke | Never heard of mupdf. :-) | 13:33.04 |
ator | mupdf does what you're asking for, I think to use gs you'll need to script it yourself unfortunately. you can use the 'bbox' device to extract the page dimensions. | 13:34.41 |
| and then use that to compute the correct resolution to get the pixel width you desire | 13:34.54 |
| but of course that will ignore the white margins, so also not what you want. | 13:35.21 |
loke | ator: Thanks for the information. | 14:42.17 |
| I will look at mupdf | 14:42.28 |
| mupdf seemed to solve the problem. Thanks! | 14:58.29 |
norbertj | quit | 15:14.29 |
paulgardiner | ator: please have a look at the commit on my master branch. I need it for muso. I believe it's a step in direction that you've previously suggested. | 15:21.46 |
ator | paulgardiner: can pdf_remove_focus be made static, or do you use it outside of pdf-form.c's pdf_pass_event? | 15:32.45 |
paulgardiner | I do | 15:33.01 |
| Oh hang on! Let me check | 15:33.19 |
ator | otherwise, LGTM | 15:33.29 |
| possibly rename it pdf_clear_focus? | 15:33.49 |
paulgardiner | Ah yes. That's a better name. And it can be static, so I will make that change too. | 15:34.25 |
| Thanks Tor. | 15:35.03 |
| Actually, although I don't use pdf_clear_focus at the moment, I think I probably should be in some cases. I'm getting away without it at the moment only because tapping not within any field is the usual way an editing session ends. | 15:41.27 |
| ... so, can we keep it? | 15:41.42 |
ator | paulgardiner: keep it public? sure. | 15:49.43 |
paulgardiner | Ta | 15:49.54 |
| Forward 1 day (to 2019/01/16)>>> | |