Log of #ghostscript at irc.freenode.net.

Search:
 <<<Back 1 day (to 2022/08/03)Fwd 1 day (to 2022/08/05) >>>20220804 
artifexirc-bot <Melkiawa> Hello, I am totally new to this. Been trying to convert pdf files output from TexWorks (windows) to PNG, using imagemagick. Had to install GS 9.56.1 I believe, the latest anyway.09:33.36 
  <Melkiawa> 09:33.37 
  <Melkiawa> Now, running the script on Tex returns me a mismatch error (interpreter revision 9561 versus gs_init.ps revision 9533). 09:33.39 
  <Melkiawa> 09:33.40 
  <Melkiawa> How to fix this? I googled a bit but can't seem to do this on my own09:33.41 
  <Robin_Watts> That suggests that something has gone wrong with your install.09:34.43 
  <Robin_Watts> gs is starting up, and finding an older version of the gs_init.ps file than it's expecting.09:35.01 
  <Robin_Watts> Probably TexWorks is invoking gs, and saying "look here for the init files", which are the old version.09:35.28 
  <Melkiawa> Huh... Should I rerun the installer? I used the exe downloaded from the website09:35.45 
  <Melkiawa> How could I check for conflicting/older versions ?09:36.01 
  <Robin_Watts> I think it's more likely to be something specific to TeXworks.09:36.09 
  <Melkiawa> Oh09:36.18 
  <Robin_Watts> Try the following: `gswin64c.exe -o out%d.png -sDEVICE=png16m -r600 -dDownScaleFactor=3 input.pdf`09:37.17 
  <Melkiawa> On windows shell I assume09:37.31 
  <Robin_Watts> That'll call gs directly without any funny business due to TeXWorks.09:37.40 
  <Melkiawa> Ok so I should run this from prompt being in the directory where my pdf is located09:38.38 
  <Robin_Watts> Yeah, you'll need to adjust paths etc.09:39.39 
  <Melkiawa> Dang, you did it09:40.43 
  <Melkiawa> Thanks a lot pal09:40.50 
  <Melkiawa> Also may I know what are those specifications you provided? In case I need to tinker them at a later stage. I assume the 600 is some sort of DPI? What's PNG16m? And what about the downscalefactor?09:42.04 
  <KenSharp> -r = resolution, -o = output file, -sDEVICE selects the output device. -dDownScaleFactor is the scaling (3 means downscale by 3 so for a 600 dpi ersolution the final resolution is 200 dpi)09:50.33 
  <KenSharp> I'm fairly sure @Robin_Watts is correct about the init files. It is possible to use -I to specify a location for the init files (on Windows they are actually built into the executable, but you can tell it to look on disk instead). Which suggests TexWorks is supplying our init files, and those are versioned, so if you try to use the wrong executable it will throw an error.09:52.10 
  <Melkiawa> I think I am understanding that TexWorks has its own init file for ghostscript?09:53.09 
  <Melkiawa> And that it's overcoming the true one?09:53.22 
  <KenSharp> It 'sounds' like it, but I can't be certain without installing it and looking09:53.25 
  <Melkiawa> Yes, of course. And is there a place where I can check what init file is TW using? I checked it's linked programs and it correctly points to GS 9.56.1 bin09:54.19 
  <KenSharp> Certainly there's no normal way to get that erro on a Windows build of Ghostscript, because the init files are packed into the executable. So the only way to get the error is to tell the executable to use a different set of initialisation files.09:54.25 
  <KenSharp> Err, no idea, its not an application I know anything about.....09:54.44 
  <Melkiawa> No problems, thanks for the insights!09:55.02 
  <KenSharp> You could do a search for gs_init.ps in the installation perhaps09:55.04 
  <Melkiawa> Dang it09:56.19 
  <Melkiawa> You nailed it09:56.22 
  <Melkiawa> I found the file in the TexWorks folder09:56.35 
  <Melkiawa> And it has the 9533 version in it09:56.53 
  <KenSharp> OK so it's using a file that's only going to be compatible with a specific version of Ghostscript then (in this case 9.53.3). That's not really ideal.09:57.16 
  <Melkiawa> Should I modify that to 9561 with admin rights? Would I crash something?09:57.18 
  <Melkiawa> https://cdn.discordapp.com/attachments/773567375458828329/1004689713199841380/rn_image_picker_lib_temp_55903907-5b4e-4d42-8bc4-602a15fe3272.jpg09:58.14 
  <KenSharp> Well the trouble is we modify that file (and the others if it has them) to fix stuff. They need to change in sync with the executable, that's why they are versioned. If you try using an older version of the init files then you might get crashes. wrong output or introduce old bugs that had already been fixed.09:58.18 
  <KenSharp> And yeah, that's the 9.53.3 version code09:58.42 
  <Melkiawa> Ooh I didn't need admin rights09:59.02 
  <Melkiawa> Let's see if this fixes my code09:59.11 
  <KenSharp> What to modify the file ? No reason why you would I don't think09:59.20 
  <Melkiawa> I do need admin rights to modify the one found in GS install folder10:00.11 
  <Melkiawa> Thought it'd be the same for the one in TexWorks10:00.24 
  <KenSharp> Oh yes, that's because it's in Program Files though, that's a Windows thing10:00.26 
  <Melkiawa> Anyway it got the issue worse, not fixed 🙂 will restore it to 9533 and try updating the embedded GS10:00.55 
  <KenSharp> You could just copy the files from teh Windows installation to TexWorks. The problem with that is, I've no idea if they've modified them. I can't think of any reason to use them otherwise though.10:01.00 
  <Melkiawa> Oh10:01.17 
  <Melkiawa> I get what you say10:01.21 
  <Melkiawa> Lemme try10:01.24 
  <Melkiawa> Fixed it! 10:12.41 
  <Melkiawa> By trying to find where the folder to replace was, I noticed it was called tlgs, not just gs.10:12.41 
  <Melkiawa> 10:12.43 
  <Melkiawa> I was then able to locate the same dependency specified within TexWorks. Removing that dependency alone didn't work. However, removing the tlgs folder from texlive left my installation of gs the only one available and solved the issue10:12.44 
  <KenSharp> Well that sounds good, glad you got it working10:13.20 
  <Melkiawa> Thanks a lot, really10:14.07 
  <KenSharp> Absolutely No problem10:14.18 
  <Melkiawa> Computers are such a deep world, one never knows all he needs10:14.31 
 <<<Back 1 day (to 2022/08/03)Forward 1 day (to 2022/08/05)>>> 
ghostscript.com #mupdf
Search: