PDF problems

Stimulsoft Reports.Silverlight discussion
User avatar
ChrisCookDev
Posts: 41
Joined: Sun May 20, 2012 7:07 pm
Location: UK

PDF problems

Post by ChrisCookDev »

The following, side-by-side, image shows some discrepancy problems with the way in which your viewer displays and prints a report and the corresponding PDF file (produced by using either the 'Print to PDF' or 'Save \ Adobe PDF File...' options): -
stimulsoft side by side.png
stimulsoft side by side.png (345.1 KiB) Viewed 7949 times
I'm currently using the latest pre-release version and experiencing the following issues with the PDF output: -

1) The first problem is that the quality of the image is significantly poorer in the PDF file. Is this something that can be improved by either adjusting the Stimulsoft settings or the format of the image file?

2) The ⅓ symbol (one third) in the text 'Load at ⅓ points' is not being displayed correctly in the PDF file and appears as a square. It displays and prints fine in your viewer.

3) The Notes text which contains a number of lines separated by vb.net's carriage-return character (vbCr) seems to ignore the carriage returns in the PDF file. Again, it displays and prints correctly in your viewer.

The following image shows the PDF export options I'm using:-
stimulsoft pdf options.png
stimulsoft pdf options.png (11.3 KiB) Viewed 7948 times
I'm also using the following vb.net code to display the report: -

Code: Select all

        StiOptions.Silverlight.Themes.CurrentTheme = StiSilverlightThemes.Office2010Blue

        StiOptions.Viewer.Elements.ShowReportOpenButton = False
        StiOptions.Viewer.Elements.ShowPageNewButton = False
        StiOptions.Viewer.Elements.ShowPageDeleteButton = False
        StiOptions.Viewer.Elements.ShowBookmarksPanel = False        
        StiOptions.Viewer.SaveReportsButtons.ShowDocumentButton = False

        Dim report As New StiReport
        Dim a As Assembly = Assembly.GetCallingAssembly()
        Using sr As StreamReader = New StreamReader(a.GetManifestResourceStream(reportResourceName))
            report.Load(sr.BaseStream)
        End Using

        report.CalculationMode = StiCalculationMode.Compilation
        report.RegBusinessObject("ReportModel", "ReportModel", Me)

        report.Render()
        report.Show()
Any help would be greatly appreciated in resolving these issues with the PDF output.

Thanks
Chris Cook :: Software Development Manager :: www.genesisit.co.uk
Design, Develop, Deliver! :: App development for smartphones, tablets, the desktop and the web
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: PDF problems

Post by HighAley »

Hello.
ChrisCookDev wrote:1) The first problem is that the quality of the image is significantly poorer in the PDF file. Is this something that can be improved by either adjusting the Stimulsoft settings or the format of the image file?
Due to technical difficulties of converting images in the Silverlight the quality loss could be if the image is stretched. Please, try to set the image size so that it will be right size with Stretch property set to false.
ChrisCookDev wrote:2) The ⅓ symbol (one third) in the text 'Load at ⅓ points' is not being displayed correctly in the PDF file and appears as a square. It displays and prints fine in your viewer.
It depends on the font that you use. It's impossible to embed font in the pdf file like in other products because the native Silverlight have no access to the font files.
ChrisCookDev wrote:3) The Notes text which contains a number of lines separated by vb.net's carriage-return character (vbCr) seems to ignore the carriage returns in the PDF file. Again, it displays and prints correctly in your viewer.
We have reproduced this issue. We need time to solve it.

Thank you.
User avatar
ChrisCookDev
Posts: 41
Joined: Sun May 20, 2012 7:07 pm
Location: UK

Re: PDF problems

Post by ChrisCookDev »

Hi Aleksey,

Many thanks for the details which I'd like to explore below: -
Aleksey Andreyanov wrote:Due to technical difficulties of converting images in the Silverlight the quality loss could be if the image is stretched. Please, try to set the image size so that it will be right size with Stretch property set to false.
Please can you let me know the pixel to report unit ratio. In other words, if I wish to have a an image on the report with a width of 1 cm how many pixels wide should it be to avoid the need to stretch?
Aleksey Andreyanov wrote:It depends on the font that you use. It's impossible to embed font in the pdf file like in other products because the native Silverlight have no access to the font files.
Which fonts are fully supported and safe to use to access the third (⅓) character?
Aleksey Andreyanov wrote:We have reproduced this issue. We need time to solve it.
Thanks for your efforts in resolving this.

Thanks,

Chris
Chris Cook :: Software Development Manager :: www.genesisit.co.uk
Design, Develop, Deliver! :: App development for smartphones, tablets, the desktop and the web
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: PDF problems

Post by HighAley »

Hello.
ChrisCookDev wrote:
Aleksey Andreyanov wrote:Due to technical difficulties of converting images in the Silverlight the quality loss could be if the image is stretched. Please, try to set the image size so that it will be right size with Stretch property set to false.
Please can you let me know the pixel to report unit ratio. In other words, if I wish to have a an image on the report with a width of 1 cm how many pixels wide should it be to avoid the need to stretch?
The default image resolution is 100 dpi. So the image should have width about 40 pixels.
ChrisCookDev wrote:
Aleksey Andreyanov wrote:It depends on the font that you use. It's impossible to embed font in the pdf file like in other products because the native Silverlight have no access to the font files.
Which fonts are fully supported and safe to use to access the third (⅓) character?
We have tested with Arial, Courier New and Times New Roman fonts.

Thank you.
User avatar
ChrisCookDev
Posts: 41
Joined: Sun May 20, 2012 7:07 pm
Location: UK

Re: PDF problems

