Version: 1.4.89 (using KDE KDE 3.4.2) Installed from: Debian testing/unstable Packages OS: Linux The eps files generated by this version of umbrello are not being rendered properly in XEP, among other things. I ran epstool and got the following output: It seems to happen with all exported eps files now. epstool --test-eps contact.eps DSC Warning At line 2: %%BoundingBox: 35.: 23.8571 559 817.714 This line is incorrect. The bounding box must be in integer coordinates, not floating point. A floating point bounding box should be specified using %%HiResBoundingBox: A %%BoundingBox: should still be provided with integer values. 'OK' will convert the coordinates to integers, rounding them outwards. 'Cancel' will ignore this line DSC Information At line 4858: %%Pages: 1 This comment is duplicated in the trailer, which is unnecessary. The last occurence of a trailer line takes precedence. 'OK' or 'Cancel' will use the duplicate line. DSC Error This EPS file is missing the required %%BoundingBox: See the GSview help for details of how to add/adjust the bounding box. 'OK' will assume this as an EPS file 'Cancel' will assume this is NOT an EPS file. "gs" -dNOEPS -dNOPAUSE -dBATCH -dNODISPLAY "/tmp/gsviewrW79Qe" GPL Ghostscript 8.15: Unrecoverable error, exit code 1 Ghostscript failed to interpret file Missing %%BoundingBox File claims to be EPS. FAIL: File does not comply with EPS specification. Failed
Ugh, I again mixed up bug numbers. Correction: Bug 112293 is a duplicate of 112017. See the comments at 112293 for the actual resolution of 112292, sorry.
I tried rebuilding the latest version from SVN and I still get this error on recently created EPS files: [ezust@lazarus] /home/ezust/public_html/oopdocbook/docs/src/derivation> epstool --test-eps student.eps DSC Warning At line 2: %%BoundingBox: 35.: 23.8571 559 817.714 This line is incorrect. The bounding box must be in integer coordinates, not floating point. A floating point bounding box should be specified using %%HiResBoundingBox: A %%BoundingBox: should still be provided with integer values. 'OK' will convert the coordinates to integers, rounding them outwards. 'Cancel' will ignore this line DSC Information At line 4931: %%Pages: 1 This comment is duplicated in the trailer, which is unnecessary. The last occurence of a trailer line takes precedence. 'OK' or 'Cancel' will use the duplicate line. DSC Error This EPS file is missing the required %%BoundingBox: See the GSview help for details of how to add/adjust the bounding box. 'OK' will assume this as an EPS file 'Cancel' will assume this is NOT an EPS file. "gs" -dNOEPS -dNOPAUSE -dBATCH -dNODISPLAY "/tmp/gsviewOVhAed" GPL Ghostscript 8.15: Unrecoverable error, exit code 1 Ghostscript failed to interpret file Missing %%BoundingBox File claims to be EPS. FAIL: File does not comply with EPS specification. Failed
Which place in svn are you using? All work on Umbrello is being done on the branches/KDE/3.5/kdesdk _not_ on trunk (which is the QT4/KDE4 version)
[ezust@lazarus] /home/ezust/workspace/kde/kdesdk/umbrello/umbrello> svn info Path: . URL: svn://anonsvn.kde.org/home/kde/branches/KDE/3.5/kdesdk/umbrello/umbrello Repository UUID: 283d02a7-25f6-0310-bc7c-ecb5cbfe19da Revision: 460742 Node Kind: directory Schedule: normal Last Changed Author: binner Last Changed Rev: 460587 Last Changed Date: 2005-09-14 05:54:12 -0700 (Wed, 14 Sep 2005) Properties Last Updated: 2005-08-05 09:06:28 -0700 (Fri, 05 Aug 2005)
Created attachment 12573 [details] state-diagram.xmi I don't see how that can be after commit 458849. For reality check, I am attaching an XMI file and the EPS file created from it.
Created attachment 12574 [details] state-diagram.eps EPS file generated from the previously attached XMI file. Displays without problem using gv (Ghostview.)
So bizarre. I can clearly see that my version of umlview.cpp has your changes which convert the floating point numbers to an int. I've done a bunch of "clean" rebuilds, and this latest binary is 1.4.90 not 1.4.89 which is the version I first reported. and yet, *STILL*, it generates eps files with floating point values. I can't understand why this is. I will have to investigate further, I guess. It seems as if there is an old umlview.o somewhere which I can't delete.... On 15 Sep 2005 05:34:51 -0000, Oliver Kellogg < okellogg@users.sourceforge.net> wrote: [bugs.kde.org quoted mail] So bizarre. I can clearly see that my version of umlview.cpp has your changes which <br> convert the floating point numbers to an int.<br> <br> I've done a bunch of "clean" rebuilds, and this latest binary is 1.4.90 not 1.4.89 which is the version I first reported. <br> <br> and yet, *STILL*, it generates eps files with floating point values. I can't understand why this is. I will have to investigate further, I guess.<br> <br> It seems as if there is an old umlview.o somewhere which I can't delete....<br> <br> <br> <div><span class="gmail_quote">On 15 Sep 2005 05:34:51 -0000, <b class="gmail_sendername">Oliver Kellogg</b> <<a href="mailto:okellogg@users.sourceforge.net">okellogg@users.sourceforge.net</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> ------- You are receiving this mail because: -------<br>You are the assignee for the bug, or are watching the assignee.<br><br><a href="http://bugs.kde.org/show_bug.cgi?id=112292">http://bugs.kde.org/show_bug.cgi?id=112292 </a><br><br><br><br><br>------- Additional Comments From okellogg users sourceforge net 2005-09-15 07:34 -------<br>Created an attachment (id=12574)<br> --> (<a href="http://bugs.kde.org/attachment.cgi?id=12574&action=view"> http://bugs.kde.org/attachment.cgi?id=12574&action=view</a>)<br>state-diagram.eps<br><br>EPS file generated from the previously attached XMI file.<br>Displays without problem using gv (Ghostview.)<br><br><br>------------------------------------------------------- <br>SF.Net email is sponsored by:<br>Tame your development challenges with Apache's Geronimo App Server. Download<br>it for free - -and be entered to win a 42" plasma tv or your very own<br>Sony(tm)PSP. Click here to play: <a href="http://sourceforge.net/geronimo.php">http://sourceforge.net/geronimo.php</a><br>_______________________________________________<br>Uml-devel mailing list<br><a href="mailto:Uml-devel@lists.sourceforge.net">Uml-devel@lists.sourceforge.net </a><br><a href="https://lists.sourceforge.net/lists/listinfo/uml-devel">https://lists.sourceforge.net/lists/listinfo/uml-devel</a><br></blockquote></div><br>
SVN commit 461214 by okellogg: CCBUG:112292 - fixEPS(): Looking again at Comment #2, > DSC Warning > At line 2: > %%BoundingBox: 35.: 23.8571 559 817.714 There's this strange colon at "35." so substitute colons for '0'. Alan, could you try again? Thanks. M +31 -22 umlview.cpp --- branches/KDE/3.5/kdesdk/umbrello/umbrello/umlview.cpp #461213:461214 @@ -1382,31 +1382,40 @@ void UMLView::fixEPS(const QString &filename, QRect rect) { // now open the file and make a correct eps out of it QFile epsfile(filename); - QString fileContent; - if (epsfile.open(IO_ReadOnly )) { - // read - QTextStream ts(&epsfile); - fileContent = ts.read(); - epsfile.close(); + if (! epsfile.open(IO_ReadOnly)) { + return; + } + // read + QTextStream ts(&epsfile); + QString fileContent = ts.read(); + epsfile.close(); - // write new content to file - if (epsfile.open(IO_WriteOnly | IO_Truncate)) { - // read information - QRegExp rx("%%BoundingBox:\\s*(-?[\\d\\.]+)\\s*(-?[\\d\\.]+)\\s*(-?[\\d\\.]+)\\s*(-?[\\d\\.]+)"); - const int pos = rx.search(fileContent); - const int left = (int)rx.cap(1).toFloat(); - const int right = left + rect.width(); - const int top = (int)rx.cap(4).toFloat(); - const int bottom = top - rect.height(); + // read information + QRegExp rx("%%BoundingBox:\\s*(-?[\\d\\.:]+)\\s*(-?[\\d\\.:]+)\\s*(-?[\\d\\.:]+)\\s*(-?[\\d\\.:]+)"); + const int pos = rx.search(fileContent); + if (pos < 0) { + kdError() << "UMLView::fixEPS(" << filename + << "): cannot find %%BoundingBox" << endl; + return; + } - // modify content - fileContent.replace(pos,rx.cap(0).length(), - QString("%%BoundingBox: %1 %2 %3 %4").arg(left).arg(bottom).arg(right).arg(top)); + // write new content to file + if (! epsfile.open(IO_WriteOnly | IO_Truncate)) { + kdError() << "UMLView::fixEPS(" << filename + << "): cannot open file for writing" << endl; + return; + } + const int left = (int)rx.cap(1).replace(':', '0').toFloat(); + const int right = left + rect.width(); + const int top = (int)rx.cap(4).replace(':', '0').toFloat(); + const int bottom = top - rect.height(); - ts << fileContent; - epsfile.close(); - } - } + // modify content + fileContent.replace(pos,rx.cap(0).length(), + QString("%%BoundingBox: %1 %2 %3 %4").arg(left).arg(bottom).arg(right).arg(top)); + + ts << fileContent; + epsfile.close(); } void UMLView::printToFile(const QString &filename,bool isEPS) {
Just did an update again. Here is what epstool says now: [ezust@lazarus] /home/ezust/public_html/oopdocbook/diagrams> epstool --test-eps Animals.eps DSC Information At line 2764: %%Pages: 1 This comment is duplicated in the trailer, which is unnecessary. The last occurence of a trailer line takes precedence. 'OK' or 'Cancel' will use the duplicate line. "gs" -dNOEPS -dNOPAUSE -dBATCH -dNODISPLAY "/tmp/gsviewqjr0KU" GPL Ghostscript 8.15: Unrecoverable error, exit code 1 Ghostscript failed to interpret file Missing %%BoundingBox File claims to be EPS. FAIL: File does not comply with EPS specification. Failed
Not being able to reproduce the behavior, there's not a lot I can do: * Please check that you have a recent EPS converter (whatever that is.) * If the problem persists, please attach your XMI source and the generated EPS.
First, I recommend you get the program "epstool". I am using epstool 3.08 2005-06-06. http://www.cs.wisc.edu/~ghost/gsview/epstool.htm Second, using the same XMI file you attached, and the latest version, I created the same state-diagram.eps and got this output: [ezust@lazarus] /home/ezust/tmp/umbrello> epstool --test-eps statodiagramo1.eps DSC Information At line 441: %%Pages: 1 This comment is duplicated in the trailer, which is unnecessary. The last occurence of a trailer line takes precedence. 'OK' or 'Cancel' will use the duplicate line. "gs" -dNOEPS -dNOPAUSE -dBATCH -dNODISPLAY "/tmp/gsviewOetBQE" GPL Ghostscript 8.15: Unrecoverable error, exit code 1 Ghostscript failed to interpret file Missing %%BoundingBox File claims to be EPS. FAIL: File does not comply with EPS specification. Failed
Created attachment 12609 [details] latest eps file this is the file that caused the errors above
Created attachment 12610 [details] diff -u between the two eps files Okay, I did as you suggested and installed the epstool. At least I'm getting the same output from epstool on your eps file. Quite amazing. Your file has exactly the same %%BoundingBox line as mine. The main difference between the two seems to be the %%DocumentFonts but there are other differences too.
I just apt-get upgraded, and that upgraded libc6 and gcclibs. The problem went away after rebuilding umbrello. There was a compiler warning about kdeprint and libc6 which I didn't really fully grok until today.