Log of #ghostscript at irc.freenode.net.

Search:
 <<<Back 1 day (to 2020/12/21)Fwd 1 day (to 2020/12/23) >>>20201222 
tmtm anyone know how to add highlight text inside existing pdf file?02:24.47 
  i try with this script but no luck, idk what's wrong02:25.09 
  To see the 10 largest files in a directory or on a UFS partition, use02:25.21 
  du -h /partition_or_directory_name | sort -rh | head02:25.22 
  -- Dru <genesis@istar.ca>02:25.22 
  tmtm@fbsdboxku:~ $ 02:25.22 
artifexirc-bot <RayJohnston> What do you mean by "highlight" text?02:25.27 
tmtm put background color on text02:25.48 
  [ /Rect [xx yy zz hh] /Subtype /Highlight /Color [1 1 .75] /ANN pdfmark02:27.22 
artifexirc-bot <RayJohnston> oh, that is not possible by simple editing of PDF since text has a transparent background, so you would have to paint a rectangle of the correct size below the text BEFORE the text is drawn02:27.28 
  <RayJohnston> sorry -- I didn't know you were talking about text that is in an Annotation02:28.28 
  <RayJohnston> tmtm: you seem to have pasted some garbage (about how to see the 10 largest files in a directory) to this thread02:29.24 
tmtm sorry, i tried to paste the script from konsole.02:30.02 
artifexirc-bot <RayJohnston> tmtm: I see code is pdf_draw.ps of Ghostscript that has to do with implementing Highlight, so I recommend that if what you have doesn't work, submit a bug https://bugs.ghostscript.com and make sure and attach a sample input file and command line for us to look into.02:36.04 
  <RayJohnston> since we are approaching (into, for some of our staff) the holidays, it may not be "immediate" response 😉 )02:37.17 
  <RayJohnston> tmtm: if you open a bug, make sure it is "Component: PDF Writer"02:41.16 
tmtm RayJohnston sorry, but what do you mean by bug?02:43.23 
artifexirc-bot <RayJohnston> tmtm: sorry. http://bugs.ghostscript.com02:44.05 
  <RayJohnston> we'll have a look, and if it is something that is supposed to work with your file, it's a bug. If it is something we haven't implemented yet, it'll be classified as an enhancement.02:45.35 
tmtm i know, but is it possible to highlight text (annotation) on existing text inside pdf file? and do you think my script are correct?02:49.22 
  btw how to reply with your name on it? 02:50.01 
artifexirc-bot <RayJohnston> tmtm: no idea -- I'm not an expert w.r.t. our pdfwrite device, and even less knowledgeable about pdfmark.02:50.47 
  <RayJohnston> tmtm: hmm... I don't know what you mean by "reply with your name on it"02:51.33 
  <RayJohnston> tmtm: if you mean, how do you make me aware of your reply/comment, you can use @RayJohnston (which beeps me on discord) or just my nick if I happen to be on IRC02:54.20 
ray_laptop tmtm: as I am now (we've switched to mostly using discord, but we have a "bot" to connect back-and-forth between IRC and discord channels02:55.25 
artifexirc-bot <RayJohnston> (we had a L...O...N...G...) internal discussion among the staff -- some liked IRC, some Skype, and some hated the obverse, so we opened the discussion to other chat systems (discord won out over slack and the others -- for now)02:57.57 
  <RayJohnston> but our IRC #ghostscript channel is still around and monitored02:58.38 
ray_laptop tmtm: LMK if you have more questions about submitting a bug.02:59.26 
artifexirc-bot <RayJohnston> heading off for dinner ...03:00.24 
tmtm @RayJohnston ah thanks.04:07.15 
artifexirc-bot <KenSharp> tmtm its very hard to add an annotation to a page of a PDF file using Ghostscript. The annotation pdfmark has to be interpreted during the course of the page rendering **not** after the entire PDF file has been processed. You can use the BeginPage and EndPage PostScript procedures to send a PostScript sequence to a page, but that's about your only recourse. In addition, your pdfmark is missing a QuadPoints array. This is listed as08:56.33 
  <KenSharp> This command adds a green highlight to the bottom of the golfer example file supplied with Ghostscript08:56.54 
  <KenSharp> gs -sDEVICE=pdfwrite -o out.pdf -c "<</EndPage {exch pop 0 eq {[/QuadPoints [10 10 200 10 10 20 200 20] /Rect [10 10 200 20] /C [0 1 0] /Subtype /Highlight /ANN pdfmark true}{false}ifelse}>> setpagedevice" -f \ghostpdl\examples\golfer.eps08:56.55 
  <KenSharp> You can extend the EndPage procedure so that it only acivates on a partiuclar page, or dos different things with different pages.08:57.24 
  <KenSharp> However, Ghostscript is probably not the best tool for this task. It's not really intended for editing PDF files, you would probably be better using something else.08:58.06 
 <<<Back 1 day (to 2020/12/21)Forward 1 day (to 2020/12/23)>>> 
ghostscript.com #mupdf
Search: