Loading...

Add Barcode to PDF

Support for GdPicturePDF Plugin.

Add Barcode to PDF

Postby wnstillman » Thu Sep 22, 2011 5:29 am

We need to add a barcode to an Existing PDF. We added the following snippet of code but do not see the barcode.
Dim oGdPicturePDF As New GdPicturePDF
gdpicturestatus = oGdPicturePDF.DrawBarcode1D(Barcode1DWriterType.Barcode1DWriterCode39, "Test", 10, 10, 250, 80, Color.Black)
the return status code is Generic Error {1}
Can you tell me what we did wrong or give me an example of how to add the barcode?
wnstillman
 
Posts: 8
Joined: Fri Dec 11, 2009 8:28 pm

Re: Add Barcode to PDF

Postby Loïc » Thu Sep 22, 2011 11:51 am

Hi,

Here a snippet:

Code: Select all
     
      Dim oGdPicturePDF As New GdPicturePDF
      oGdPicturePDF.LoadFromFile("c:\test.pdf", False)
      oGdPicturePDF.SelectPage(1)
      oGdPicturePDF.SetMeasurementUnit(PdfMeasurementUnit.PdfMeasurementUnitCentimeter)
      oGdPicturePDF.SetOrigin(PdfOrigin.PdfOriginTopLeft)
      oGdPicturePDF.DrawBarcode1D(Barcode1DWriterType.Barcode1DWriterCode128, "0123456789", 1, 1, 5, 1, Color.Red)
      oGdPicturePDF.SaveToFile("c:\test2.pdf")



Let me know if you need further information.

Kind regards,

Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4445
Joined: Tue Oct 17, 2006 10:48 pm
Location: France


Return to GdPicture PDF Plugin

Who is online

Users browsing this forum: No registered users and 0 guests

cron