Hi
I am evaluating spire.pdf, we are having issue exporting pdf to images, here is my code
PdfDocument pdf = new PdfDocument();
PdfPageBase page = pdf.Pages.Add(PdfPageSize.A1, new PdfMargins(0));
//PdfTrueTypeFont font = new PdfTrueTypeFont("Arial Unicode MS", 11f);
PdfCjkStandardFont font1 = new PdfCjkStandardFont(PdfCjkFontFamily.MonotypeSungLight, 11f);
page.Canvas.DrawString(teststring, font1, PdfBrushes.Red, 50, 50);
page.Canvas.DrawString("中國", font1, PdfBrushes.Red, 50, 70);
//pdf.SaveToFile(@"c:\temp\result.pdf");
using var stream = pdf.SaveAsImage(0);
Image image = null;
image = Image.FromStream(stream);
image.Save(@"C:\temp\sign.bmp");
image.Save(@"C:\temp\best.jpeg", System.Drawing.Imaging.ImageFormat.Jpeg);
// System.Diagnostics.Process.Start("result.pdf");
Both bmp and jpeg are not save correctly, please see the attachment
Second Question:
Is there anyway to do auto height, i don't know the exact height, can it base on how much height the string takes?