Hello, I am trying to convert a document to PDF using Syncfusion.DocIO.Portable. However, it conflicts with Syncfusion.DocIO.UWP (SfRichTextBoxAdv). Do you have any ideas how to solve this? We can't remove
Syncfusion.DocIO.UWP (SfRichTextBoxAdv) since we've been using this in our project. Thanks~
Please see the error below :
The type 'WordDocument' exists in both 'Syncfusion.DocIO.Portable, Version=19.2200.0.47, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89' and 'Syncfusion.DocIO.UWP, Version=19.2460.0.47, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89'
|
UWP |
Portable |
|
Syncfusion.DocIO.UWP.dll |
Syncfusion.DocIO.Portable.dll |
|
SfRichTextBoxAdv UWP |
WordDocument to PDF conversion UWP |
|
1. Syncfusion.DocIO.UWP
2. Syncfusion.OfficeChart.UWP
3. Syncfusion.SfRadialMenu.UWP
4. Syncfusion.SfRichTextBoxAdv.UWP
5. Syncfusion.SfShared.UWP |
1. Syncfusion.DocIO.Portable 2. Syncfusion.Compression.Portable 3. Syncfusion.OfficeChart.Portable 4. Syncfusion.Pdf.Portable 5. Syncfusion.DocIORenderer.Portable 6. SkiaSharp 7. Syncfusion.SkiaSharpHelper.Portable |
Hello Kalaivannan,
Thank you for your response.
I have a question, since we cannot use nugget, how can we get the assemblies we needed?
Should we install the Syncfusion Essential Studio for us to get these assemblies?
Thank you.
Hello
Kalaivannan Ganesa,
It's me again, Dennis.
I have a question regarding the conversion of files (specifically on excel) to PDF.
We have observed that big filesize files take some time in conversion.
For example, a 1.57MB excel file with many worksheets and complex format takes so much time and the result is not successful. It throws an
Stacktrace:
at Syncfusion.XlsIO.Calculate.CalcEngine.SaveStrings(String& text)
at Syncfusion.XlsIO.Calculate.CalcEngine.Parse(String text)
at Syncfusion.XlsIO.Calculate.CalcEngine.ParseAndComputeFormula(String formula)
at Syncfusion.XlsIO.Implementation.CFApplier.CheckAndApplyConditionFormula(IConditionalFormat format, IRange cell, ExtendedFormatImpl xf, String formatFirstFormula)
at Syncfusion.XlsIO.Implementation.CFApplier.CheckAndApplyConditionFormula(IConditionalFormat format, IRange cell, ExtendedFormatImpl xf)
at Syncfusion.XlsIO.Implementation.CFApplier.CheckAndApplyCondition(IConditionalFormat format, IRange cell, ExtendedFormatImpl xf)
at Syncfusion.XlsIO.Implementation.CFApplier.MergeCF(ConditionalFormats format, ExtendedFormatImpl xf, IRange cell)
at Syncfusion.XlsIO.Implementation.WorksheetImpl.ApplyCF(IRange cfRange)
at Syncfusion.XlsIORenderer.ExcelToPdfConverter.DrawSheet(IWorksheet wkSheet, IRange[] printAreas)
at Syncfusion.XlsIORenderer.ExcelToPdfConverter.DrawWorkSheet(IWorksheet worksheet, Int32 sheetsCount, LayoutOptions layoutOptions)
at Syncfusion.XlsIORenderer.ExcelToPdfConverter.ConvertDocument()
at Syncfusion.XlsIORenderer.ExcelToPdfConverter.Convert()
at Syncfusion.XlsIORenderer.ExcelToPdfConverter.Convert(XlsIORendererSettings converterSettings)
at Syncfusion.XlsIORenderer.XlsIORenderer.ConvertToPDF(IWorkbook workbook, XlsIORendererSettings converterSettings)
Now, my question is, is it possible to cancel the conversion after a certain period of time thru CancellationTokenSource?
I checked the dll, the ConvertToPDF
method do not accept
CancellationTokenSource.
Thank you!
Hoping for your response. :)
Basically what I want to achieve is to cancel the conversion after e.g. 5 seconds.
Hello Konduru Keerthi Konduru Ravichandra Raju,
My apologies for the late reply.
RE: https://help.syncfusion.com/file-formats/xlsio/faqs/how-to-overcome-stackoverflow-exception-with-iworksheet-calculate?cs-save-lang=1&cs-lang=uwp
May I ask how to properly incorporate this setting. I cannot successfully use the code snippet from the example.
Below is a screenshot of the method :
Syncfusion XlsIO version is 19.2200.0.44
Thank you~
Hello
Konduru Keerthi Konduru Ravichandra Raju,
Thank you for your response.
I have observed that if the excel file has no calculation, just a plain excel file, it throws
Exception thrown: 'System.NullReferenceException' in worksheet.EnableSheetCalculations();
For the other excel file with computation, it throws :
Exception thrown: 'System.ArgumentException' in Syncfusion.XlsIO.Portable.dll
Exception occured: Syncfusion.XlsIO.Portable mismatched string quotes
same stacktrace as above.
Is there a way where I can cancel the conversion in ConvertToPDF method for a certain period of time as I have mentioned above.
Thanks a lot.
Sometimes it also throws Exception thrown: 'System.OutOfMemoryException' in Syncfusion.Pdf.Portable.dll :
at Syncfusion.Pdf.Graphics.Fonts.UnicodeTrueTypeFont..ctor(Stream font, Single size, CompositeFontType type, String name)
at Syncfusion.Pdf.Graphics.PdfTrueTypeFont.CreateFontInternal(Stream fontStream, PdfFontStyle style)
at Syncfusion.XlsIORenderer.ExcelToPdfConverter.GetPdfTrueTypeFont(Font font, Boolean isEmbedFont, Stream alternateFontStream)
at Syncfusion.XlsIORenderer.PDFRenderer.GetAscent(Font font)
at Syncfusion.XlsIO.RendererBase.FindAscent(String text, Font font)
at Syncfusion.XlsIO.RendererBase.DrawRTFText(RectangleF cellRect, RectangleF adjacentRect, Boolean isShape, Boolean isWrapText, Boolean isHorizontalTextOverflow, Boolean isVerticalTextOverflow, Boolean isChartShape)
at Syncfusion.XlsIORenderer.ExcelToPdfConverter.DrawRTFText(RectangleF cellRect, RectangleF adjacentRect, PdfGraphics graphics, List`1 richTextFont, List`1 drawString, Boolean isShape, Boolean isWrapText, Boolean isHorizontalTextOverflow, Boolean isVerticalTextOverflow)
at Syncfusion.XlsIORenderer.ExcelToPdfConverter.DrawCell(ExtendedFormatImpl extendedFormatImpl, IRange cell, RectangleF cellRect, RectangleF adjacentRect, PdfGraphics graphics, Single mergedWidth, String cellText, Boolean isHasStyle)
at Syncfusion.XlsIORenderer.ExcelToPdfConverter.DrawCell(MigrantRangeImpl cell, RectangleF cellRect, RectangleF adjacentRect, PdfGraphics graphics, Single mergedWidth)
at Syncfusion.XlsIORenderer.ExcelToPdfConverter.DrawCells(WorksheetImpl sheet, Int32 firstRow, Int32 firstColumn, Int32 lastRow, Int32 lastColumn, PdfGraphics graphics, Single originalWidth, Single startX, Single startY, Single rangeWidth)
at Syncfusion.XlsIORenderer.ExcelToPdfConverter.DrawRow(IWorksheet wkSheet, Int32 startColIndex, Int32 endColIndex, Int32 startRowIndex, Int32 endRowIndex, Single xValue, Single yValue, Single originalWidth, Single startX, Single startY, Single rangeWidth, Single rangeHeight)
at Syncfusion.XlsIORenderer.ExcelToPdfConverter.DrawRow(IWorksheet wkSheet, Int32 startColumn, Int32 endColumn, Int32 startRow, Int32 endRow, Single xValue, Single yValue, Single originalWidth, Boolean isBlank)
at Syncfusion.XlsIORenderer.ExcelToPdfConverter.DrawSheet(IWorksheet wkSheet, IRange[] printAreas)
at Syncfusion.XlsIORenderer.ExcelToPdfConverter.DrawWorkSheet(IWorksheet worksheet, Int32 sheetsCount, LayoutOptions layoutOptions)
at Syncfusion.XlsIORenderer.ExcelToPdfConverter.ConvertDocument()
at Syncfusion.XlsIORenderer.ExcelToPdfConverter.Convert()
at Syncfusion.XlsIORenderer.ExcelToPdfConverter.Convert(XlsIORendererSettings converterSettings)
at Syncfusion.XlsIORenderer.XlsIORenderer.ConvertToPDF(IWorkbook workbook, XlsIORendererSettings converterSettings)
Hello Keerthi,
Apologies for the late reply.
RE: Exception thrown: 'System.NullReferenceException' in worksheet.EnableSheetCalculations();
I can't seem be able to upload the file.
Please see :
For the other files, I'm afraid I cannot share it because it contains confidential information.
Regards,
Dennis