Free Support Forum - aspose.com

Append to PDF?

can you append to an allready created pdf? I tried to use your writing directly to example with variations, but it does not seem to work.
any suggestions with these code?

Public Sub testaddpdf()

Dim tempPath As String = Server.MapPath(“Temp”)

Dim fs As FileStream = New FileStream(tempPath + “/latest.pdf”, FileMode.Append)

Dim mypdf As New Pdf(fs)

Dim newsec As Section = mypdf.Sections.Add

Dim t As Aspose.Pdf.Text = New Aspose.Pdf.Text(“new section new text testing”)

newsec.Paragraphs.Add(t)

mypdf.Close()

end Sub

I corrected part of the code as I see you need to use addparagraph and this works, but it over writes the all ready created sections, so my question still is if you created a chart using regular mode, can you then add to it at runtime using direct to file?

thanks
here is new code
Public Sub testpdf()

Dim tempPath As String = Server.MapPath(“Temp”)

Dim filestring As String = tempPath + “\chart.pdf”

’ Response.Redirect(filestring)

’ Response.End()

Dim fs As FileStream = New FileStream(filestring, FileMode.Append)

Dim mypdf As New Pdf(fs)

Dim newsec As Section = mypdf.Sections.Add

Dim t As Aspose.Pdf.Text = New Aspose.Pdf.Text(“new section new text testing”)

'this adds paragraph, but over writes two other sections i all ready have’
newsec.AddParagraph(t)

mypdf.Close()

End Sub

Dear bsarram,

Thank you for considering Aspose.

Appending to existing pdf file is not supported in the current version. We are not working to support this function. It hopes to be available in late Oct.

ok thanks.