Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Ghostscript not providing bbox info
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
Gipetto
n00b
n00b


Joined: 22 Aug 2004
Posts: 12

PostPosted: Wed Jan 11, 2006 4:31 pm    Post subject: Ghostscript not providing bbox info Reply with quote

I'm trying to grab the bbox info from an EPS file with
Code:
gs -dBATCH -dSAFER -sDEVICE=bbox file.eps

but nothing returns. I get the standard output that GS starts up just fine, and if I were do to a PDF conversion it works fine, but I can't get the bbox info.

Anyone have any insight into this? I've been searching high and low and can't find anything.

I have -pdflib in my make.conf - does Ghostscript by chance rely on this for bbox info? I don't see how it could.

Thanks.
Back to top
View user's profile Send private message
DayLung
Tux's lil' helper
Tux's lil' helper


Joined: 13 Mar 2003
Posts: 80

PostPosted: Wed Jan 11, 2006 7:32 pm    Post subject: Reply with quote

does
Code:
#grep BoundingBox file.ps
work?
Back to top
View user's profile Send private message
Gipetto
n00b
n00b


Joined: 22 Aug 2004
Posts: 12

PostPosted: Wed Jan 11, 2006 7:52 pm    Post subject: Reply with quote

That returns
Code:
Binary file file.eps matches


Sorry, I'm not all too familiar with grep and what it should return in that situation.

For reference I'm moving my script from an OS X laptop to the Gentoo box for further dev as it more closely matches my production machine. The script works fine with the same files on the OS X box and command line testing on the production box shows that it works with the same test file.
Back to top
View user's profile Send private message
DayLung
Tux's lil' helper
Tux's lil' helper


Joined: 13 Mar 2003
Posts: 80

PostPosted: Wed Jan 11, 2006 8:01 pm    Post subject: Reply with quote

have you tried bbfig?
Back to top
View user's profile Send private message
DayLung
Tux's lil' helper
Tux's lil' helper


Joined: 13 Mar 2003
Posts: 80

PostPosted: Wed Jan 11, 2006 8:08 pm    Post subject: Reply with quote

you might also try
Code:
grep --binary-files=text BoundingBox file.eps


all eps files should begin with a few lines of text like this
Code:
%!PS-Adobe-3.0 EPSF-3.0
%%Creator: dvips(k) 5.86 Copyright 1999 Radical Eye Software
%%Title: tree.dvi
%%Pages: 1
%%PageOrder: Ascend
%%BoundingBox: 102 92 530 710
%%EndComments
%DVIPSWebPage: (www.radicaleye.com)
%DVIPSCommandLine: dvips tree
%DVIPSParameters: dpi=600, compressed
%DVIPSSource: TeX output 2002.11.22:1213
%%BeginProcSet: texc.pro
%!


so using grep to print the line "BoundingBox" is found on should work, and --binary-files=text forces grep to look through the file as though it were text and might fix the "Binary file file.eps matches" message
Back to top
View user's profile Send private message
Gipetto
n00b
n00b


Joined: 22 Aug 2004
Posts: 12

PostPosted: Wed Jan 11, 2006 8:21 pm    Post subject: Reply with quote

Your updated grep worked - the BBox lines were shown just fine.

This is one out of 3 boxes I can have GS on and its the only one that doesn't do bbox.


I compiled GS with support for x11, cups and gtk; without support for cjk or emacs.
Back to top
View user's profile Send private message
Gipetto
n00b
n00b


Joined: 22 Aug 2004
Posts: 12

PostPosted: Wed Jan 11, 2006 8:24 pm    Post subject: Reply with quote

DayLung wrote:
have you tried bbfig?


That's a reference to a 3rd party script, right? Nothing that is in the portage tree?
Back to top
View user's profile Send private message
DayLung
Tux's lil' helper
Tux's lil' helper


Joined: 13 Mar 2003
Posts: 80

PostPosted: Wed Jan 11, 2006 8:42 pm    Post subject: Reply with quote

Gipetto wrote:
DayLung wrote:
have you tried bbfig?


That's a reference to a 3rd party script, right? Nothing that is in the portage tree?


that's right, it's used mostly with tex, if your interested it can be found here, though I've never really used it much.
Back to top
View user's profile Send private message
Gipetto
n00b
n00b


Joined: 22 Aug 2004
Posts: 12

PostPosted: Wed Jan 11, 2006 8:43 pm    Post subject: Reply with quote

I'll check it out but would really just like GS to work correctly... sometimes I think I'm asking too much.

But, now that I think of it, the functionality of GS providing the BBox lines is exactly the same as the grep you gave me... and its faster than GS to boot. I could just use that. I really don't anticipate any EPS files not having BBox entries as everything will be coming from graphic designers running Illustrator or Freehand or exporting from a layout program - so everything should have a bbox.
Back to top
View user's profile Send private message
Gipetto
n00b
n00b


Joined: 22 Aug 2004
Posts: 12

PostPosted: Wed Jan 11, 2006 9:15 pm    Post subject: Reply with quote

Now I find that -dEPSCrop isn't working either. Is there some special config of Ghostscript that I need to be aware of before or after emerging it?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum