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

Free Support Forum - aspose.com

Strip https:// from codeText in label

I’m producing a QR code with the code below.
Is it possible to strip away the “https://” part of the url and have the textual representation read domain.com/yfD8s?

var url = "https://domain.com/yfD8s";
var builder = new BarCodeBuilder
    QREncodeMode = QREncodeMode.Auto,
    EncodeType = EncodeTypes.QR,
    QRErrorLevel = QRErrorLevel.LevelL,
    CodeText = url,
    CodeTextFont = new Font(FontFamily.GenericSerif, 6),
    ImageQuality = ImageQualityMode.AntiAlias,
    Resolution = new Resolution(800, 400, ResolutionMode.Customized),
    QREncodeType = QREncodeType.Auto,
    CodeLocation = CodeLocation.Below,
    Margins = new MarginsF(5, 5, 3, 3)
builder.Save(fileName, imageFormat);


There is no way to truncate or trim text from CodeText property. You have to do it yourself before supplying it to BarCodeBuilder object.

thanks for your reply. I will put the text on the produced image using gdi


Thank you for update.