Friday, October 20, 2017

Quark Xpress Hack

Quark Xpress Hack


Computers are marvelous contraptions, they just make life so much simpler, especially in the business sphere. However using a computer doesn't come without risks. As you may all know by now, any form of electronically stored data can become corrupt or damaged at some time or the other. Hence the first rule of computing is "back-up". The second rule  of computing is "back-up" and the third rule of computing is "back-up". But how many of us got caught with our pants down in the data realm, having the intention to make a "back-up", only to experience file corruption  and loss of data moments before we actually do so.



Murphy's law dictates that the spreadsheet you spent weeks developing in readiness for a presentation is very likely to get corrupted the very day before the deadline, leaving you absolutely no time to redo it, but also leaving you with egg on your face. Sounds familiar? Sure it does! During my computing career I've experienced hard drive corruption, file corruption, disk corruption, flash drive corruption, compact flash corruption, SD card corruption, micro SD card corruption and even cell phone corruption.  

One morning catastrophe struck when a vital document (96 page full colour magazine) failed to save that needed to go to the printers the following day. Ardent Quark Xpress users can vouch for that or similar incidents. Many of them familiar are with "I/O error trying to read or write to disk [-36]".  Lucky for me, I've hacked a few files in my time and it's not to big a deal for me to fix it.



I've used Quark Xpress for many years on both Mac and PC. I started out with DTP in the days of Pagestream on the Amiga, Print Shop on DOS and PagePlus  and Microsoft Publisher on Windows. Ever since Quark Xpress Version 2,  I've encountered "ioErr"  and "I/O error" countless times. Sometimes this error disguises itself as "File is locked. Changes cannot be saved [-315]. This Project is locked".  Or Quark Xpress reports that the "file is locked with error code -54". Or "This Project is locked. Changes cannot be saved. [-314] "

These errors often occur when the file is transported on portable media from one designer to another, though it's not the actual cause of the errors. Most times it's caused by lack of permission, so its feasable to access the file's properties, select "Remove Properties and Personal Information" then click on the radio button that says "Create copy with all possible properties removed". Also remember that file size is always constant but the size on disk often varies. So when transporting files, try not to open them on the transporting media but rather copy it to hard drive then, open it. 
Files more often than not get damaged if you save a document to damaged media and Windows will normally ask to scan the media.

Just a few days ago, I defragmented my Windows laptop and thereafter I couldn't open a a very important Quark document that I've worked on for 5 months. There was absolutely no way in hell that I was going to redo this document let alone find the time to do so. Fortunately for me, I had a 50% complete, though non-current back-up file of said Quark document. I just had to hack it. 

So, I opened up my corrupt document and my 50% back-up document with a hex editor, because it was going to be a lot easier to stitch the document that to redo it.  I used HxD, it's a Freeware Hex Editor and Disk Editor with a very small footprint. As can be seen in the image above, the first two bits of the first byte of the corrupt file (CCTV-Project Documentation 2.qxp / underlined in green) contains FF FF at offset 00000000 and in it's ASCII column it contains ÿÿ as its first two characters. 

This is the instruction that Quark could not read or interpreted it as "I/O error trying to read or write to disk [-36]". I then copied the contents of offset 00000000 to 00000020 from the back-up document (CCTV Project Documentation.qxp  / underlined in green) and pasted it in the corrupt file and saved it with the write function and named it Salvaged CCTV-Project Documentation 2.qxp  (underlined in green). I then launched Quark Xress slected Salvaged CCTV-Project Documentation 2.qxp and presto the stitched file open revealing its valuable contents, saving me some 600 hours of time.

How To Fix QuarkXPress Error -36, I/O Errors - Quark: QuarkXPress,   QuarkXPress runtime errors,  QXPS Error code lists, File is locked. Changes cannot be saved (315), Learn how to fix Quark XPress documents, How To Fix Quark Xpress Bad File Format [-70]error, How To Fix Quark Xpress Unexpected end of file encountered [-39]error, How To Fix Quark Xpress Out of Memory [-108] error,