Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Combining CosObjs

Community Beginner ,
Sep 13, 2016 Sep 13, 2016

I am creating a signature plugin (based on the DocSign sample) and I want the appearance to include a graphic, for which I can use DigSigAPXObjectFromLogo, and some text, for which I can use DigSigAPCreateCompositeTextXObj.

Is there any way to combine the CosObj objects from those 2 functions into a single CosObj? If not, what's the best way to achieve my goal?

Thanks

TOPICS
Acrobat SDK and JavaScript
355
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 13, 2016 Sep 13, 2016

I've never used the API, but are the Cos objects each Form XObjects? If so you can make a third Form XObject which includes the other two as Resources and has a pretty short and trivial page stream. No special API for this, just creating streams, dictionaries etc.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Sep 13, 2016 Sep 13, 2016

It appears the Cos objects are indeed Form XObjects.

Unfortunately, I'm very much a newcomer to the Acrobat SDK and not familiar with the API for creating streams, dictionaries etc. I would be grateful for any suggestions where to start looking, or better yet sample code you could point me towards.

Thanks

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 13, 2016 Sep 13, 2016
LATEST

You'd use APIs like CosNewStream, CosNewDict, CosDictPutString and more. But before you can do that you need to know EXACTLY the structure of Form XObjects, all their keys and values, and how to create page streams with marking operators. The chapter "Graphics" in 32000-1 is crucial. Once you have this, the use of the Cos API should flow from it.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines