[tex-live] error-message: overfull box

Zdenek Wagner zdenek.wagner at gmail.com
Sat Nov 12 16:48:03 CET 2011


2011/11/12 Marion Wenty <marion.wenty at gmail.com>:
> hello,
> i found the solution for not being able to include an eps-file into my latex
> document:
> i had produced a graphic in R and had saved it as an eps-file. The problem
> was that the program R was open, once i closed it, everything worked!
> maybe this will help someone who comes accross the same problem in the
> future.
> marion
>
It seems to me that you work in Windows. This is a normal Windows file
locking problem. This is a system "feature".

> 2011/11/9 Zdenek Wagner <zdenek.wagner at gmail.com>
>>
>> 2011/11/9 Marion Wenty <marion.wenty at gmail.com>:
>> > dear zdenek,
>> > thank you very much for your reply!
>> > did you mean i could solve the problem by writing
>> > e.g.
>> > %!PS
>> > \begin{figure}[H]
>> >
>> > ...
>> >
>> > \end{figure}
>> > %%EOF
>> >
>> > ?
>> > this didn't work and i don't understand how something is making a change
>> > even though i put a % in front of it.
>> > thank you very much in advance.
>> > marion
>> >
>> No! The reason is that quite a lot of programs are not EPS aware. They
>> pretend to generate EPS but the result is not EPS. At the beginning
>> some garbage (printer control commands etc) may be included. Other
>> programs prepare EPS for inclusion of GUI based programs (InDesign
>> etc) that cannot display EPS directly in the editing window. For this
>> purpose a small-resolution bitmap preview is added to the EPS file.
>> The former is a format error, the latter confuses TeX tools. The
>> format of the EPS files is fully described in the PostScript reference
>> manual that can be downloaded from the Adobe web site (or bought as a
>> printed book). The file should contain Document Structure Comments
>> (DSC). Looking at the comment you can easily see whether the EPS file
>> contains some garbage. If the file is valid, then the first line
>> starts with
>>
>> %!PS
>>
>> and the last line is
>>
>> %%EOF
>>
>> If the file contains something preceding %!PS and/or following %%EOF,
>> you can safely remove it. You have to open the file in a proper text
>> editor. The EPS file is usually just a normal text file but in some
>> cases may contain binary data.
>>
>> I have found my own simple perl script for removing garbage from EPS
>> files, the name is epsungarbage.pl and is called this way:
>>
>> epsungarbage.pl < input.eps > output.eps
>>
>> This is the script:
>> #!/usr/bin/perl
>> # Remove binary garbage from the beginning and end of the EPS file
>>
>> $garbage = 1;
>>
>> while (<>) {
>>  if ($garbage > 0) {
>>    if (/%!PS/) {
>>      $_ = $&.$';
>>      $garbage = 0;
>>    }
>>  } elsif (/^%%EOF/) {
>>    $_ = "%%EOF\n";
>>    $garbage = -1;
>>  }
>>  print if $garbage < 1;
>>  last if $garbage < 0;
>> }
>>
>> > 2011/11/9 Zdenek Wagner <zdenek.wagner at gmail.com>
>> >>
>> >> 2011/11/9 Marion Wenty <marion.wenty at gmail.com>:
>> >> > hello,
>> >> > i am trying to include a grapic, ist is an eps.file:
>> >> > does anyone know how to deal with this error message?
>> >> > [2] <gra.eps> [3]
>> >> >
>> >> > Overfull \vbox (247.34067pt too high) has occurred while \output is
>> >> > active
>> >> >
>> >> > [4] <gra.eps>
>> >> >
>> >> > Overfull \hbox (464.0225pt too wide) in paragraph at lines 105--106
>> >> >
>> >> Your image is larger than the page size (\texwidth abd \textheight).
>> >> You have to make it smaller, e.g. by scaling (see grfguide.pdf)
>> >>
>> >> > [][]
>> >> >
>> >> > LaTeX Warning: Float too large for page by 1.59608pt on input line
>> >> > 108.
>> >> >
>> >> > [5] [6] [7] [8] [9] [10] [11Error: /syntaxerror in -file-
>> >> >
>> >> > Operand stack:
>> >> >
>> >> > 334.09 98.35
>> >> >
>> >> > Execution stack:
>> >> >
>> >> This is a problem in your EPS files. It is difficult to guess the
>> >> exact problem without seeing the EPS file but usually MS programs
>> >> prepend a binary garbage to the beginning of your file. If you open
>> >> the EPS file in GS, everything works because the garbage is
>> >> automatically removed. However, if you include such file using dvips
>> >> or dvipdfm, it usually causes this type of errors. It is necessary to
>> >> remove such garbage, ie the first valid line must start with %!PS and
>> >> the last line must be %%EOF. Sometimes DSC comments may confuse
>> >> dvips/dvipdfm, sometimes ASCII85 encoded string may lead to confusion
>> >> and then cause such errors. A few years ago I wrote a perl script that
>> >> created a dummy EPS file containing just the bounding box information
>> >> and (filename.eps) run. Thus just a small file was examined by LaTeX
>> >> and included in the PS output and it displayed the correct output in
>> >> GS. Another perl script looked for (filename.eps) run commands and
>> >> included the real EPS files (if I wanted to send the file to PS
>> >> printer, to Adobe Distiller, or send it to someone else).
>> >>
>> >> > %interp_exit .runexec2 --nostringval-- --nostringval--
>> >> > --nostringval-- 2
>> >> > %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1
>> >> > %stopped_push 1878 1 3 %oparray_pop 1877 1 3 %oparray_pop 1861 1 3
>> >> > %oparray_pop 1755 1 3 %oparray_pop --nostringval-- %errorexec_pop
>> >> > .runexec2
>> >> > --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push
>> >> >
>> >> > Dictionary stack:
>> >> >
>> >> > --dict:1162/1684(ro)(G)-- --dict:0/20(G)-- --dict:95/200(L)--
>> >> >
>> >> > Current allocation mode is local
>> >> >
>> >> > Current file position is 13023
>> >> >
>> >> > GPL Ghostscript 8.71: Unrecoverable error, exit code 1
>> >> >
>> >> > ** WARNING ** Filtering file via command -->rungs -q -dNOPAUSE
>> >> > -dBATCH
>> >> > -sPAPERSIZE=a0 -sDEVICE=pdfwrite -dCompatibilityLevel=1.5
>> >> > -dAutoFilterGrayImages=false -dGrayImageFilter=/FlateEncode
>> >> > -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode
>> >> >
>> >> >
>> >> > -sOutputFile='C:/DOKUME~1/MARION~1.WEN/LOKALE~1/Temp/dvipdfmx.a0321600002'
>> >> > './gra.eps' -c quit<-- failed.
>> >> >
>> >> > ** WARNING ** Image format conversion for "./gra.eps" failed...
>> >> >
>> >> > ** ERROR ** pdf_ref_obj(): passed invalid object.
>> >> >
>> >> > Output file removed.
>> >> >
>> >> > fwrite: Broken pipe
>> >> >
>> >> > xelatex.exe:
>> >> >
>> >> > thank you very much in advance.
>> >> >
>> >> > marion
>> >>
>> >>
>> >>
>> >> --
>> >> Zdeněk Wagner
>> >> http://hroch486.icpf.cas.cz/wagner/
>> >> http://icebearsoft.euweb.cz
>> >
>> >
>>
>>
>>
>> --
>> Zdeněk Wagner
>> http://hroch486.icpf.cas.cz/wagner/
>> http://icebearsoft.euweb.cz
>
>



-- 
Zdeněk Wagner
http://hroch486.icpf.cas.cz/wagner/
http://icebearsoft.euweb.cz



More information about the tex-live mailing list