简体   繁体   中英

Issue with pdf docs not showing up

We recently wrote some code for a client using the Aspose.pdf library, on my system the pdf in question opened fine and most of the merge fields were filled in (we don't have the exact list of merge fields that they do).

They're telling me that on their system, some documents take 2-4 mins to open while others don't open at all.

What could be a possible cause of the document not opening at all?

My code is below:

' 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

This has been resolved! As we suspected, it was a problem with the client's Javascript within the pdf file. The problem was within the calculations the absolute value was being used (name.value). Once this was switched to the relative value (this.event.value) the pdf file began behaving correctly with the AsPose code.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM