(Too long for comments ...)
As Ryan mentioned, this may be possible using DDX. The cfpdf
documentation lists Metadata
as a supported item. So you can first examine this parameter.
I found a potential iTextSharp / C # solution
However, there is no need to use an external C # library. CF is already associated with the old version of iText (written in java). Therefore use java classes. iTextSharp is the port of the java source library, so class and method names will usually be the same.
source = "c:/path/to/input.pdf"; target = "c:/path/to/output.pdf"; reader = createObject("java", "com.lowagie.text.pdf.PdfReader").init( source ); output = createObject("java", "java.io.FileOutputStream").init( target ); stamper = createObject("java", "com.lowagie.text.pdf.PdfStamper").init( reader, output ); copyrightName = "YOUR NAME HERE"; copyrightUrl = "http://www.example.com/"; baos = createObject("java", "java.io.ByteArrayOutputStream").init(); xmp = createObject("java", "com.lowagie.text.xml.xmp.XmpWriter").init(baos); xmp.addRdfDescription("xmlns:dc=""http://purl.org/dc/elements/1.1/""", "<dc:rights><rdf:Alt><rdf:li xml:lang=""x-default"">"& copyrightName &"</rdf:li></rdf:Alt></dc:rights>"); xmp.addRdfDescription("xmlns:xmpRights=""http://ns.adobe.com/xap/1.0/rights/""" , "<xmpRights:Marked>True</xmpRights:Marked><xmpRights:WebStatement>"& copyrightUrl &"</xmpRights:WebStatement>"); xmp.close(); stamper.setXmpMetadata(baos.toByteArray()); stamper.close();
Leigh source share