Welcome to the ASP.NET MVC feedback portal. We’re happy you’re here! If you have feedback on how to improve the ASP.NET MVC, we’d love to hear it!

  • Check out the features or bugs others have reported and vote on your favorites. Feedback will be prioritized based on popularity.
  • If you have feedback that’s not listed yet, submit your own.

Thanks for joining our community and helping improve Syncfusion products!

1
Vote
below is the capture for two case.
left have more Chinese, but few non-Chinese chars, it draws OK.
rithg part  have more non-Chinese chars, will leave many empty are for the draw rect.

The different only is the text with more or less non-Chinese chars.

you can try some text like:

  1. 大中华汉字测试 - 中文邮箱测试 - 012345678

  2. 大中华汉字- [email protected] - 012345678


Empty


our code like:


font = new PdfCjkStandardFont(PdfCjkFontFamily.SinoTypeSongLight, watermarkConfig.fontSize);
foreach (var po in pos)
{
    PdfGraphicsState state = graphics.Save();
    graphics.TranslateTransform(po.midpointX, po.midpointY);
    graphics.SetTransparency(watermarkConfig.transparency);
    graphics.RotateTransform(angle);
    graphics.DrawRectangle(PdfBrushes.Red, new RectangleF(-(po.len / 2), -(wmheight / 2), po.len, wmheight));//draw the rectangle.
    graphics.DrawString(wmstring, font, color, new RectangleF(-(po.len / 2), -(wmheight / 2), po.len, wmheight), format);//draw the text
    graphics.Restore();
}

Thanks.