Log of #ghostscript at irc.freenode.net.

Search:
 <<<Back 1 day (to 2022/06/08)Fwd 1 day (to 2022/06/10) >>>20220609 
artifexirc-bot <Eslof> Hey ghosts what's up, I'm compressing pdf's and I'd like to do it in-place if possible; but if I specify the same output name as input I end up with a 2kb blank page. Any ideas?16:39.30 
  <chrisl> @Eslof You're overwriting the input file while it's being interpreted, which probably results in a interpreter error, hence the empty output16:46.11 
  <chrisl> And you're not "compressing PDFs", you're creating an entirely new PDF which happens to look similar to the input file16:46.58 
  <Eslof> sure but, semantics no? the processing happens in buffers and memory16:55.46 
  <Eslof> but ok16:56.36 
  <chrisl> @Eslof Enough people don't understand that we find it's worth clarifying.....17:05.56 
  <Eslof> which would be a lovely addition following no 😄 thx tho17:06.27 
  <chrisl> We don't read the entire PDF into memory before interpreting and, due to the architecture, the output file is opened during interpreter initialisation.17:07.16 
  <chrisl> So, chances are what Ghostscript is actually seeing is an empty file17:07.40 
  <Eslof> makes sense, I guess these can get quite large17:08.15 
  <chrisl> Up to about 2Gb17:08.47 
  <chrisl> You're best bet would be a script or batch file that did the conversion, then copied the new file over the old one17:09.31 
  <chrisl> But you should also note that, in some cases, the conversion is not totally lossless, so immediately discarding the old file may not be idea17:10.09 
  <chrisl> But you should also note that, in some cases, the conversion is not totally lossless, so immediately discarding the old file may not be ideal17:10.11 
  <Eslof> I'm shoe horning in gs into this lib we use to generate the pdf's with so source is kinda np, I'll probably end up copying it over just to satisfy the lib ^^17:11.15 
  <Eslof> thanks ❤️17:11.28 
  <chrisl> Make sure you understand the license, too, then17:11.46 
  <chrisl> Again, something enough people overlook, it's worth mentioning, just in case17:16.01 
  <Eslof> It's already in use in the project prior to my involvement but I've made a note to make sure everything's cool17:20.47 
  <Eslof> I'm shoe horning in gs into this lib we use to generate the pdf's with so source is kinda np, I'll probably end up copying it (the file) over just to satisfy the lib ^^19:22.51 
 <<<Back 1 day (to 2022/06/08)Forward 1 day (to 2022/06/10)>>> 
ghostscript.com #mupdf
Search: