Posted by a ceTe Software moderator
Hello,
Below sample code shows how to load the PDF byte array.
'read the PDF file into a byte array
Dim objStream
Set objStream = Server.CreateObject("ADODB.Stream")
objStream.Open
objStream.Type = 1 'Type of stream file
objStream.LoadFromFile Server.MapPath( "./DocumentB.pdf" )
Dim MyData
MyData = objStream.Read
'create a PdfDocument object
Dim pdf
Set Pdf = Server.CreateObject( "DynamicPdf.PdfDocument" )
'load the byte data into the PdfDocument
pdf.LoadPdf MyData
'create merge document using the PdfDocument
Dim MyDataDocument
Set MyDataDocument = Server.CreateObject( "DynamicPDF.Document" )
MyDataDocument.LoadPdf pdf
'draw to web page
MyDataDocument.DrawToWeb
Thanks,
ceTe Software Support Team.