Hi there,
I've been looking to see if I can make our application create 3D pdf files using the PRC file format. I downloaded the PRC file format document from ISO and tried to read a few example files I found on the web to make sure I understood how it worked. It's all fine until I try to read huffman compressed data in a PRC_TYPE_TESS_3D_COMPRESSED section. The standard says that I should be able to read the huffman compressed data by using the opposite of the 'WriteUnsignedInteger' but if I do that I get invalid integers. If I try to read the unsigned integers by just reading 32bits directly the data doesn't seem to make sense if I try to decode the leaf data for the fuffman tree.
Does anybody know if there is any documentation on this or any examples? I'm at the point of giving up...
I'm a bit bewildered that there is an ISO standard but the example files that I have just don't seem to match it...
Any help would be be fantastic.
Thanks
Miles Thornton
Dear Miles,
while I can only share your bewilderment (I have also tried and failed to decode PRC_TYPE_TESS_3D_COMPRESSED),
may I ask you to clarify a bit what "PRC file format document from ISO" did you deal with - the old one avialable for free at
http://pdf.editme.com/files/PDFE/SC2N570-PRC-WD.pdf or the one currently being sold at http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm ?csnumber=54948 ?
If you have got your hands on the latter, please, tell us if it is worth its price.
Is it an much improved relative to SC2N570-PRC-WD.pdf?
Sincerely, Michail
Michail,
I actually got the standard from BSi although I assume it is the same as the one at ISO. Here's the link to where I got it from. http://shop.bsigroup.com/en/ProductDetail/?pid=000000000030208200
The short answer is, no it's not worth the price at all. There are still errors in it from what I can see and (very annoyingly) it has 'DRAFT 2011' stamped across each page which makes it virtually impossible to select and copy any text from it using Acrobat.
On a different note I think that I am actually making some progress at reading the compressed tessellation. However I can only spare the odd day here and there to look into this so progress is quite slow...
Miles,
the number of pages of the current ISO draft is different from the one at bsigroup, so the text may not be the same.
Your text is called "BS ISO 14739-1", while ISO draft is "ISO/DIS 14739-1.2", that "2" may indicate the next iteration.
On the other hand, it seems a new dratf (1.3) is coming in August:
http://www.techsoft3d.com/developers/article/prc-iso-update
http://www.pdfa.org/2012/06/iso-standards-pdf-week-in-mississauga/
Well, there is some progress going on.
ISO draft is not being sold now and there are more details on what took place within ISO at
http://3dpdfconsortium.org/news-and-events/3-the-3d-pdf-standard/37-pd f-week-may-2012-update.html
More news - ISO draft is being sold again, it is now "ISO/DIS 14739-1.3" (was "ISO/DIS 14739-1.2")
http://www.iso.org/iso/home/store/catalogue_tc/catalogue_detail.htm?cs number=54948
If there is someone here who has got his hands on the new draft - please, report if it is worth its price.
Got my hands on "ISO/DIS 14739-1.3".
Dissapointed. Not that much improvement relative to the free public draft from AIIM.
"Caveat emptor".
The following pseudocode (the same in both drafts),
does not set pcArray[0] to anythimg and uses its junk value in the second "for" cycle.
An evident bug.
I am sure there are more gems like that, hidden in less obvious ways.
I am afraid the text travels thru ISO process without being read.
And Adobe/TechSoft just want an ISO stamp on a for propaganda purposes.
(Anyone remembers Windows NT POSIX compliance joke?)
------------------------------------------
void WriteCompressedIntegerArray(int* piArray, unsigned uIntArraySize,bool bWriteCompressStrategy=true)
{
unsigned u;
char* pcArray=new char[uIntArraySize];
for( u=1; u<uIntArraySize; u++)
pcArray[u] = (char) GetNumberOfBitsUsedToStoreInteger(piArray[u]);
WriteCharacterArray(pcArray,uIntArraySize, 6, bWriteCompressStrategy);
for( u=0;u < uIntArraySize; u++)
WriteIntegerWithVariableBitNumber(piArray[u], pcArray[u]);
delete [] pcArray;
}
On a different note I think that I am actually making some progress at reading the compressed tessellation.
Did you succede?
The current ISO draft has changed the pseudocode description of Huffman compressed data storage, but the new description refers to undocumented subroutines and variables. At least their names seem to imply something.
OK, on one hand the current ISO draft turned out to be good enough to allow recovery of Huffman encoded data from a PRC file, but on the other I was able to cope with the large amount of errors and omissions in the description of how the compression results are packed into bit fields only due to the fact that both the compression input and output were predictable, so "reverse engineering" was easy.
Since the error ratio is likely to be the same in other parts of the specification (and not mauch lower then in the free pre-ISO draft), attempts to reproduce the results of vaguely defined process of highly compressing tessellation and/or to look into other murky areas of PRC format seem risky.
BTW, PDF3D team claims to produce, "independent of Adobe", highly compressed PRC tessellations in PDF output of their products. So reverse-engineering of PRC may be possible, given enough motivation and resourses, but for a casual developer the current ISO draft of the PRC standard is an investment of questionable value.
North America
Europe, Middle East and Africa
Asia Pacific