IRC Logs

Log of #ghostscript at irc.freenode.net.

Search:
 <<<Back 1 day (to 2012/11/04)2012/11/05 
mvrhel_laptop Robin_Watts_: For the logs. No. They have not fixed that. But it is basically one key to get from the tile screen to the desktop and there are a pile of keyboard shortcuts to use. I do still find myself occasionally looking for the start button but with looking at a large graphical list on the screen vs. a written list from the start button to find something is not too bad04:50.34 
Robin_Watts_ tkamppeter_: Hey. Are you around ?11:32.06 
emi hello anybody!13:35.53 
Robin_Watts_ hello emi13:36.03 
emi I hope someone can help me...13:36.53 
Chumper HI guys, i am currently deeping into the android sourcecode of mupdf. I want to be able to edit/add annotations to a pdf, therefore i looked into the c source and on stackoverflow.com. http://stackoverflow.com/questions/11396951/editing-a-pdf-with-mupdf I found the pdf_annot.c there are some functions to handle annotaions but are there more functions elsewhere that i am missing? Do i still need to create the objects with the spe13:36.56 
  dictionary?13:37.29 
Robin_Watts_ Chumper: Are you looking at git source or the last release ?13:38.20 
Chumper I am looking at the git source13:38.36 
Robin_Watts_ ok.13:38.47 
emi I'm using gs to convert .PS to PDF and it works very well.... but i need to convert at the same time the VECTORIAL PDF to RASTER PDF. Any idea??13:38.54 
Robin_Watts_ So at the moment, mupdfs public API for handling annotations is pretty much just enough to load them and display them.13:39.49 
emi .PS is obtained by a parametric CAD. I'have some tecnicals drawings13:39.52 
Robin_Watts_ With some extras in there for form handing.13:39.56 
  If you're wanting to manipulate the annotations at the PDF object level (create new ones etc), then you need to do that yourself, by calling the PDF object functions within mudfp.13:40.45 
Chumper Ok, sounds good, so to be able to add annotations it is all on me13:40.46 
  ok, just want to make sure i don't miss anything13:41.02 
  thanks13:41.04 
emi No Robin, i don't need to visualize pdf because i use acrobat reader13:41.05 
Robin_Watts_ Chumper: Let me know how you get on.13:41.20 
Chumper all right :)13:41.32 
Robin_Watts_ emi: Sorry, none of my answers fo far were to you :)13:41.35 
emi in a rasterized pdf when you zoom +++ you cannot see very well all the lines and i like this...13:41.52 
Robin_Watts_ emi: Essentially, if I understand you correctly you want to go from a PDF full of 'move here, draw line to here' etc, to a PDF that's really just a wrapped around a bitmap image ?13:42.35 
kens We don't make that kind of PDF13:43.22 
emi robin: yes, you've understand what I mean!!13:43.36 
Robin_Watts_ kens: We could, if he pretended to have some transparency in there :)13:43.42 
kens Would still have to set compatibility tto 1.313:43.56 
  at default level we just preserve transparency13:44.12 
Robin_Watts_ emi: We go to some lengths to AVOID doing that sort of step, specifically because it loses information.13:44.22 
  The one case where we DO have to drop back to making PDFs with just an image in there is when we think that a) there is transparency in use in the file, and b) we are outputing to a version of PDF that doesn't support transparency.13:45.13 
emi robin: I need to protect their information design!...13:45.43 
  and drawings cannot be measured...13:46.04 
kens I can measure a bitmap easil13:46.18 
  Acrobat even has tools for that13:46.30 
emi kens: but is not very simply, consider to measure 0.05mm or 0.5 degree...13:47.06 
Robin_Watts_ emi: So essentially you're looking at doing this so as to deliberately produce a "degraded" output and somehow preserve the value of the original.13:47.08 
emi robin: YES!!!13:47.24 
  this problem is felt by meny designers and engineers...13:47.59 
kens I don't think so, first time I've heard of it13:48.12 
Robin_Watts_ So, short answer: The existing code will not do this for you, but we could probably make it do so without too much work. But that's the kind of work we wouldn't undertake ourselves, unless it was for a paying customer.13:48.19 
  kens: I think that's a fair statement, right?13:48.37 
