I recently took an issue where a ColdFusion customer needed to build a feature to support their internal staff share comments on thousands of PDFs that were all scanned into their repository. The PDFs were all flat and the elements were images as the result of the scanning process.
The solution I came up with was to create a small pdf, I am calling menubar.pdf, that I could merge into the PDF in their repository using cfpdf. Then menubar.pdf would have the ability to submit the PDF back to the ColdFusion Server. Included below is the small piece of code required to merge in the menubar.pdf. I also placed the filename into the metadata which will be used when I send the PDF back to the ColdFusion Server.
<cfset pdfroot = "ENTER PDF WORKING DIRECTORY">
<cfset fname = "PDF NAME">
<cfpdf action = "merge" name = "mergedpdf" >
<cfpdfparam source="#pdfroot#/menubar.pdf" >
<cfpdfparam source="#pdfroot#/#fname#.pdf" >
<cfset newkeywords = StructNew()>
<cfset newkeywords.keywords = fname>
<!--- Add filename int the keyword metadata and save. --->
<cfpdf action="setinfo" info = "#newkeywords#" source="mergedpdf" destination="#pdfroot#/notes_#fname#.pdf" overwrite = "yes">
The result is a PDF that can now accept comments, and be submitted back to ColdFusion and saved on the server at anytime.
Below is the code which will capture the submitted PDF and returned the saved PDF with all the new comments.
The menubar can be as simple as a one button PDF. I built the menubar.pdf with LiveCycle Designer and I saved it as an Adobe Static PDF. The merge does if you save its with the default Adobe Dynamic PDF. Here is a screen shot of the simple PDF. You are looking at a PDF with one button that submits the entire PDF to the above capturepdf.cfm.