Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.
Mon Feb 21, 2022 8:58 pm
After updating Spire.Doc to v. 10.1.14 we have problems with converting pages to images. Such code brings different results for 9.11.6 and 10.1.14
Fonts looks not in appropriate way.
- Code: Select all
string file = GetFile("20220104_Spire_Pdf_Problem_p1.docx", System.Reflection.MethodBase.GetCurrentMethod());
LicenceManager.SetSpireDoc();
Document document = new Document(file);
document.UseNewEngine = true;
Document documentResult = new Document();
var section = documentResult.AddSection();
section.PageSetup.Margins.Top = 0f;
section.PageSetup.Margins.Bottom = 0f;
section.PageSetup.Margins.Left = 0f;
section.PageSetup.Margins.Right = 0f;
Image[] images = document.SaveToImages(Spire.Doc.Documents.ImageType.Bitmap);
document.Close();
foreach (var item in images)
{
Spire.Doc.Documents.Paragraph paragraph = section.AddParagraph();
paragraph.AppendPicture(item);
}
documentResult.SaveToFile(file.Replace(Path.GetFileNameWithoutExtension(file),
Path.GetFileNameWithoutExtension(file)+"_processed"), Spire.Doc.FileFormat.Docx);
Login to view the files attached to this post.
-
Kazax_Kazax
-
- Posts: 13
- Joined: Tue Nov 30, 2021 4:58 pm
Tue Feb 22, 2022 6:27 am
Hello,
Thanks for your inquiry!
Yes, I did reproduce your problem with the latest Spire.Doc 10.1.14. I have logged this issue into our tracking system using the ticket SPIREDOC-7432 and have given it a high priority. Our development team will investigate and fix it further. Sorry for the inconvenience caused.
Sincerely,
William
E-iceblue support team
-
William.Zhang
-
- Posts: 203
- Joined: Mon Dec 27, 2021 2:23 am