I am using spire.pdf dll and have a project which use bilingual when i convert image to pdf the text is wrong
First Photo is original.
Second is pdf
any suggestions.
thanks.
// Create a pdf document with a section and page added.
PdfDocument pdf = new PdfDocument();
PdfSection section = pdf.Sections.Add();
PdfPageBase page = pdf.Pages.Add();
//Load a image from system
PdfImage image = PdfImage.FromFile("Pdf.JPG");
//Set image display location and size in PDF
//Calculate rate
float widthFitRate = image.PhysicalDimension.Width / page.Canvas.ClientSize.Width;
float heightFitRate = image.PhysicalDimension.Height / page.Canvas.ClientSize.Height;
float fitRate = Math.Max(widthFitRate, heightFitRate);
//Calculate the size of image
float fitWidth = image.PhysicalDimension.Width / fitRate;
float fitHeight = image.PhysicalDimension.Height / fitRate;
//Draw image
page.Canvas.DrawImage(image, 0, 30, fitWidth, fitHeight);
string output = "output.pdf";
pdf.SaveToFile(output);
pdf.Close();