Patagames PDFium报错:指定目标已被其他对象占用
Patagames PDFium 错误排查求助
使用Patagames PDFium(非Google官方版本)时触发以下错误:System.ArgumentException: 'The specified destination is already in use by another object'
操作场景
将LinkAnnotationNEW直接赋值为原LinkAnnotation实例后,执行设置跳转动作的代码时触发该错误。
已尝试操作
移除原注释并添加新注释,但问题仍未解决。目前怀疑需要先清除LinkAnnotationNEW.Link.Annotation关联的内容,但不确定具体操作方式。
相关VB代码
LinkAnnotationNEW = LinkAnnotation Dim thePdfDest = New PdfDestination(Nothing, OLDdestination) thePdfDest = LinkAnnotation.Link.Destination Dim fileSpec As New PdfFileSpecification(theDocument) fileSpec.FileName = OLDfileNameDirectory & sheetFileNameNEWannotation LinkAnnotationNEW.Link.Action = New PdfGoToRAction(theDocument, fileSpec, thePdfDest) Page.Annots.Remove(LinkAnnotation) Page.Annots.Add(LinkAnnotationNEW)
相关截图




内容的提问来源于stack exchange,提问作者Ralph Diehl
相关产品推荐
相关产品推荐

