Page 1 of 1

Annot Status not saved when exporting...

Posted: Tue Dec 12, 2017 9:47 pm
by lidds
I am using the exportCommentsAndFields method and it does not seem to save the annotation status??

Thanks

Simon

Re: Annot Status not saved when exporting...

Posted: Wed Dec 13, 2017 5:58 am
by Sasha - Tracker Dev Team
Hello Simon,

Can you provide a code sample on how you are using this operation?

Cheers,
Alex

Re: Annot Status not saved when exporting...

Posted: Wed Dec 13, 2017 8:23 am
by lidds
Alex,

I am exporting the annotations like so:

Code: Select all

Dim nID As Integer = pxvInst.Str2ID("op.document.exportCommentsAndFields")
            Dim pOp As PDFXEdit.IOperation = pxvInst.CreateOp(nID)
            Dim input As PDFXEdit.ICabNode = pOp.Params.Root("Input")
            input.v = Me.docPreview.Doc

            Dim fsInst As PDFXEdit.IAFS_Inst = DirectCast(Me.docPreview.Inst.GetExtension("AFS"), PDFXEdit.IAFS_Inst)
            Dim destPath As PDFXEdit.IAFS_Name = fsInst.DefaultFileSys.StringToName(MISData.Instance.DocShareName & "\Annotations\" & annotationFileOID.ToString & ".fdf")

            Dim output As PDFXEdit.ICabNode = pOp.Params.Root("Output")
            output.v = destPath

            Dim options As PDFXEdit.ICabNode = pOp.Params.Root("Options")
            options("ExportAnnots").v = True
            options("ExportFields").v = True
            options("DestFile").v = destPath
            pOp.Do()
And importing the annotation file like so:

Code: Select all

    Public Sub importComments(ByVal annotationFileOID As String)
        Dim nIDImport As Integer = pxvInst.Str2ID("op.document.importCommentsAndFields", False)
        Dim opImport As PDFXEdit.IOperation = pxvInst.CreateOp(nIDImport)
        Dim inputImport As PDFXEdit.ICabNode = opImport.Params.Root("Input")
        inputImport.v = Me.docPreview.Doc
        Dim optionsImport As PDFXEdit.ICabNode = opImport.Params.Root("Options")
        optionsImport("FileName").v = MISData.Instance.DocShareName & "\Annotations\" & annotationFileOID & ".fdf"
        opImport.Do()
    End Sub
Thanks

Simon

Re: Annot Status not saved when exporting...

Posted: Wed Dec 13, 2017 9:06 am
by Sasha - Tracker Dev Team
Hello Simon,

Can you confirm that the export to FDF does not export the status. or the import from the FDF does not import the exported status?

Cheers,
Alex

Re: Annot Status not saved when exporting...

Posted: Wed Dec 13, 2017 10:05 am
by lidds
Alex,

Have just figured out these is a problem with my code on another method. Please ignore this thread.

Sorry

Simon

Re: Annot Status not saved when exporting...

Posted: Wed Dec 13, 2017 10:07 am
by Sasha - Tracker Dev Team
:)