Ryan J February 2016

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

Answers


Ryan J March 2016

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.

Post Status

Asked in February 2016
Viewed 3,155 times
Voted 5
Answered 1 times

Search




Leave an answer