添加项目文件。

This commit is contained in:
李捷
2025-07-12 16:20:14 +08:00
parent 67f108002e
commit fa5bf23c08
35 changed files with 1574 additions and 0 deletions

View File

@ -0,0 +1,36 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JingGong.Abp.Print.GoDEX
{
/// <summary>
/// 按base64打印图片
/// </summary>
public class GoDEXPrintBase64Image : GoDEXPrintImage
{
/// <summary>
/// Base64数据
/// </summary>
public string ImageBase64 { get; set; }
/// <summary>
/// 获取图片数据
/// </summary>
/// <returns></returns>
protected override byte[] GetImageData()
{
var base64Content = ImageBase64;
// 检查是否包含 Base64 前缀
if (base64Content.Contains("base64,"))
{
// 去除 "data:image/<format>;base64," 头部信息
base64Content = base64Content.Substring(base64Content.IndexOf(",") + 1);
}
return Convert.FromBase64String(base64Content);
}
}
}