Answered
acrobatのSDKを使い、プラグイン開発をしていますが、わからないところがあるので、教えてください。下記のコードは3D注釈を追加するためのコードの一部です。その中でpdAnnot及び、cosAnnotの値が a=-1073741824 b=45 となり,その後のコードでacrobat上で”文書読み取り中にエラーが発生しました。(44)”となってしまいます。a=-1073741824は異常と思いますが、なにがいけないのでしょうか?わかる方がいましたらよろしくお願いします。
PDPage pdPage = AVDocGetPageView(avDoc) ? AVPageViewGetPage(AVDocGetPageView(avDoc)) : NULL;
ASAtom annotSubtype = ASAtomFromString("3D");
ASFixedRect initialRect = { ASInt16ToFixed(0), ASInt16ToFixed(50), ASInt16ToFixed(50), ASInt16ToFixed(100) };
PDAnnot pdAnnot = PDPageAddNewAnnot(pdPage, annotSubtype, PDPageGetNumAnnots(pdPage), &initialRect);
CosDoc cosDoc = PDDocGetCosDoc(pdDoc);
CosObj cosAnnot = PDAnnotGetCosObj(pdAnnot);
This topic has been closed for replies.
The contents of PDAnnot and CosObj are "opaque". This means, Acrobat keeps them there and we cannot know the meaning. I can tell you that the value a=-1073741824 b=4 looks perfectly normal. You can check the Cos object values with CosObjGetType, CosObjGet...Value etc.
To get more details with an error like "Problem reading a document (44) you can use Ctrl+OK (hold down Ctrl key and click OK). The error is more detailed, but still does not tell you where is the fault. I cannot see anything in this piece of code which will damage a PDF.
Sign up
Already have an account? Login
To post, reply, or follow discussions, please sign in with your Adobe ID.
Sign inSign in to Adobe Community
To post, reply, or follow discussions, please sign in with your Adobe ID.
Sign inEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.
