Hey Jaroslav, is that document descriptor from opening a viewless document? That object is different from a regular photoshop document.
The descriptor-info module should return a similar object like the one below from a regular photoshop document.
Code: Select all
{
"mode": {
"stringID": "mode",
"charID": "Md ",
"id": 1298407456,
"key": 0,
"type": "DescValueType.ENUMERATEDTYPE",
"value": "RGBColor",
"enumerationType": "colorSpace"
},
"bigNudgeH": {
"stringID": "bigNudgeH",
"charID": "BgNH",
"id": 1114066504,
"key": 1,
"type": "DescValueType.INTEGERTYPE",
"value": 655360
},
"bigNudgeV": {
"stringID": "bigNudgeV",
"charID": "BgNV",
"id": 1114066518,
"key": 2,
"type": "DescValueType.INTEGERTYPE",
"value": 655360
},
"rulerOriginH": {
"stringID": "rulerOriginH",
"charID": "RlrH",
"id": 1382838856,
"key": 3,
"type": "DescValueType.INTEGERTYPE",
"value": 0
},
"rulerOriginV": {
"stringID": "rulerOriginV",
"charID": "RlrV",
"id": 1382838870,
"key": 4,
"type": "DescValueType.INTEGERTYPE",
"value": 0
},
"width": {
"stringID": "width",
"charID": "Wdth",
"id": 1466201192,
"key": 5,
"type": "DescValueType.UNITDOUBLE",
"value": 1594
},
"height": {
"stringID": "height",
"charID": "Hght",
"id": 1214736500,
"key": 6,
"type": "DescValueType.UNITDOUBLE",
"value": 2500
},
"resolution": {
"stringID": "resolution",
"charID": "Rslt",
"id": 1383296116,
"key": 7,
"type": "DescValueType.UNITDOUBLE",
"value": 72
},
"title": {
"stringID": "title",
"charID": "Ttl ",
"id": 1416916000,
"key": 8,
"type": "DescValueType.STRINGTYPE",
"value": "Untitled-1"
},
"fileInfo": {
"stringID": "fileInfo",
"charID": "FlIn",
"id": 1181501806,
"key": 9,
"type": "DescValueType.OBJECTTYPE",
"value": {
"count": 0,
"typename": "ActionDescriptor"
},
"object": {
}
},
"numberOfPaths": {
"stringID": "numberOfPaths",
"charID": "NmbP",
"id": 1315791440,
"key": 10,
"type": "DescValueType.INTEGERTYPE",
"value": 0
},
"numberOfChannels": {
"stringID": "numberOfChannels",
"charID": "NmbO",
"id": 1315791439,
"key": 11,
"type": "DescValueType.INTEGERTYPE",
"value": 3
},
"numberOfLayers": {
"stringID": "numberOfLayers",
"charID": "NmbL",
"id": 1315791436,
"key": 12,
"type": "DescValueType.INTEGERTYPE",
"value": 40
},
"targetPathIndex": {
"stringID": "targetPathIndex",
"charID": "TrgP",
"id": 1416783696,
"key": 13,
"type": "DescValueType.INTEGERTYPE",
"value": -1
},
"workPathIndex": {
"stringID": "workPathIndex",
"charID": "WrkP",
"id": 1467116368,
"key": 14,
"type": "DescValueType.INTEGERTYPE",
"value": -1
},
"clippingPathInfo": {
"stringID": "clippingPathInfo",
"charID": "Clpg",
"id": 1131180135,
"key": 15,
"type": "DescValueType.OBJECTTYPE",
"value": {
"count": 2,
"typename": "ActionDescriptor"
},
"object": {
"clippingPathIndex": {
"stringID": "clippingPathIndex",
"charID": "ClpI",
"id": 1131180105,
"key": 0,
"type": "DescValueType.INTEGERTYPE",
"value": -1
},
"clippingPathFlatness": {
"stringID": "clippingPathFlatness",
"charID": "ClpF",
"id": 1131180102,
"key": 1,
"type": "DescValueType.INTEGERTYPE",
"value": 0
}
}
},
"depth": {
"stringID": "depth",
"charID": "Dpth",
"id": 1148220520,
"key": 16,
"type": "DescValueType.INTEGERTYPE",
"value": 8
},
"documentID": {
"stringID": "documentID",
"charID": "DocI",
"id": 1148150601,
"key": 17,
"type": "DescValueType.INTEGERTYPE",
"value": 1484
},
"copyright": {
"stringID": "copyright",
"charID": "Cpyr",
"id": 1131444594,
"key": 18,
"type": "DescValueType.BOOLEANTYPE",
"value": false
},
"watermark": {
"stringID": "watermark",
"charID": "watr",
"id": 2002875506,
"key": 19,
"type": "DescValueType.BOOLEANTYPE",
"value": false
},
"isDirty": {
"stringID": "isDirty",
"charID": "IsDr",
"id": 1232290930,
"key": 20,
"type": "DescValueType.BOOLEANTYPE",
"value": true
},
"count": {
"stringID": "count",
"charID": "Cnt ",
"id": 1131312160,
"key": 21,
"type": "DescValueType.INTEGERTYPE",
"value": 1
},
"itemIndex": {
"stringID": "itemIndex",
"charID": "ItmI",
"id": 1232366921,
"key": 22,
"type": "DescValueType.INTEGERTYPE",
"value": 1
},
"manage": {
"stringID": "manage",
"charID": "",
"id": 375,
"key": 23,
"type": "DescValueType.ENUMERATEDTYPE",
"value": "workingSpaceCode",
"enumerationType": "manage"
},
"profile": {
"stringID": "profile",
"charID": "",
"id": 376,
"key": 24,
"type": "DescValueType.STRINGTYPE",
"value": "sRGB IEC61966-2.1"
},
"workflow": {
"stringID": "workflow",
"charID": "",
"id": 3018,
"key": 25,
"type": "DescValueType.OBJECTTYPE",
"value": {
"count": 1,
"typename": "ActionDescriptor"
},
"object": {
"workflowIsManaged": {
"stringID": "workflowIsManaged",
"charID": "",
"id": 3054,
"key": 0,
"type": "DescValueType.BOOLEANTYPE",
"value": false
}
}
},
"quickMask": {
"stringID": "quickMask",
"charID": "QucM",
"id": 1366647629,
"key": 26,
"type": "DescValueType.BOOLEANTYPE",
"value": false
},
"histogram": {
"stringID": "histogram",
"charID": "Hstg",
"id": 1215525991,
"key": 27,
"type": "DescValueType.LISTTYPE",
"value": {
"count": 256,
"typename": "ActionList"
},
"list": []
},
"pixelScaleFactor": {
"stringID": "pixelScaleFactor",
"charID": "",
"id": 1191,
"key": 28,
"type": "DescValueType.UNITDOUBLE",
"value": 1
},
"XMPMetadataAsUTF8": {
"stringID": "XMPMetadataAsUTF8",
"charID": "",
"id": 3019,
"key": 29,
"type": "DescValueType.STRINGTYPE",
"value": ""
},
"measurementScale": {
"stringID": "measurementScale",
"charID": "",
"id": 1195,
"key": 30,
"type": "DescValueType.OBJECTTYPE",
"value": {
"count": 2,
"typename": "ActionDescriptor"
},
"object": {
"null": {
"stringID": "null",
"charID": "null",
"id": 1853189228,
"key": 0,
"type": "DescValueType.REFERENCETYPE",
"value": {
"typename": "ActionReference"
},
"reference": {
"count": 1,
"typename": "ActionDescriptor"
}
},
"to": {
"stringID": "to",
"charID": "T ",
"id": 1411391520,
"key": 1,
"type": "DescValueType.OBJECTTYPE",
"value": {
"count": 3,
"typename": "ActionDescriptor"
},
"object": {
"pixelLength": {
"stringID": "pixelLength",
"charID": "",
"id": 1563,
"key": 0,
"type": "DescValueType.INTEGERTYPE",
"value": 1
},
"logicalLength": {
"stringID": "logicalLength",
"charID": "",
"id": 1564,
"key": 1,
"type": "DescValueType.DOUBLETYPE",
"value": 1
},
"logicalUnits": {
"stringID": "logicalUnits",
"charID": "",
"id": 1565,
"key": 2,
"type": "DescValueType.STRINGTYPE",
"value": "pixels"
}
}
}
}
},
"targetLayers": {
"stringID": "targetLayers",
"charID": "",
"id": 3022,
"key": 31,
"type": "DescValueType.LISTTYPE",
"value": {
"count": 1,
"typename": "ActionList"
},
"list": [
{
"count": 37,
"typename": "ActionDescriptor"
}
]
},
"targetLayersIDs": {
"stringID": "targetLayersIDs",
"charID": "",
"id": 3024,
"key": 32,
"type": "DescValueType.LISTTYPE",
"value": {
"count": 1,
"typename": "ActionList"
},
"list": [
{
"count": 37,
"typename": "ActionDescriptor"
}
]
},
"targetLayersIndexes": {
"stringID": "targetLayersIndexes",
"charID": "",
"id": 3023,
"key": 33,
"type": "DescValueType.LISTTYPE",
"value": {
"count": 1,
"typename": "ActionList"
},
"list": [
{
"count": 37,
"typename": "ActionDescriptor"
}
]
},
"zoom": {
"stringID": "zoom",
"charID": "Zm ",
"id": 1517101088,
"key": 34,
"type": "DescValueType.UNITDOUBLE",
"value": 0.0625
},
"printCopies": {
"stringID": "printCopies",
"charID": "",
"id": 3026,
"key": 35,
"type": "DescValueType.INTEGERTYPE",
"value": 1
},
"printCurrentPrinter": {
"stringID": "printCurrentPrinter",
"charID": "",
"id": 718,
"key": 36,
"type": "DescValueType.STRINGTYPE",
"value": "Lexmark X954"
},
"printerList": {
"stringID": "printerList",
"charID": "",
"id": 3027,
"key": 37,
"type": "DescValueType.LISTTYPE",
"value": {
"count": 2,
"typename": "ActionList"
},
"list": [
"Deskjet 3520 series",
"Lexmark X954"
]
},
"printColorHandling": {
"stringID": "printColorHandling",
"charID": "",
"id": 3028,
"key": 38,
"type": "DescValueType.ENUMERATEDTYPE",
"value": "printerManaged",
"enumerationType": "printColorHandling"
},
"printOutputOptions": {
"stringID": "printOutputOptions",
"charID": "",
"id": 1180,
"key": 39,
"type": "DescValueType.OBJECTTYPE",
"value": {
"count": 23,
"typename": "ActionDescriptor"
},
"object": {
"caption": {
"stringID": "caption",
"charID": "Cptn",
"id": 1131443310,
"key": 0,
"type": "DescValueType.BOOLEANTYPE",
"value": false
},
"calibrationBars": {
"stringID": "calibrationBars",
"charID": "Clbr",
"id": 1131176562,
"key": 1,
"type": "DescValueType.BOOLEANTYPE",
"value": false
},
"registrationMarks": {
"stringID": "registrationMarks",
"charID": "RgsM",
"id": 1382511437,
"key": 2,
"type": "DescValueType.BOOLEANTYPE",
"value": false
},
"cornerCropMarks": {
"stringID": "cornerCropMarks",
"charID": "CrnC",
"id": 1131572803,
"key": 3,
"type": "DescValueType.BOOLEANTYPE",
"value": false
},
"centerCropMarks": {
"stringID": "centerCropMarks",
"charID": "CntC",
"id": 1131312195,
"key": 4,
"type": "DescValueType.BOOLEANTYPE",
"value": false
},
"labels": {
"stringID": "labels",
"charID": "Lbls",
"id": 1281518707,
"key": 5,
"type": "DescValueType.BOOLEANTYPE",
"value": false
},
"negative": {
"stringID": "negative",
"charID": "Ngtv",
"id": 1315402870,
"key": 6,
"type": "DescValueType.BOOLEANTYPE",
"value": false
},
"emulsionDown": {
"stringID": "emulsionDown",
"charID": "EmlD",
"id": 1164799044,
"key": 7,
"type": "DescValueType.BOOLEANTYPE",
"value": false
},
"interfaceIconFrameDimmed": {
"stringID": "interfaceIconFrameDimmed",
"charID": "Intr",
"id": 1231975538,
"key": 8,
"type": "DescValueType.BOOLEANTYPE",
"value": false
},
"background": {
"stringID": "background",
"charID": "Bckg",
"id": 1113811815,
"key": 9,
"type": "DescValueType.OBJECTTYPE",
"value": {
"count": 3,
"typename": "ActionDescriptor"
},
"object": {
"red": {
"stringID": "red",
"charID": "Rd ",
"id": 1382293536,
"key": 0,
"type": "DescValueType.DOUBLETYPE",
"value": 255
},
"grain": {
"stringID": "grain",
"charID": "Grn ",
"id": 1198681632,
"key": 1,
"type": "DescValueType.DOUBLETYPE",
"value": 255
},
"blue": {
"stringID": "blue",
"charID": "Bl ",
"id": 1114382368,
"key": 2,
"type": "DescValueType.DOUBLETYPE",
"value": 255
}
}
},
"borderThickness": {
"stringID": "borderThickness",
"charID": "BrdT",
"id": 1114793044,
"key": 10,
"type": "DescValueType.UNITDOUBLE",
"value": 0
},
"bleed": {
"stringID": "bleed",
"charID": "Bld ",
"id": 1114399776,
"key": 11,
"type": "DescValueType.UNITDOUBLE",
"value": 0
},
"resolution": {
"stringID": "resolution",
"charID": "Rslt",
"id": 1383296116,
"key": 12,
"type": "DescValueType.UNITDOUBLE",
"value": 72
},
"vectorData": {
"stringID": "vectorData",
"charID": "",
"id": 1181,
"key": 13,
"type": "DescValueType.BOOLEANTYPE",
"value": true
},
"pagePosition": {
"stringID": "pagePosition",
"charID": "PgPs",
"id": 1348948083,
"key": 14,
"type": "DescValueType.ENUMERATEDTYPE",
"value": "pagePosCentered",
"enumerationType": "pagePosition"
},
"left": {
"stringID": "left",
"charID": "Left",
"id": 1281713780,
"key": 15,
"type": "DescValueType.UNITDOUBLE",
"value": 0
},
"top": {
"stringID": "top",
"charID": "Top ",
"id": 1416589344,
"key": 16,
"type": "DescValueType.UNITDOUBLE",
"value": 0
},
"scale": {
"stringID": "scale",
"charID": "Scl ",
"id": 1399024672,
"key": 17,
"type": "DescValueType.UNITDOUBLE",
"value": 100
},
"cropWhenPrinting": {
"stringID": "cropWhenPrinting",
"charID": "",
"id": 2922,
"key": 18,
"type": "DescValueType.BOOLEANTYPE",
"value": false
},
"cropRectBottom": {
"stringID": "cropRectBottom",
"charID": "",
"id": 2923,
"key": 19,
"type": "DescValueType.INTEGERTYPE",
"value": 0
},
"cropRectLeft": {
"stringID": "cropRectLeft",
"charID": "",
"id": 2924,
"key": 20,
"type": "DescValueType.INTEGERTYPE",
"value": 0
},
"cropRectRight": {
"stringID": "cropRectRight",
"charID": "",
"id": 2925,
"key": 21,
"type": "DescValueType.INTEGERTYPE",
"value": 0
},
"cropRectTop": {
"stringID": "cropRectTop",
"charID": "",
"id": 2926,
"key": 22,
"type": "DescValueType.INTEGERTYPE",
"value": 0
}
}
},
"printOutput": {
"stringID": "printOutput",
"charID": "",
"id": 1182,
"key": 40,
"type": "DescValueType.OBJECTTYPE",
"value": {
"count": 5,
"typename": "ActionDescriptor"
},
"object": {
"postScriptColor": {
"stringID": "postScriptColor",
"charID": "PstS",
"id": 1349743699,
"key": 0,
"type": "DescValueType.BOOLEANTYPE",
"value": true
},
"intent": {
"stringID": "intent",
"charID": "Inte",
"id": 1231975525,
"key": 1,
"type": "DescValueType.ENUMERATEDTYPE",
"value": "colorimetric",
"enumerationType": "intent"
},
"printSixteenBit": {
"stringID": "printSixteenBit",
"charID": "",
"id": 2695,
"key": 2,
"type": "DescValueType.BOOLEANTYPE",
"value": false
},
"printerName": {
"stringID": "printerName",
"charID": "",
"id": 1183,
"key": 3,
"type": "DescValueType.STRINGTYPE",
"value": "Lexmark X954"
},
"printProofSetup": {
"stringID": "printProofSetup",
"charID": "",
"id": 2696,
"key": 4,
"type": "DescValueType.OBJECTTYPE",
"value": {
"count": 1,
"typename": "ActionDescriptor"
},
"object": {
"builtin": {
"stringID": "builtin",
"charID": "Bltn",
"id": 1114403950,
"key": 0,
"type": "DescValueType.ENUMERATEDTYPE",
"value": "proofCMYK",
"enumerationType": "builtinProof"
}
}
}
}
},
"center": {
"stringID": "center",
"charID": "Cntr",
"id": 1131312242,
"key": 41,
"type": "DescValueType.OBJECTTYPE",
"value": {
"count": 2,
"typename": "ActionDescriptor"
},
"object": {
"horizontal": {
"stringID": "horizontal",
"charID": "Hrzn",
"id": 1215461998,
"key": 0,
"type": "DescValueType.UNITDOUBLE",
"value": 25
},
"vertical": {
"stringID": "vertical",
"charID": "Vrtc",
"id": 1450341475,
"key": 1,
"type": "DescValueType.UNITDOUBLE",
"value": 39.5
}
}
},
"hasBackgroundLayer": {
"stringID": "hasBackgroundLayer",
"charID": "",
"id": 3029,
"key": 42,
"type": "DescValueType.BOOLEANTYPE",
"value": false
},
"generatorSettings": {
"stringID": "generatorSettings",
"charID": "",
"id": 3016,
"key": 43,
"type": "DescValueType.OBJECTTYPE",
"value": {
"count": 0,
"typename": "ActionDescriptor"
},
"object": {
}
},
"targetPathVisibility": {
"stringID": "targetPathVisibility",
"charID": "",
"id": 3056,
"key": 44,
"type": "DescValueType.BOOLEANTYPE",
"value": true
},
"guidesVisibility": {
"stringID": "guidesVisibility",
"charID": "",
"id": 3057,
"key": 45,
"type": "DescValueType.BOOLEANTYPE",
"value": true
},
"smartGuidesVisibility": {
"stringID": "smartGuidesVisibility",
"charID": "",
"id": 3058,
"key": 46,
"type": "DescValueType.BOOLEANTYPE",
"value": true
},
"rulersVisibility": {
"stringID": "rulersVisibility",
"charID": "",
"id": 3059,
"key": 47,
"type": "DescValueType.BOOLEANTYPE",
"value": false
}
}
That id is only the property's id, not the document id. As you can see in the object above, there is a "documentID" property which has the correct document id value.
What's interesting here is that you got a "document" property in your descriptor object, which should be a DescValueType.REFERENCE. That reference should be the document descriptor, but instead it's returned as a RAWTYPE. I've only seen RAWTYPE descriptors when the property is "legacyContentData", but this seems different. I still haven't figured out how to read those values.
Here's a post Davide started a while ago. Michael Hale had a way of reading these values, but I just don't get it yet.