kens And we still don't make that kind of PDF unless we have absoluytely no choice13:48.40 
  Robin_Watts_: q it would be quite a lot of work13:48.55 
  IOI would not start form pdfwrite13:49.01 
  Use a raster driver and wrapu up the output in P{DF'ism13:49.30 
Robin_Watts_ Couldn't we have a -dForceBitmap=1 thing that forced the transparency detection to 1 ?13:49.35 
kens HGorrible idea, I wqon'rt hear of it13:49.46 
Robin_Watts_ emi: OK. make that a *highly* paying customer then :)13:50.32 
kens If you want this, start with a raster driver, and go from there, do *NOT* attempt to do this with pdfwrite13:50.38 
  We did dicsuss this for PCL ROPS if you recall, and that was my answer then, I stan dby it13:51.08 
  I reckon that's 3 days to 2 weeks for someone who knows what they are doing13:52.19 
emi i could convert .PS to TIFF and so .TIFF to PDF but I don't like this...13:52.21 
kens Its exactly what you are describing, why do you not like it ?13:52.38 
emi because I've to menage many files and i've to create a batch procedure..13:53.39 
kens Seems to me that this is easily done as a btach prcess13:53.54 
emi but with gs can i convert ps to TIFF?13:56.03 
kens Yes13:56.08 
  many ways13:56.11 
  and many, many options13:56.20 
emi sorry but i'm a semi-beginner...13:58.01 
  there is not a command .bat in GS lib...13:58.36 
kens No, correct.13:58.45 
  You will have to learn to use the GS command line13:58.52 
emi or better.. i don't find it..13:58.57 
  ah!13:59.07 
kens there are numersou tiff devices producing monochrome, grey, RGB or CMYK tiffs, you need to specify the resolution and for some of the tiffs you can specify whether you want nicely anti-aliased output and so on13:59.33 
Robin_Watts_ gswin32c.exe -sDEVICE=tiff32nc -o out.%d.tif -r300 -o input.pdf13:59.34 
  or maybe:13:59.47 
kens 2 -o in there Robin_Watts_14:00.00 
Robin_Watts_ gswin32c.exe -sDEVICE=tiffscaled24 -dDownScaleFactor=3 -o out.%d.tif -r900 input.pdf14:00.20 
  kens: oops, yes. emi: Ignore the second -o in that first line.14:00.32 
emi a moment...14:04.47 
  thanks, I try your solution14:05.35 
Robin_Watts_ The second one will give nicer results.14:05.50 
emi ok14:06.09 
  sorry but imput must be .PS and not .PDF14:09.16 
Robin_Watts_ emi, that's fine, makes no odds.14:10.04 
emi a question14:12.42 
  out.%d.tif maybe for example test.tif or out.testd.tif?14:13.09 
Robin_Watts_ out.%d.tif means put the first page as "out.1.tif", the second as "out.2.tif" etc.14:14.09 
  Obviously you can change that string as you'd prefer.14:14.19 
emi i've only-always 1 page14:14.40 
  ah ok14:14.53 
Robin_Watts_ Then -o whateveryoulike.tif14:14.53 
emi mmm... i've load this command line in DOS and GS starts but not go next...14:21.59 
  OK, it works very welllllll!!!!14:24.31 
  and so.... to reconvert this tiff in pdf?14:25.13 
kens We don't have any way to do that, use ImageMagick14:25.52 
emi uff!!......14:26.55 
chrisl I suspect ImageMagick uses the libtiff tiff2ps tool, and then Ghostscript to go PS to PDF.....14:27.08 
emi but for money, is there anyone who can give me a command .PS (vectorial) to PDF (raster)?14:27.46 
kens POssibly, nobody I know14:28.14 
emi i don't wanto to have to do .ps > .pdf > .tif > .ps > .pdf !!!!!!!14:28.49 
chrisl Almost everybody will do everything possible to *avoid* that kind of result14:28.52 
  ("raster" PDF, that is)14:29.02 
kens we've had that discussion already....14:29.11 
chrisl emi: you don't have to do ps->pdf->tif, you can go ps->tif14:29.37 
kens Yes, he wants a PDF wiht a bitmap in it14:29.48 
  Starting form PS14:30.02 
