Menu

#108 fig2dev: converting embedded jpeg images to postscript or pdf

xfig
closed
nobody
None
2020-09-17
2020-09-14
MC Gybe
No

When converting an embedded jpeg image with graphic overlays to postscript or pdf, the graphics either don't show up or show up on subsequent pages. This problem was reported in Ticket #37 "fig2dev: embedded jpg-images create spurios pages on ps/pdf export." The workaround was to convert the jpegs to png which seems to be working fine.

I looked through the source code and it appears that when jpeg2ps converts the jpegs, it includes a showpage in the postscript which appears to be causing the problem. A simple solution would be to redefine showpage as {} in the postscript, in a similar fassion as when postscript or eps files are included.

I've included a patch to fig2dev-3.2.7b which seems to be working for me and I also tried in on the bugs.zip attached to Ticket #37 and it seems to be working there also.

Thanks for keeping this tool alive and well, as it's one of my favorites.

1 Attachments

Discussion

  • tkl

    tkl - 2020-09-15
    • xfig / fig2dev: xfig --> fig2dev
     
  • tkl

    tkl - 2020-09-15

    Now I am a bit confused. In ticket [#37] it is stated that inclusion of jpeg creates spurious pages. Further down, it is claimed that the issue is resolved with fig2dev 3.2.7b . The commit that resolves the issue is, unfortunately, not given. (In the meantime, I am more accurate with the administration.) For a quick test I tried to draw some lines across an embedded jpeg, and the conversion to eps, ps or pdf worked.

    Looking into the postscript-file generated from a fig-file with an included jpeg, I found two showpage: One in the message stating that Postscript level 2 is required to include a jpeg, the second in its proper place at the end of the file. Hence, as long as the postscript interpreter is not restricted to level 1, the file should display fine.

    Could you post a small example that shows the problem, and also the eps which fig2dev generates?

    Thanks for your commitment!

     

    Related

    Tickets: #37

  • MC Gybe

    MC Gybe - 2020-09-17

    My most sincere apologies ... it does appear to be fixed in 3.2.7b. The problem was with my abilities to deal with multiple versions on the same machine.

    Sorry again for the confusion and thanks for maintaining such a great tool!

     
  • tkl

    tkl - 2020-09-17
    • status: open --> closed
    • xfig / fig2dev: fig2dev --> xfig
     
  • tkl

    tkl - 2020-09-17

    Never mind, happy for the quick resolution, rather disappearence.

     

Log in to post a comment.