I'd like to run a scenario by you and see if this is possible. A user creates a document in Word or other text editor software that has all their annotations on it and that gets converted to pdf. That is then loaded into the PDF-XChange Editor SDK in our software by the user, and they add form fields to it. That then gets saved as a pdf blob in our db. Lets then say they want to change some of the annotations to that pdf back in their text editor software but they want to retain those form fields they had added to the pdf. The only way I know how they would be able to make changes to those annotations, would be to go back to their original text editor document, make changes to it, convert to pdf, then load into the SDK. But, they would lose all the form fields they had added on before.
My questions is, is there some way I can separate the annotations pdf that came from their text editor software, from the form fields they added to it, and save both to our db separately, and then merge them two whenever they open the document? And if they wanted to make changes to the annotations document, they would go back to the text editor, make changes, convert to pdf, and load that back up into the SDK, and then be able to load the separated form fields from the db, onto the new annotations pdf? This way they don't lose the form fields every time they make changes to the annotations pdf?
If I'm thinking about this wrong, or you have a better suggestion, that would be great as well!
This is my attempt at it, but to no avail.
Code: Select all
PDFXEdit.IPXV_Inst ipxvInst = pdfCtl.Inst; int nID = ipxvInst.Str2ID("op.document.exportCommentsAndFields"); PDFXEdit.IOperation pOp = ipxvInst.CreateOp(nID); PDFXEdit.ICabNode input = pOp.Params.Root["Input"]; input.v = pdfCtl.Doc; PDFXEdit.IAFS_Name destPath = fsInst.DefaultFileSys.StringToName(tDestToSave.Text); PDFXEdit.ICabNode output = pOp.Params.Root["Output"]; output.v = destPath; PDFXEdit.ICabNode options = pOp.Params.Root["Options"]; options["ExportAnnots"].v = false; options["ExportFields"].v = true; options["DestFile"].v = destPath; pOp.Do();