chrisl Yes, and in the flow above the first step emi lists is ps->pdf14:30.26 
  emi: btw, libtiff comes with a tiff2pdf tool, too14:30.52 
  So, ps->tiff->PDF14:31.03 
emi ok chrisl, you are right14:31.48 
  but i dont'like to use another program command line to convert tiff to pdf...14:32.17 
  other idea?14:32.23 
kens GS won't do it so you will have to use 2 progtams14:32.38 
chrisl ImageMagick will probably "hide" all the steps from you (but still using GS and libtiff), but you'll get less control, and we won't be able to help if/when it goes wrong14:33.34 
emi thanks kens, robin and ghrisl!14:34.06 
kens You're welcome14:34.14 
emi you were very clear!14:34.21 
  now I will work to create the batch procedures necessary14:34.26 
  good job!14:34.42 
Robin_Watts_ tkamppeter_: ping15:19.46 
chrisl Robin_Watts_: You probably want to wait for the "_" postfix to disappear....15:21.46 
henrys now our clocks have changed we are sync'd up again.16:07.09 
paulgardiner Good. So back to 4pm tomorrow for the forms meeting.16:19.48 
henrys yes it is 8:20 now Pacific.16:21.03 
chrisl henrys: oh, on the subject of meetings, I'll very likely have to miss the 9am/5pm IRC meeting tomorrow - I will check the logs, but if anything important comes up for me, if someone could ping me an e-mail.16:25.10 
henrys that's fine - I was going to ask you about freetype, have a real date yet?16:25.52 
  a change like that I'd like to have in as far before the release as possible.16:26.17 
chrisl Well, the thing that's holding me up just now is the artificial boldening, I'm pretty happy with the rest just now16:26.42 
henrys XL, XPS or both?16:27.44 
chrisl XL, Tor did a higher level solution for XPS, so I'm not too worried about that right now16:28.11 
henrys yeah I wonder if Tor's code would work with XL and we could toss the smearing bitmap stuff.16:29.30 
  ?16:29.33 
