| <<<Back 1 day (to 2017/08/15) | 20170816 |
keizerflipje | hey | 09:57.00 |
ghostbot | Welcome to #ghostscript, the channel for Ghostscript and MuPDF. If you have a question, please ask it, don't ask to ask it. Do be prepared to wait for a reply as devs will check the logs and reply when they come on line. | 09:57.00 |
keizerflipje | recently discovered -dPDFFitPage | 09:58.07 |
| is there a way to scale by percentage as well? | 09:58.43 |
| say I'm scaling a 9x6 document to 11.5x8 | 09:59.17 |
| however a part of the 11.5x8 page will be cropped, so I need larger margins | 09:59.32 |
| so I need a 0.5 margin in addition to the margins already present in the original 9x6 document | 10:00.09 |
| or should I setup a trimbox/cropbox for this? | 10:04.26 |
chrisl | There's a more general -dFitPage now, IIRC | 10:34.40 |
| But no, there isn't a way to scale by a percentage | 10:35.11 |
| keizerflipje: ^^ | 10:35.23 |
| If your PDF has one, you might be able to use -dUseCropBox to fit the page to the CropBox rather than the MediaBox | 10:39.19 |
| (IIRC, CropBox is optional, hence the caveat) | 10:39.41 |
keizerflipje | chrisl: my source pdf probably doesn't have a cropbox | 11:37.44 |
| there also no way to define an adding margin? | 11:38.31 |
| something like -dMargin=0.5in -dFitPage | 11:38.49 |
chrisl | keizerflipje: Not with the way the PDF interpreter currently works | 11:52.22 |
keizerflipje | ok | 11:58.38 |
| thanks! | 11:58.53 |
chrisl | keizerflipje: It is feasible, but more complicated to do it using some Postscript stuff: see https://ma.juii.net/blog/scale-page-content-of-pdf-files | 11:59.22 |
keizerflipje | ah I'll look into that | 11:59.52 |
| btw, another thing | 11:59.58 |
| when I processed my source PDF with ghostscript my output is quite a bit larger | 12:00.15 |
| as in 70kb -> 120kb | 12:00.38 |
kens | shrugs | 12:00.47 |
keizerflipje | does -dFastWebView add so much overview | 12:00.54 |
chrisl | That's not unheard of | 12:00.57 |
keizerflipje | overhead* | 12:00.57 |
kens | yes | 12:01.00 |
| Or at least, potentially | 12:01.07 |
| Its a waste of time, don't use it | 12:01.12 |
keizerflipje | is there a way to visualize how much of a PDF is dedicated to what? | 12:01.18 |
kens | Not easily no | 12:01.25 |
keizerflipje | kens: why? because only acrobat reader supports it? | 12:01.41 |
kens | Even acrobat reader doesn't support it properly | 12:01.53 |
keizerflipje | oh? | 12:01.58 |
kens | hardly any consumer does | 12:02.01 |
keizerflipje | so it's mostly pointless overhead? | 12:02.12 |
kens | Its essentially pointless, and you can't use it with later versions of PDF anyway | 12:02.16 |
keizerflipje | oh it was removed from the spec? | 12:02.28 |
kens | No, but its not compatible with some features of later versions | 12:02.44 |
| TBH I wish they had removed it in 2.0 | 12:02.53 |
| Actually, I suppose I should check and see if they did :-) | 12:03.07 |
| Nope, still there in Annexe F | 12:03.32 |
| :-( | 12:03.36 |
keizerflipje | btw even without FastWebView my PDF increases in size, any clue why that would happen? | 12:05.37 |
| in general? | 12:05.40 |
kens | Could be many reasons | 12:05.49 |
keizerflipje | my source pdf was generated my XeLaTeX | 12:05.58 |
| by* | 12:06.01 |
kens | extra white space, different compression filters on images, extra boilerplate.... | 12:06.09 |
keizerflipje | it only has two OpenType fonts in it | 12:06.12 |
| no images | 12:06.14 |
kens | Without seeing the two files I can't comment | 12:06.39 |
keizerflipje | I might be able to upload a few samples tomorrow | 12:07.26 |
| it's not a huge problem though, i'm just very curious | 12:07.39 |
kens | Like I said, its not really possible to tell. | 12:07.51 |
| When it comes to boilerplate we add stuff that isn't strictly required by the earlier specs | 12:08.13 |
jtth | @chrisl & @kens: I fully assume nothing has been done and I've moved onto another tool but, I figured to check back and see if any progress has been made with UWP apps compatibility | 15:55.45 |
kens | Nope, its not an area we have any real interest in currently | 15:56.29 |
| We do believe that you can build GS into a UWP application, but that's not the same as a HoloLens I suspect | 15:56.52 |
chrisl | jtth: I haven't had time to fix the build problems with post VS2012 versions, but I wasn't aware of any other issues with a gs library and a UWP app | 15:59.59 |
jtth | Link: https://www.codeproject.com/Articles/32274/How-To-Convert-PDF-to-Image-Using-Ghostscript-API?fid=1533292 | 16:10.06 |
| This solution implements GhostScript in its PDFConvert C# script. However even with the gsdll32metro build, which I greatly thank you for, I wasn't able to get it working on the Hololens | 16:10.34 |
| The Hololens can't write files to memory outside of its sandbox. I was hoping there was a solution which used GhostScript but instead of writing to storage, wrote to memory | 16:11.40 |
| Again, no expectations, just checking if something like that came about. | 16:11.57 |
| Note: ghostscript.net doesnt work on Hololens from what I could tell | 16:12.11 |
chrisl | jtth: the solution, in your case, is to use the display device | 16:18.01 |
jtth | Theoretically I fully understand that, but implementing, I do not. | 16:18.53 |
| Forward 1 day (to 2017/08/17)>>> | |