Tuesday, February 28, 2012

Error creating XPS file

Error creating XPS file: Source _rels/.rels not found in archive
If you see the above error when trying to use xpstopng, xpstopdf, xpsto* tools provided by libgxps, then you probably suffer from this bug:

In short, the problem lies with libarchive versions prior to 3.x and zip files created by windows.
a) Just update to 3.x or newer and you'll be good to go.
b) As a workaround, you can recreate the zip file:

unzip lorem-ipsum-and-image.xps -d temp/
cd temp/
zip ../newfile.xps *
cd ..

You now have a working copy of your XPS document.

1 comment:

Anonymous said...

zip -r ../newfile.xps *