I’m trying to convert a stream to a PDF facades form via facades, rename the fields, and convert back. I’m able to do all but convert back to a stream. My code is below. What do I need to do to convert the updated form back to a stream in VB.NET?
Hi Regan,
Dim Stream As FileStream = New FileStream(“c:/pdftest/ICP
Chart_07072010.pdf”, FileMode.Open)<o:p></o:p>
' Dim Stream As System.IO.Stream = createStreamFromPDF(DataUtil.GetInt64(JsonParams("ObjectId")), ApplicationId, PropertyId)
Dim pdfFacades As New Aspose.Pdf.Facades.Form(Stream)
Dim allfields() As String = pdfFacades.FieldNames
For Each field In allfields
' Console.WriteLine(field.n)
Dim newfield As String = field.Remove(0, 2)
pdfFacades.RenameField(field, newfield)
Next
Dim memStream As MemoryStream = New MemoryStream()
pdfFacades.Save(memStream)
Console.WriteLine(memStream.Length)
My objective with this code is to remove the “0.” that for some reason is getting put in front of the field names, such as with field name “0.FirstName”. Hence the code below:
Hi Regan,
Hi. Thank you for your assistance. Please find a sample pdf attached, as well as the code to replicate the issue and a clarification of the problem below.
Hi Regan,
Thanks
for using our API’s.<o:p></o:p>
I
have tested the scenario and I am able to notice the same problem. For the sake
of correction, I have logged this problem as PDFNEWNET-39359 in
our issue tracking system. We will further look into the details of this
problem and will keep you updated on the status of correction. Please be
patient and spare us little time. We are sorry for this inconvenience.