Problem with Max Number of Line in Viewer

Stimulsoft Ultimate discussion
Togo
Posts: 58
Joined: Wed Jun 19, 2013 4:34 am

Problem with Max Number of Line in Viewer

Post by Togo »

Hi,

We have some text components on a report with the "Max Number of Line" set to 5, and when exporting the report to PDF those text was correctly trimmed down to 5 lines, but that setting seems not in effect when the report is viewed in WebViewer / WebViewerFx. Any ideas on what might be wrong?

Thanks.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Problem with Max Number of Line in Viewer

Post by Alex K. »

Hello,

We couldn't reproduce this bug.
Please clarify which version are you use?

Thank you.
Togo
Posts: 58
Joined: Wed Jun 19, 2013 4:34 am

Re: Problem with Max Number of Line in Viewer

Post by Togo »

Hi,

We are using version 2016.2.5, and the properties of the text is as below.
hsd_text1.png
hsd_text1.png (18.26 KiB) Viewed 6695 times
hsd_text2.png
hsd_text2.png (17.5 KiB) Viewed 6695 times
We have also tried the pre-release 2016.3.4, and the problem still exists.
Also when we tried to export the report to PDF / XPS with the pre-release, an exception occured.

PDF:

Code: Select all

Exception information: 
    Exception type: IndexOutOfRangeException 
    Exception message: Index was outside the bounds of the array.
   at Stimulsoft.Report.Export.PdfFonts.ReduceFontSize(Byte[]& buff, String fontName, Boolean remakeGlyphTable)
   at Stimulsoft.Report.Export.StiPdfExportService.RenderFontTable()
   at Stimulsoft.Report.Export.StiPdfExportService.ExportPdf1(StiReport report, Stream stream, StiPdfExportSettings settings)
   at Stimulsoft.Report.Export.StiPdfExportService.ExportPdf(StiReport report, Stream stream, StiPdfExportSettings settings)
   at Stimulsoft.Report.Web.StiExportsHelper.ExportReport(StiRequestParams requestParams, StiReport report, StiExportSettings settings)
   at Stimulsoft.Report.Web.StiWebViewer.ExportReportResult(StiRequestParams requestParams, StiReport report, StiExportSettings settings)
   at Stimulsoft.Report.Web.StiWebViewerFx.OnInit(EventArgs e)
   at System.Web.UI.Control.InitRecursive(Control namingContainer)
   at System.Web.UI.Control.AddedControl(Control control, Int32 index)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
XPS:

Code: Select all

Exception information: 
    Exception type: IndexOutOfRangeException 
    Exception message: Index was outside the bounds of the array.
   at Stimulsoft.Report.Export.PdfFonts.StiOpenTypeHelper.SetUInt16(Byte[] buff, Int32 pos, UInt16 value)
   at Stimulsoft.Report.Export.PdfFonts.StiOpenTypeHelper.ReduceFontSize(Byte[]& buff, String fontName, Boolean remakeGlyphTable, UInt16[] GlyphList, UInt16[] GlyphRtfList)
   at Stimulsoft.Report.Export.StiPdfExportService.RenderFontTable()
   at Stimulsoft.Report.Export.StiPdfExportService.ExportPdf1(StiReport report, Stream stream, StiPdfExportSettings settings)
   at Stimulsoft.Report.Export.StiPdfExportService.ExportPdf(StiReport report, Stream stream, StiPdfExportSettings settings)
   at TGReport.ReportViewer.Page_Load(Object sender, EventArgs e)
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Thanks.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Problem with Max Number of Line in Viewer

Post by Alex K. »

Hello,

We couldn't reproduce this bug.
Please send us a simple report with test data which reproduces the issue for analysis.

Thank you.
Togo
Posts: 58
Joined: Wed Jun 19, 2013 4:34 am

Re: Problem with Max Number of Line in Viewer

Post by Togo »

Hello

We have tried to create a new report with a single field and static data and the problems are the same; the test report is attached below.
Test.mrt
(6.27 KiB) Downloaded 537 times
Thanks
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Problem with Max Number of Line in Viewer

Post by HighAley »

Hello.
Togo wrote:We have some text components on a report with the "Max Number of Line" set to 5, and when exporting the report to PDF those text was correctly trimmed down to 5 lines, but that setting seems not in effect when the report is viewed in WebViewer / WebViewerFx. Any ideas on what might be wrong?
The default mode in the Web Viewer is Table mode. In this mode the text makes components larger.
Please, try to set next property of the StiWebViewer:

Code: Select all

ReportDisplayMode="Div"
Thank you.
Togo
Posts: 58
Joined: Wed Jun 19, 2013 4:34 am

Re: Problem with Max Number of Line in Viewer

Post by Togo »

Hello,

Thanks for your reply, we have tried the ReportDisplayMode property in WebViewer and it does have some effect, however we still have below issues:

PDF Exported by WebViewer 2016.2.5 - correctly limited to 5 rows of text
hsd_pdf.png
hsd_pdf.png (5.07 KiB) Viewed 6671 times
1. For WebViewer it seems the height is not accurate as there is half of line 6 being shown:
hsd_v.png
hsd_v.png (6.39 KiB) Viewed 6671 times
2. For WebViewerFx the ReportDisplayMode property is obviously not available, and it seems there is an extra row (line 6) being shown:
hsd_vfx.png
hsd_vfx.png (5.35 KiB) Viewed 6671 times
3. An exception is still being thrown when trying to export the report to PDF by choosing the corresponding option in WebViewer / WebViewerFx [Version 2016.3 / pre-release 2016.3.4] (stack trace posted in previous post)

Thanks
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Problem with Max Number of Line in Viewer

Post by HighAley »

Hello.
An exception is still being thrown when trying to export the report to PDF ...
The error occurs with the PMingLiU.ttf font.
We can't reproduce the issue.
Could you send us the font file that you are using and we will try to reproduce and fix the issue,

Thank you.
Togo
Posts: 58
Joined: Wed Jun 19, 2013 4:34 am

Re: Problem with Max Number of Line in Viewer

Post by Togo »

Hello
HighAley wrote:Hello.
An exception is still being thrown when trying to export the report to PDF ...
The error occurs with the PMingLiU.ttf font.
We can't reproduce the issue.
Could you send us the font file that you are using and we will try to reproduce and fix the issue,

Thank you.
The PMingLiU font is the one included in Windows and the server having issue is running Windows Server 2008 R2 (PMingLiU in mingliu.ttc v7.00, same font version included in Windows 7).

Thank you
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Problem with Max Number of Line in Viewer

Post by HighAley »

Hello, Togo.

It seems that the font is available in one of the language packs.
Please, send us the font file that you use on your machine.

Thank you.
Post Reply