Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.1:Staging:E
transfig
transfig.3.2.5d-mediaboxrealnb.dif
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File transfig.3.2.5d-mediaboxrealnb.dif of Package transfig
--- fig2dev/dev/readeps.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) --- fig2dev/dev/readeps.c +++ fig2dev/dev/readeps.c 2017-02-02 13:52:46.733848874 +0000 @@ -75,16 +75,22 @@ read_eps_pdf(FILE *file, int filetype, F while (fgets(buf, 512, file) != NULL) { /* look for /MediaBox for pdf file */ if (pdf_flag) { + char *s; + for(s=buf; (s=strchr(s,'/')); s++) { if (!strncmp(buf, "/MediaBox", 8)) { /* look for the MediaBox spec */ - c = strchr(buf,'[')+1; - if (c && sscanf(c,"%d %d %d %d",llx,lly,&urx,&ury) < 4) { + c = strchr(s,'['); + if (c && sscanf(c+1,"%d %d %d %d",llx,lly,&urx,&ury) < 4) { *llx = *lly = 0; urx = paperdef[0].width*72; ury = paperdef[0].height*72; put_msg("Bad MediaBox in imported PDF file %s, assuming %s size", pic->file, metric? "A4" : "Letter" ); } + pic->bit_size.x = (urx-(*llx)); + pic->bit_size.y = (ury-(*lly)); + break; } + } /* look for bounding box for EPS file */ } else if (!nested && !strncmp(buf, "%%BoundingBox:", 14)) { c=buf+14;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor