Free Support Forum -

Custom barcode


I have the requirement to draw a custom barcode. The sample of the barcode can be seen in the attachment.

*) Basically we will produce reports in the landscape format (not portrait format).

*) The reports will be printed in double sided. It means that both side of paper will have the contents.

*) The barcode will be drawn at the bottom right corner of the report. Remember that the reports will be printed in double sided, but the barcode will be only printed in the one side of the paper.

*) The barcode will be printed in vertical format based on our pre defined logic.

*) The horizontal and position of the barcode will be hard coded.

*) the vertical line will only have one thickness size.

Based on my research in the Aspose barcode product, i cannot find suitable format. I would like to know whether it's possible to draw custom barcode using Aspose and what is the advantage of using your product instead of drawing it manually through .NET


hadi teo


Thanks for the inquiry. First off, please note that barcodes generated by Aspose.BarCode for .NET can be customized e.g. size, fore color, back color, codetext location, angle, caption (color, location and size) etc. It is ideal for generating barcodes for the most common barcoding application needs. It would be great if you can share some details i.e How are you trying to use Aspose.Barcode for .net component in crystal reports

In addition, I would like to suggest you to visit documentation links below:


sorry for the late reply.

Let me furnish more with some information.

1) Since the barcode will be rendered uniquely in each pages based on the total number of pages, i will use the logic inside .NET application to render them

2) Let's say i have a method called RenderOMR. Below is the definition of the method

public PdfDocument RenderOMR(PdfDocument sourcePdfDocument).

3) I will use this method to consume a PDF document and render the OMR barcode on each individual pages and generate the PDF result. Below is the code snippet of the logic

public PdfDocument RenderOMR(PdfDocument sourcePdfDocument)


List resultPDF = new List;

foreach(Page currentPage in sourcePdfDocument.Pages)


Page resultPage = RenderOMR(currentPage.PageNumber)



return resultPDF;


4) the application will be in .NET 4.0

5) If possible , will you be able to give sample code snippet by using my above logic. Let's say, try to render 8 simple vertical lines.

Thanks for your help.

hadi teo


Thank you for your inquiry. I would like to update you that Aspose.BarCode product does not support OMR barcodes because OMR barcodes are not really a standard. From your step one, you can do some custom app to draw it and then you can add its image in an existing PDF file by using following code snippet:

So I’ll suggest you to go through the images part of documentation here:

If it does not help you then please let me know, I can move this forum thread to Aspose.Pdf forum where one of my colleagues will guide you accordingly. Please also note that Aspose.Pdf component contains separate dlls for each .net framework. You need to add reference of appropriate dll. For more details please check readme text file after downloading Dlls only.
Aspose.BarCode for .NET (Latest Version)