We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Working with streams


Here is my requirement, We need to add barcode image to PDF stream. Is there any code snippet. I was looking in examples I am not able to find it.

We have both Aspose Barcde and Aspose PDF licenses.

Thanks for the help.


With Aspose.BarCode APIs you can generate barcode image. Aspose.Pdf APIs can be used to add that barcode image to PDF. Following is the required online documentation link:

Add Image to Existing PDF File

Please visit the link for details. Feel free to contact us in case of any query or comments.

How to save Document Object into output stream ?

Here are the steps to add Image to stream ( Please cross check ) :slight_smile:

  1. converted input stream to Document object
  2. added image to document object.
  3. Now I need to return this document object as outputstream ?

Please help me on this.


The Save method of Aspose.Pdf.Document class comes with its overloads. You may try Save(Stream output) or Save(Stream outputStream, SaveFormat format) method. Overload method Save(Stream outputStream, SaveOptions options) is also available.