首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >pdf文档不显示的问题

pdf文档不显示的问题
EN

Stack Overflow用户
提问于 2016-02-09 00:26:24
回答 1查看 62关注 0票数 0

我们最近使用Aspose.pdf库为客户端编写了一些代码,在我的系统上,有问题的pdf打开得很好,并且大多数合并字段都已填写(我们没有确切的合并字段列表)。

他们告诉我,在他们的系统上,一些文档需要2-4分钟才能打开,而另一些则根本不打开。

文档根本无法打开的可能原因是什么?

我的代码如下:

代码语言:javascript
复制
' Load form
Dim doc As Aspose.Pdf.Document = New Aspose.Pdf.Document(sTemplateDir & sDocName)
'Get names of form fields
   Dim fields As Aspose.Pdf.InteractiveFeatures.Forms.Field() = doc.Form.Fields

   Dim sField As String
   Dim field As Aspose.Pdf.InteractiveFeatures.Forms.Field

If fields.Length > 0 Then
    For Each field In fields
    'Get name of field
    sField = field.FullName

    'If the merge field isn't valid then we'll just leave it and assume its a fill-in
         If nMergeCol.Contains(sField) And Not IsNothing(sField) Then
            field.Value = nMergeCol.Item(sField)
    End If
    Next
End If
EN

回答 1

Stack Overflow用户

发布于 2016-03-08 01:47:04

这个问题已经解决了!正如我们所怀疑的,这是客户端的Javascript在pdf文件中的问题。问题是在计算中使用了绝对值(name.value)。一旦切换到相对值(this.event.value),pdf文件就开始使用AsPose代码正常运行。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/35274425

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档