Thanks for considering Aspose.
We are more than glad to provide you some demo code to demonstrates how to use Aspose.BarCode to insert image to pdf documents. Here are some points we need to make clear:
1) Which product you are using to create the pdf document? Aspose.BarCode provides the function to generate the barcode images in bmp format. If you control supports to insert the bmp image, you can use the BitmapImage property to get the bitmap and insert it to the pdf doc. The following is a demo for Aspose.BarCode and Aspose.Pdf
Me.BarCodeControl1.Resolution.DpiX = 96.0F
Me.BarCodeControl1.Resolution.DpiY = 96.0F
'//Save the barcode image to memorystream
Dim mstream As System.IO.MemoryStream = New System.IO.MemoryStream
Dim pdfFile As New Aspose.Pdf.Pdf
Dim section As Aspose.Pdf.Section = pdfFile.Sections.Add()
'//Insert BarCode Image into pdf
Dim image1 As New Aspose.Pdf.Image
image1.ImageInfo.ImageFileType = Aspose.Pdf.ImageFileType.MemoryBmp
image1.ImageInfo.OpenType = Aspose.Pdf.ImageOpenType.Memory
image1.ImageScale = 0.5
Dim reader As System.IO.BinaryReader = New System.IO.BinaryReader(mstream)
mstream.Position = 0
image1.ImageInfo.MemoryData = reader.ReadBytes(mstream.Length)
'//Save the pdf file
2) It is suggest not to save the barcode image to database, instead you can only save the data that is encoded in the barcode image. And then you can get the data from sql server, and re-generate the barcode image by Aspose.BarCode. Therefore, we can save lots of network transferring and the space of the database.
The attachment of the mail is the demo about how insert barcode to pdf document with Aspose.BarCode and Aspose.Pdf, hope it makes sense.
Feel free to access me with any problems.