Hi,
we are still testing the Synfusion DocIO and Xamarin and WPF/Winforms Lib.
We using a xamarin-test-app to implament a dll (.net 2.0 with docio) to create a word document.
In emulator mode when we saving the word document with stream and rendering the pdf document the pdf creates 13 pages instead of 1!
When we installing the to normal (not emulatet) device the app runs perfect.
DataReader dataReader = new DataReader();
PdfCreator pdfCreator = new PdfCreator();
pdfCreator.CreateBMP(dataReader.SimpleData());
string filename = Path.Combine("/storage/emulated/0/Download/", "WPFDatei.docx");
pdfCreator.SaveApp(pdfCreator.MemoryStream, filename); // <- Save the worddocument to the device storage!
FileStream fileStream = new FileStream(filename, FileMode.Open, FileAccess.Read);
WordDocument wordDocument = new WordDocument(fileStream, Syncfusion.DocIO.FormatType.Docx);
DocIORenderer render = new DocIORenderer();
render.Settings.ChartRenderingOptions.ImageFormat = ExportImageFormat.Jpeg;
PdfDocument pdfDocument = render.ConvertToPDF(wordDocument);
render.Dispose();
wordDocument.Dispose();
MemoryStream outputStream = new MemoryStream();
string Pdffilename = Path.Combine("/storage/emulated/0/Download/", "word.pdf");
pdfDocument.Save(outputStream);
FileStream fileStreamPdf = new FileStream(Pdffilename, FileMode.Create, FileAccess.Write);
outputStream.WriteTo(fileStreamPdf);
fileStreamPdf.Close();
outputStream.Close();
FileStream openPdfStream = new FileStream(Pdffilename,FileMode.Open ,FileAccess.Read);
pdfViewerControl.LoadDocument(openPdfStream);
any idea?
The word document is broken to. Both Files has 13 pages but only in emulator mode on VS 2019!
Regards
Christian