Problem Creating Assets with AssetManager



So I have found a fix for this problem but I wanted to know why its happening and if it means my implementation is wrong somewhere.

I am using AssetManager from the package and creating PDF assets with the line:

assetManager.createAsset(path, inputStream, "application/pdf", true);

Although they are being created and show up in the forms portal they don't have all the functionality that a pdf form has if I just manually upload it through the portal itself. The only options I have are to select the form and download it, if I then attempt to download the form as a binary file I get the error "Unable to detect the asset type".

I looked at the differences between manually loaded assets and my created asset and the solution for me was adding the property:

name: pdfForm

type: long

value: 1

to the jcr:content node under the new asset.

I'm mostly curious if this is just an accepted problem or If it gets the type somewhere other than mimetype: application/pdf.

Accepted Solutions (1)

Accepted Solutions (1)



As Mayank Gandhi​ has already said - you have to use the AEM Forms asset services to upload your PDF for Forms Portal to see the additional metadata. Reason is, they are two different upload services and the AEM Forms asset service adds in extra metadata to the PDF. They both share the same DAM workflow process to extract the rest of the metadata from the PDF when putting it into the DAM.

The AEM Forms Asset handler is located somewhere in com.adobe.livecycle.formsmanagement package I think which I am not sure has a public API.

Answers (1)

Answers (1)




The supported method for import/export of assets to forms portal is listed in the below-mentioned document. However, I would like to know what is the expected end result you seek, is it the pdf form working or using API for the asset creation?

Adobe Experience Manager Help | Importing and exporting assets to AEM Forms