Bug 366451 - Passivetex does not process DocBook EPS imagedata
Summary: Passivetex does not process DocBook EPS imagedata
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: passivetex
Version: rawhide
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Ondrej Vasik
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-11-05 08:35 UTC by W. Michael Petullo
Modified: 2007-11-30 22:12 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-11-28 22:49:27 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
DocBook XML containing a EPS imagedata (769 bytes, text/xml)
2007-11-05 08:35 UTC, W. Michael Petullo
no flags Details
EPS file referenced by DocBook XML (5.40 KB, image/x-eps)
2007-11-05 08:37 UTC, W. Michael Petullo
no flags Details

Description W. Michael Petullo 2007-11-05 08:35:23 UTC
Description of problem:
I am trying to process DocBook imagedata using passivetex. The process fails.

Version-Release number of selected component (if applicable):
passivetex-1.25-5.1.1

How reproducible:
Everytime.

Steps to Reproduce:
rocess the attached DocBook XML using "xmlto pdf book.xml"
  
Actual results:
[...]
LaTeX Font Warning: Font shape `U/wasy/m/n' in size <12.44159> not available
(Font)              size <12> substituted on input line 317.


LaTeX Font Warning: Font shape `U/stmry/m/n' in size <12.44159> not available
(Font)              size <12> substituted on input line 317.


Error: pdfxmltex (file attack.pdf): cannot find image file
 ==> Fatal error occurred, the output PDF file is not finished!


Expected results:


Additional info:
Things work fine if the imagedata is of the PNG or PDF formats.

Comment 1 W. Michael Petullo 2007-11-05 08:35:23 UTC
Created attachment 247781 [details]
DocBook XML containing a EPS imagedata

Comment 2 W. Michael Petullo 2007-11-05 08:37:47 UTC
Created attachment 247791 [details]
EPS file referenced by DocBook XML

Comment 3 Ondrej Vasik 2007-11-28 09:37:21 UTC
Thanks for report - but as is written on PassiveTeX upstream
pages(http://www.tei-c.org.uk/Software/passivetex/) - that program doesn't cover
all XSL FO . PassiveTeX upstream is dead - at least it seems to be - no new
versions for ~3 years . I'm now working on xmlto version with fop support(based
on patch in #147472) - to have some new option in cases where passivetex is not
able to handle FO file. Anyway - I will try to find solution for those two
reports - and if it will be easy to fix, I will try to do it.
In that case - if you try to use xmlto fo epsbook.xml , and then xmlto pdf
epsbook.fo (basically generating pdf in two steps) - error message you will get
will be validating error - so validator recognizes block with image and
fo:external-graphic as invalid one.

Comment 4 Ondrej Vasik 2007-11-28 22:49:27 UTC
Well... got it running, but I think it would be better to keep it without the fix.
Steps to fix:
1) You need to set "shell_escape = 1" in texmf.cnf configuration file
(/usr/share/texmf/web2c/texmf.cnf on my machine)
2) In fotex.sty you will have to rewrite one line
(fotex.sty is located in /usr/share/texmf/tex/xmltex/passivetex/)
at the end of file
\@namedef{Gin@rule@.eps}#1{{pdf}{.pdf}{`epstopdf #1}}
has to be replaced by
\@namedef{Gin@rule@.eps}#1{{pdf}{.pdf}{`epstopdf \FOsrcname}}
because xmlto is running in /tmp/ and #1 is only file name - therefore it will
fail to find it.
3) Now your xml will be transformed to pdf by xmlto correctly - but .pdf file
will stay in dir of .eps file anyway

Work-around:
run epstopdf <filename>.eps , this will create pdf from eps and use pdf link in
xml document(or keep eps in your xml, but have transformed pdf in same dir).
This way is recommended by some sources I read. In fact passivetex is doing the
same - after you will do the steps to fix, passivetex will run shellcommand
epstopdf <filename>.eps and will create pdf automatically.

Because of that shell_escape = 1 in cnf file - which is potentially dangerous
thing - I would like to close it as WONTFIX, because so far there is no other
way how to handle eps with passivetex and workaround is IMHO sufficient, because
it is doing same thing as possible fix.


Note You need to log in before you can comment on or make changes to this bug.