Log of #ghostscript at irc.freenode.net.

Search:
 <<<Back 1 day (to 2022/04/18)Fwd 1 day (to 2022/04/20) >>>20220419 
artifexirc-bot <moosiey> Hey guys I was hoping someone could help me out with the pdfwrite device05:57.45 
  <moosiey> My PDF is going from 258KB to 21KB05:58.10 
  <moosiey> the pdf is just an image essentially05:58.41 
  <moosiey> and its clearly losing quality/getting compressed05:58.49 
  <moosiey> ive tried `-dDownsampleColorImages=false` and `-dColorImageResolution=100`05:59.13 
  <moosiey> `-dPDFSETTINGS=/prepress` brings it up a bit to around 50KB06:02.10 
  <moosiey> ok I just saw this ```Please be aware that the /prepress setting does not indicate the highest quality conversion. Using any of these presets will involve altering the input, and as such may result in a PDF of poorer quality (compared to the input) than simply using the defaults. The 'best' quality (where best means closest to the original input) is obtained by not setting this parameter at all (or by using /default).```06:10.31 
  <Peterotul> Thanks!09:18.18 
  <Peterotul> Another question here hehe09:18.31 
  <Peterotul> I would like to know what pages are not BW in a pdf. I have found it can be done like this with a UNIX console: gs -o - -sDEVICE=inkcov input.pdf | grep -v "^ 0.00000 0.00000 0.00000" | grep "^ " | wc -l09:19.12 
  <Peterotul> How could I do this in Windows?09:19.21 
  <KenSharp> The same way09:19.30 
  <Peterotul> Excuse my ignorance here, how exactly should i do it?09:19.51 
  <KenSharp> Assuming you have a copy of grep, the same way. Or you can use WSL09:20.22 
  <Peterotul> I have installed gs and what I was trying is opening a command prompt and cd-ing to the path where gs is installed09:20.28 
  <Peterotul> then executing that line09:20.41 
  <KenSharp> Did you list the diectory contents first ?09:21.02 
  <KenSharp> Or look at the directory with a file browser ?09:21.20 
  <Peterotul> I searched where GS is installed using the file explorer09:21.45 
  <Peterotul> then took that direction and cd-ed into it with the CMD09:22.01 
  <KenSharp> Right, and then used the command line above ?09:22.15 
  <Peterotul> correct09:22.22 
  <KenSharp> So if you look in the directory, what do you see in there ? Do you see a gs.exe ?09:22.39 
  <Peterotul> https://cdn.discordapp.com/attachments/773567375458828329/965905373670309908/unknown.png09:23.06 
  <Peterotul> sorry for the spanish09:23.11 
  <KenSharp> So there you are then, there's your problem.09:23.23 
  <KenSharp> The Windows Ghostscript executable is not called 'gs'09:23.45 
  <Peterotul> oh09:23.50 
  <KenSharp> You can either use gswin64 (opens a window) or gswin64c (uses the command shell)09:24.18 
  <Peterotul> exactly09:24.25 
  <Peterotul> but if i double click on gswin64 and execute the above code09:24.40 
  <Peterotul> it does not work09:24.43 
  <KenSharp> <sigh> Don't double-clikc it09:25.05 
  <KenSharp> If you do that on Windows, like pretty much any other GUI, it launches the application without parameters.09:25.31 
  <KenSharp> If you want to add command line parameters then you need to run it from the command shell09:25.45 
  <KenSharp> So in your command line, replace 'gs' with 'gswin64c'09:26.00 
  <Peterotul> but before that i should cd into the path where gswin64c.exe is installed right?09:26.34 
  <KenSharp> If you want to run it from somewhere other than the installation directory you will either need to specify the complete path to the executable (and the path contains spaces so you will need to encloe it in "") or you can add the path to the $PATH environment variable09:27.40 
  <KenSharp> If you want to run it from somewhere other than the installation directory you will either need to specify the complete path to the executable (and the path contains spaces so you will need to enclose it in "") or you can add the path to the $PATH environment variable09:27.56 
  <Peterotul> right09:28.06 
  <Peterotul> https://cdn.discordapp.com/attachments/773567375458828329/965906850291785738/unknown.png09:28.59 
  <Peterotul> okay i believe i should install something grep related09:29.13 
  <Peterotul> hehe09:29.16 
  <KenSharp> Then you don't have a grep installed on youw Windows computer09:29.19 
  <Peterotul> yep yep yep09:29.26 
  <KenSharp> GNU grep can be built for Windows, there are other implementations09:29.37 
  <KenSharp> You'll need wc as well if you want to use that09:30.20 
  <Peterotul> jesus09:30.32 
  <Peterotul> okay09:30.34 
  <KenSharp> Or just use WSL09:30.41 
  <Peterotul> okay installing wsl09:31.33 
  <Peterotul> then i could just open a UNIX console09:31.43 
  <Peterotul> and execute the code exactly as i pasted it right?09:31.54 
  <KenSharp> Should be able to do so yes09:31.56 
  <KenSharp> Personally I just use either Windows or Linux but my colleagues tell me it works well09:32.16 
  <Peterotul> how do you really use this on a frequently basis?09:32.34 
  <Peterotul> jajajaja09:32.36 
  <Peterotul> not that i'm not glad you do it09:32.41 
  <Peterotul> but god this is a rare thing to use for me09:32.59 
  <KenSharp> As I say I either use Windows **or** Linux, I don't try and script in one using the other's language and utilities 🙂09:33.22 
  <Peterotul> will be back in a sec i have to reboot09:33.26 
  <KenSharp> I'm heading out for a run anyway so will be AFK for 60 minutes or so. Someone else may be able to help09:33.49 
  <Peterotul> oh okay09:36.06 
  <Peterotul> thank you very much for your help!09:36.13 
  <RayJohnston> I use WSL, but also when I want to use Windoze programs, I use git-bash (when you install git for windows, it comes with a bash shell and most unix utilities like grep, awk, ... so you can run most unix scripts but invoke windows programs as well.15:04.23 
 <<<Back 1 day (to 2022/04/18)Forward 1 day (to 2022/04/20)>>> 
ghostscript.com #mupdf
Search: