Log of #ghostscript at irc.freenode.net.

 <<<Back 1 day (to 2021/01/18)Fwd 1 day (to 2021/01/20) >>>20210119 
CrystalMath hi all14:42.52 
  is there any way to magnify a PDF with ghostscript?14:43.02 
  so that it just looks at double its size?14:43.07 
  everything neatly scaled in proportion14:43.14 
artifexirc-bot <KenSharp> the scale operator14:47.21 
  <KenSharp> Or FitPage14:47.26 
  <KenSharp> But obviously start by making the media the size you want, set -dFIXEDMEDIA so the PDF doesn't change it, and then set -dFitPage14:47.55 
CrystalMath i just want exactly double of what it is now14:49.29 
  so i probably need the scale operator14:49.35 
artifexirc-bot <KenSharp> scale is harder to use, and you'll still need to set the media size, because if you scale the content without changing the media size then 3/4 of it won't fit on the page14:50.15 
  <KenSharp> You need to change both the Media Size and teh scale of the contents14:50.46 
  <KenSharp> FitPage is the easiest way to do that14:50.53 
CrystalMath hmm, i see14:51.50 
  so i need to first find the current size (because i honestly don't know)14:52.10 
  that's a pretty strange size14:54.46 
  can't i just set the media size to 2x of whatever it is?14:55.31 
artifexirc-bot <KenSharp> Yes, but you have to tell Ghostscript what that is. No you can't just say 'times 2'14:55.59 
  <KenSharp> You can use pdf_info.ps to find the Box values for a PDF14:56.43 
CrystalMath hmm14:56.50 
  it appears that my scale ratio is 4:314:56.57 
  maybe i can just put 640x48014:57.02 
  it's not quite double, but14:57.07 
  it'll do14:57.09 
artifexirc-bot <KenSharp> 640x480 points will be very small14:57.17 
  <KenSharp> well relatively small14:57.26 
CrystalMath well it's 272.126x362.835 now14:57.31 
artifexirc-bot <KenSharp> And those units are what ?14:57.38 
CrystalMath i'm not sure... this is what gv tells me14:57.53 
  it says14:57.57 
artifexirc-bot <KenSharp> Can't help with gv don't kow anything about it.14:58.04 
CrystalMath y272.126x362.83514:58.06 
  how do i get the size?14:58.13 
  with gs?14:58.15 
artifexirc-bot <KenSharp> If you use pdf_info.ps it will give you the values for teh Boxes in points14:58.17 
  <KenSharp> ghostpdl/lib/pdf_info.ps14:58.43 
  <KenSharp> Usage is contained in comments at the head of the file14:58.58 
  <KenSharp> But basically gs -dNODISPLAY -sFile=<input filename> /ghostpdl/lib/pdf_info.ps14:59.27 
chrisl pdf_info.ps isn't in lib/15:00.15 
artifexirc-bot <KenSharp> Err obviously you may have to adjust the path to the PostScript program15:00.22 
CrystalMath Page size: 362.835 x 272.126 pts15:00.25 
artifexirc-bot <KenSharp> chrisl it isn't ? It is in mine15:00.33 
CrystalMath i got that with pdfinfo15:00.34 
artifexirc-bot <KenSharp> OK well that's in points then.15:00.44 
  <KenSharp> A small page15:00.46 
CrystalMath yep, that's the problem15:00.50 
  latex beamer makes small pages15:00.53 
  i want to double it at least15:00.58 
  i tried asking on #latex, apparently there's no way to make it scale up, so i have to scale up the PDF (or PS, DVI, etc...)15:01.32 
artifexirc-bot <KenSharp> So use -dDEVICEWIDTHPOINTS=726-dDEVICEHEIGHTPOINTS=544 -dFIXEDMEDIA -dFitPage15:01.49 
chrisl We moved pdf_info.ps in Dec 2019, so probably most distros haven't got it yet15:02.02 
artifexirc-bot <KenSharp> That sets the media size to (more or less) 2x width and 2xheight, tells GS not to allow the PDF file to change it, and instructs it ti scale the content to fit the media15:02.37 
CrystalMath i'll use 800x600, nicer numbers15:02.39 
artifexirc-bot <KenSharp> Whatever works 🙂15:02.50 
  <KenSharp> @chrisl I should delete the zombie copy I have then.....15:03.01 
  <KenSharp> Where are we keeping it now ?15:03.26 
  <chrisl> @KenSharp We moved it *to* lib - it used to be in toolbin/15:03.34 
  <KenSharp> Umm, so it **is** in lib now ?15:04.12 
artifexirc-bot <KenSharp> is confused15:04.20 
  <chrisl> In git, it is in lib/15:04.57 
  <KenSharp> OK then I'm good. If the distro's haven't caught up I won't care 🙂15:05.13 
sam_ hehe15:08.40 
CrystalMath i use debian so all my stuff is super old15:09.25 
  and i'm switching to slackware, so going even older15:09.34 
  thanks for the help :)15:10.06 
artifexirc-bot <KenSharp> Well, I hope your Ghostscript is new enough to to what I suggested.....15:10.20 
sam_ looks like slack is up to date15:11.36 
chrisl Crumbs, that's a phrase I haven't heard in a long time.....15:11.59 
CrystalMath yes it works15:12.47 
artifexirc-bot <KenSharp> OK well you can play with the sizes to get different scales15:13.01 
  <KenSharp> I think (memory is fallible) that it only scles isomorphically. ie the same in each direction. So whichever amount is the minimum needed to make it fit, that's what it uses for the x and y scale15:13.43 
  <KenSharp> I think (memory is fallible) that it only scales isomorphically. ie the same in each direction. So whichever amount is the minimum needed to make it fit, that's what it uses for the x and y scale15:13.56 
  <KenSharp> I also think it will rotate the content to fit the media if it requires less scaling. Not that it will affect you but for future reference15:14.34 
CrystalMath any way to get gs to edit a pdf file in-place?15:15.16 
chrisl That's not what gs is for15:16.06 
artifexirc-bot <KenSharp> You can't realistically edit a PDF file with Ghostscript15:16.24 
  <KenSharp> You can create a new PDF file with some kinds of changes (eg rescaling) but not editing15:16.50 
CrystalMath no i mean15:16.51 
  i want to apply this scaling, and then overwrite the original15:16.59 
artifexirc-bot <KenSharp> You absolutely can't overwrite the original in one pass.15:17.18 
CrystalMath i guess i'll just need to use a temporary file15:17.26 
artifexirc-bot <KenSharp> Ghostscript will be reading from teh input file while it writes the output file15:17.29 
CrystalMath <rant>i just don't understand why latex just can't scale the output... it's nuts, and why are the only font sizes 10, 14, and 17? are they Donald Knuth's lottery numbers?</rant>15:24.48 
artifexirc-bot <KenSharp> can't help with that either 😄15:25.12 
ray_laptop CrystalMath: BTW, if you like pixels more than points you can use -g800x600 which also locks the media size to that number of pixels wide x high16:23.40 
  (a lot more terse than -r72 -dDEVICEWIDTHPOINTS=800 -dDEVICEHEIGHTPOINTS=600 -dFIXEDMEDIA )16:25.06 
artifexirc-bot <KenSharp> @RayJohnston since you would also have to set the resolution if you use -g, which you **don't** if you use DEVICEHEIGHT and DEVICEWIDTH, and you would actually have to calculate the pixel width, I think that is much less true than you imply when using pdfwrite16:26.13 
CrystalMath huh16:29.01 
  makes it super small16:29.09 
artifexirc-bot <KenSharp> Yes it will16:29.13 
  <KenSharp> Because the default resolution for pdfwrite is 720 dpi16:29.21 
  <KenSharp> So 800x600 is ~1 inch square16:29.36 
  <KenSharp> Hence my point about having to set the resolution as well.16:29.48 
  <KenSharp> I would stick with DEVICEHEIGHTPOINTS and DEVICEWIDTHPOINTS16:30.04 
  <KenSharp> especially since you have the MediaBox in points already16:30.16 
CrystalMath i'm now doing latex to make a .dvi, dvips to make a .ps, and then gs with those parameters to make a .pdf16:31.53 
  works like a charm16:32.20 
 <<<Back 1 day (to 2021/01/18)Forward 1 day (to 2021/01/20)>>> 
ghostscript.com #mupdf