Post by ChrisCookDev »

Aleksey Andreyanov wrote:The default image resolution is 100 dpi. So the image should have width about 40 pixels.
Is it possible to increase the image resolution from 100 dpi?

Also, having set the Image's Stretch property to False this has caused the following 'cropping' issue when using the Save to Microsoft Word & Excel 2007/2013 options: -
stimulsoft word output problem.png
stimulsoft word output problem.png (111.13 KiB) Viewed 7918 times
stimulsoft excel output problem.png
stimulsoft excel output problem.png (183.21 KiB) Viewed 7918 times
However, the Image in the pdf does display at a better quality as shown below: -
stimulsoft pdf output.png
stimulsoft pdf output.png (103.1 KiB) Viewed 7918 times
In addition, changing the Image's Stretch property back to False resolves the Word and Excel 'cropping' issues but results in the poor quality PDF Image.

Any help would be appreciated.

Thanks
Chris Cook :: Software Development Manager :: www.genesisit.co.uk
Design, Develop, Deliver! :: App development for smartphones, tablets, the desktop and the web
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: PDF problems

Post by HighAley »

Hello.

We couldn't reproduce your issue with Word and Excel export.
Which version of our product do you use? Please, try the latest prerelease build.

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

Re: PDF problems

Post by HighAley »

Hello.

We have fixed the issue with carriage-return character (vbCr).
Please, check our release which is coming soon.

Thank you.
User avatar
ChrisCookDev
Posts: 41
Joined: Sun May 20, 2012 7:07 pm
Location: UK

Re: PDF problems

Post by ChrisCookDev »

Aleksey Andreyanov wrote:We have fixed the issue with carriage-return character (vbCr).
Please, check our release which is coming soon
Hi Aleksey,

Many thanks for addressing this issue and do you have an ETA for when the download with this fix will be available?

Also, whilst I'm sure you're probably aware of it, this vbCr issue is also effecting the other save options including the Word and Excel file formats.

Thanks
Chris Cook :: Software Development Manager :: www.genesisit.co.uk
Design, Develop, Deliver! :: App development for smartphones, tablets, the desktop and the web
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: PDF problems

Post by HighAley »

Hello.

We're going to publish our release on April 3.
We made an improvement in the Word and Excel exports too.

Thank you.
User avatar
ChrisCookDev
Posts: 41
Joined: Sun May 20, 2012 7:07 pm
Location: UK

Re: PDF problems

Post by ChrisCookDev »

Aleksey Andreyanov wrote:We couldn't reproduce your issue with Word and Excel export.
Which version of our product do you use? Please, try the latest prerelease build.
Hi Aleksey,

Having investigated this 'cropping' problem further I've determined the steps needed to reproduce this issue in the latest pre-release build (SL_v4_2013.03.11).

As covered earlier in this discussion, the 'cropping' problem occurs with images that have their Stretch property set to False that are saved to Microsoft Word or Excel format (the images appear fine in both your viewer and the PDF output). The attached files demonstrate the same report outputted in three different ways and are as follows: -

1) '2013-04-02 test at 40pc zoom in the viewer.pdf'
- This pdf file was output using the 'Save\Adobe PDF File' option when the viewer was zoomed to 40% (as shown below). This pdf file demonstrates how the image in the top right hand corner of the report should appear. As the Stretch property of this image is set to False the quality of the image is reasonably good in the PDF file. The second main image in the body of the report is poorer quality as its Stretch property is set to True (as covered previously by yourself I'm aware this is a limitation of the Silverlight tech).
Stimulsoft Viewer 40pc.png
Stimulsoft Viewer 40pc.png (152.44 KiB) Viewed 7829 times
2) '2013-04-02 test at 40pc zoom in the viewer.docx'
- This docx file was output using the 'Save\Microsoft Word 2007/2013 File' option when the viewer was zoomed to 40% (this is the key to reproducing the problem). This docx file demonstrates how the image in the top right hand corner is incorrectly cropped when the Stretch property of this image is set to False. Also, please note that the quality of the second main image (which has the Stretch property set to True) degrades in line with the zoom percentage (the lower the percentage the poorer the quality of the second Stretched image).

3) '2013-04-02 test at 60pc zoom in the viewer.docx'
- This docx file demonstrates the change in the two images as the viewers zoom percentage is increased from 40% to 60%.

4) '2013-04-02 test at 100pc zoom in the viewer.docx'
- This docx file demonstrates the correction of the images occurs when the viewers zoom percentage reaches 100%.

5) '2013-04-02 test at 150pc zoom in the viewer.docx'
- At 150% viewer zoom there is no discernible change in the top/right image from 100% zoom. However, the quality of the second Stretched image continues to improve.

As mentioned, these issues seem to effect both the Word and Excel file output option.

Also, they appear to be similar to a PDF issue you resolved for us last year covered in the following post: -

PDF Image Export

Please let me know if you need any further information and hopefully you can resolve these issues.

Thanks
Attachments
2013-04-02 test at 150pc zoom in the viewer.docx
(812.57 KiB) Downloaded 329 times
2013-04-02 test at 100pc zoom in the viewer.docx
(455.97 KiB) Downloaded 355 times
2013-04-02 test at 60pc zoom in the viewer.docx
(212.08 KiB) Downloaded 379 times
2013-04-02 test at 40pc zoom in the viewer.docx
(117.46 KiB) Downloaded 389 times
2013-04-02 test at 40pc zoom in the viewer.pdf
(492.11 KiB) Downloaded 577 times
Chris Cook :: Software Development Manager :: www.genesisit.co.uk
Design, Develop, Deliver! :: App development for smartphones, tablets, the desktop and the web
Locked