Hi folks

I'm beginning to think I've misunderstood something rather severely, 
since even after applying basic close order fixups I still can't handle 
the PDF reference when enforcing (otherwise) strict open/close nesting.

For example, in the PDF Reference 1.5 (v5), page 167, the following code 
appears:

         1366 Keyword: q
         1367 Variant: 94.500000
         1368 Variant: 655
         1369 Variant: 424
         1370 Variant: -112
         1371 Keyword: re
         1372 Keyword: W
         1373 Keyword: n
         1374 Variant: /Cs8
         1375 Keyword: cs
         1376 Variant: 0
         1377 Keyword: scn
         1378 Variant: /GS3
         1379 Keyword: gs
         1380 Variant: 96.667000
         1381 Variant: 654
         1382 Variant: 421
         1383 Variant: -111
         1384 Keyword: re
         1385 Keyword: f
         1386 Variant: /EmbeddedDocument
         1387 Variant: /MC8
         1388 Keyword: BDC
         1389 Keyword: Q
         1390 Keyword: q
         1391 Variant: 96.667000
         1392 Variant: 653.570000
         1393 Variant: 420.500000
         1394 Variant: -110.570000
         1395 Keyword: re
         1396 Keyword: W

If PDF content streams *do* obey strict XML-style nesting rules, as they 
seem to *most* of the time, the above sequence would be illegal, since 
the nesting would be wrong:

q
BDC
Q %% illegal here without preceeding EMC?
q

I dont't think I can just swap the order of operators like I can when I 
see a "Q EMC" and I expect an "EMC Q" or vice versa. It'd make more 
sense if the BDC and its arguments followed, rather than preceeded, the 
Q operator, and I assume that's the intent, but is it really safe to 
assume that's what the writing application (Acrobat Distiller, in this 
case) intended?

The PDF reference does suggest at several points that proper nesting 
must be maintained in certain pairs of operator types, but I couldn't 
find anywhere that it made a strong statement about nesting in general.

--
Craig Ringer

-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Podofo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to