03-05-2012 10:59 AM
08-06-2012 10:05 PM
For instance, say I have a test pdf form, created in Livecycle, with a field in it named "testData". If I also had defined in our content model an aspect: "my:testAspect" with a property "my:testData", would extracting common metadata on the pdf cause it to gain the my:testAspect aspect with the my:testData property set to whatever was entered in the form field? (without further modification)My prototype was developed using a content type with specific properties. I am pretty sure that the aspect will be added and the field mapped to the aspect property as you suggest.
<!– This adds in the extra mapping for the Open Document extractor –>
<bean id="extracter.PDFBox" class="org.alfresco.repo.content.metadata.PdfBoxMetadataExtracter" parent="baseMetadataExtracter">
<property name="inheritDefaultMapping">
<value>true</value>
</property>
<property name="mappingProperties">
<props>
<!– Metadata extraction –>
<prop key="namespace.prefix.cm">http://www.alfresco.org/model/content/1.0</prop>
<prop key="namespace.prefix.myns">http://www.acme.com/model/content/1.0</prop>
<!– My Namespace Project Model –>
<prop key="myns_projectName">myns:projectName</prop>
<prop key="myns_organizationName">myns:organizationName</prop>
<prop key="myns_organizationAddress">myns:organizationAddress</prop>
</props>
</property>
</bean>
08-06-2012 11:35 PM
08-07-2012 07:33 AM
08-07-2012 08:50 AM
So does that work for you with properties entered only in the form fields (which is to say, does it work without the javascript from your other post setting custom properties from the form fields)?Nope, no JavaScript in the PDF Form here.
The only way I am able to get the test data out of the form (config as per my previous post) appears to be by setting a custom property. If I use liveCycle to add a custom property called testData, whatever I put in for the value of that property is used as metadata by Alfresco. So that, at least, works. However I do not get anything from form fields named testData. I tried to implement the javascript from your other post, I'm not sure if we use a different version or what, but as far as I can tell, the this.info object (from the scope of a field) doesn't exist. I tried form.info and xfa.info and a few others but to no avail.
08-16-2012 02:45 AM
WARN [content.metadata.AbstractMappingMetadataExtracter] [http-8443-6] Metadata extraction failed (turn on DEBUG for full error):
Extracter: org.alfresco.repo.content.metadata.PdfBoxMetadataExtracter@ae747d3
Content: ContentAccessor[ contentUrl=store://2012/8/16/15/6/51db06bc-26e2-4871-a613-5e25e823ffac.bin, mimetype=application/pdf, size=50453, encoding=UTF-8, locale=en_US]
Failure: Can't get signature as String, use getSignature() instead.null
while(fIter.hasNext()){
PDField field = (PDField)fIter.next();
String checkFieldType = field.getFieldType();
if (checkFieldType != "Sig") {
addMetadata(metadata, field.getFullyQualifiedName(), field.getValue());
}
}
I realize this could have been accomplished on a single line (if (field.getFieldType() != "Sig") ), I just did it this way because it was easier to debug with breakpoints.Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.