Robin_Watts_ We do artificial boldening by rendering the glyph and then smearing the image?16:30.18 
chrisl It's certainly a *much* nicer approach than the bitmap smearing, yes. In both cases, though, we lose cacheing16:30.21 
henrys plchar.c:bits_smear_horizontally Robin_Watts_16:31.49 
Robin_Watts_ implemented 'glow' for Picsel by smearing and post processing.16:31.58 
chrisl Robin_Watts_: in XL, yes. In XPS, Tor calculates a stroke width for added "boldness" and fills then strokes the glyph16:32.36 
mvrhel_laptop good morning16:32.50 
henrys hi mvrhel_laptop16:32.59 
Robin_Watts_ Interesting.16:33.00 
  mvrhel_laptop: Morning16:33.04 
  mvrhel_laptop: Can we set some time aside to run through this ETS stuff? (assuming you're free of customer panics etc)16:33.29 
mvrhel_laptop Robin_Watts_: yes that would be fine16:33.49 
Robin_Watts_ When would be good for you?16:33.57 
henrys chrisl:so we don't have a good way to get a bitmap back from freetype?16:34.06 
mvrhel_laptop Robin_Watts_: Do you want to plan on right after the Tuesday meeting?16:34.27 
  That will give me a little time to go over it better16:34.34 
Robin_Watts_ Sounds OK to me.16:34.48 
chrisl henrys: not like the current image smearing code relies on, no16:35.04 
henrys I'd vote for getting the code in with it broken then I'll take it upon myself to play with the line width hack in XL.16:36.32 
chrisl How often is the boldening "feature" used with Truetype fonts?16:37.06 
henrys I have never seen a wild xl file with boldening so it isn't much of a risk.16:37.09 
  I will need to fix it before the release though.16:37.50 
chrisl Do you know, off the top of your head, a simple test file with boldening in it? I'd like to see what the Freetype boldening is like16:39.08 
henrys yeah I'll find it one minute16:39.27 
  pxlfts3.0/T311.BIN panel 0116:42.20 
chrisl Cool, thanks16:42.30 
  henrys: Freetype on left, AFS on right (obviously some fettling required, like not bolding char paths): http://www.ghostscript.com/~chrisl/ft_left-afs_right.png17:10.46 
henrys if there are real files in the wild I imagine using freetype would go unnoticed. Panel 01 won't get passed most of our customers though. That's quite different.17:15.45 
Robin_Watts_ Looks to me like AFS doesn't increase the bbox for the glyph when it boldens it.17:15.58 
henrys right there should be a clip.17:16.33 
Robin_Watts_ whereas freetype does.17:16.34 
henrys the HP output is very similar to ours.17:16.48 
Robin_Watts_ chrisl: Sorry, you said earlier that we couldn't use our existing boldening code, because what we got back from freetype was in the wrong format or something?17:18.03 
chrisl Robin_Watts_: the current code doesn't really get a bitmap from the font world, it gets an outline from the font world, and renders that to a mem device, then retrieves the bitmap from the mem device.17:19.21 
Robin_Watts_ ok, but the boldening code itself is actually just a process that is performed on a 1bpp bitmap, right?17:19.52 
chrisl Yes, my fallback plan is to pull that code into FAPI, and do the smearing en-route from Freetype back into GS17:20.43 
Robin_Watts_ (hmm, badly expressed). Our boldening code can be seen as a process that gets the outline, renders it to a mem device, and then calls a 'boldening core' that takes a bitmap -> a bitmap.17:21.00 
  Right.17:21.00 
  That fallback plan sounds to me like it should give us a much closer match to the old code.17:21.30 
kens Off to sort out dinner, goodnight asll17:21.50 
Robin_Watts_ night kens.17:21.59 
chrisl Bye kens 17:22.01 
  Robin_Watts_: yeh, I had hoped that boldening the outline, rather than the bitmap smearing would get a nicer result, but there's nothing in it,really17:22.39 
Robin_Watts_ What is the downside to that fallback plan? (i.e. why is that a fallback plan, rather than the primary plan)17:22.42 
  chrisl: Right.17:22.49 
chrisl see above ;-)17:22.51 
Robin_Watts_ :)17:22.55 
chrisl The advantage of the bitmap smearing in FAPI approach is that it is scaler agnostic - we're not relying on a feature of the font library17:23.50 
spacebarbarian converting a pdf to jpeg is there a built in way to multithread gs ? 17:56.23 
Robin_Watts_ spacebarbarian: Yes.18:00.00 
  The interpretation can't be multithreaded, but the rendering can be.18:00.17 
  It also depends on the resolution being high enough to not run in page mode, AIUI.18:00.39 
  gs -sDEVICE=jpeg -o out.jpg -dNumRenderingThreads=4 in.pdf18:01.03 
spacebarbarian oh, i meant having different page conversions be assigned different threads, would multi threaded rendering perform better ? 18:03.09 
  im not rendering very high res, final image is just 1280x90018:03.54 
Robin_Watts_ spacebarbarian: No, we don't currently support different page conversions having different threads.18:15.22 
  and indeed such a thing would present problems for our device interface.18:15.49 
spacebarbarian ah ok would you recommend doing the page level multithreading over the rendering flag ? 18:16.25 
Robin_Watts_ spacebarbarian: Well, your choices are "page level multithreading which isn't implemented, and so won't work" or "multi threaded rendering which should work, but may not give you as much speedup as you'd like".18:18.46 
  spacebarbarian: If it was me, and I had many files to process, I'd probably just process them several at a time.18:19.11 
spacebarbarian Robin_Watts_, i meant i would just scrip[t it to do page level 18:19.15 
  thanks for the help ill just time both methods see which does better :)18:21.03 
mvrhel_laptop bbiab18:28.35 
chrisl henrys: at least a first pass (again, FAPI on the left): http://www.ghostscript.com/~chrisl/fapi_with_boldening.png19:44.30 
Gigs- What was the name of the visual diff program I used for regression testing a while back?21:38.14 
Robin_Watts_ bmpcmp ?21:38.40 
Gigs- that was probably it thanks21:39.11 
Robin_Watts_ or cmpi? or compare ?21:39.12 
mvrhel_laptop bbiaw21:40.12 
Gigs- yeah it was bmpcmp thanks21:40.21 
 Forward 1 day (to 2012/11/06)>>> 
ghostscript.com
Search: