This is a migrated thread and some comments may be shown as answers.

old vs new radchart image export compression test

4 Answers 88 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
kity
Top achievements
Rank 2
kity asked on 24 Oct 2013, 09:07 AM

old vs new radchart image export compression test

 First make simple test with old telerik radchart. Export  simple chart  to png image with pdf provader. Set compression level

var provider = new PdfFormatProvider {ExportSettings = {ContentsCompressionMode = PdfContentsCompressionMode.Deflate, ContentsDeflaterCompressionLevel = 9, ImagesCompressionMode = PdfImagesCompressionMode.Deflate, ImagesDeflaterCompressionLevel = 5}};

This work perfect.

 



Make second test with new telerik radcartesian chart  (advance chart and telerik proud).

Again test is the same, export image from radcartesian chart to png with pdf provaider with the same compression

var provider = new PdfFormatProvider {ExportSettings = {ContentsCompressionMode = PdfContentsCompressionMode.Deflate, ContentsDeflaterCompressionLevel = 9, ImagesCompressionMode = PdfImagesCompressionMode.Deflate, ImagesDeflaterCompressionLevel = 5}};

Result: Not work and give error with lattes adobe reader. Error message is: “Insufficient data for an image”

 

var provider = new PdfFormatProvider {ExportSettings = {ContentsCompressionMode = PdfContentsCompressionMode.Deflate, ContentsDeflaterCompressionLevel = 9, ImagesCompressionMode = PdfImagesCompressionMode.Deflate, ImagesDeflaterCompressionLevel = 4}};

9/4 Deflate -> Again the same result with

9/3 Deflate -> Again the same result with

9/2 Deflate -> Again the same result with

9/1 Deflate -> BRAVO!!! Work! Do not any matter that compression of image is nearly to zero(0 value is equal to not any pdf image compression).

 

GENERALconclusion:

Old telerik RadChart work with pdf compression ;)

New RadCartessianChart not work with pdf compression ;(

 

For more info, read to the bottom…

Description: D:\DW\Task\AdvanceTrendExport\image_radCartesianChart.png

 

9/1 Deflate -> you see text in table. Good

 

 

9/2 Deflate -> you not see text in table. Not good

9/3 Deflate -> you not see text in table. Not good

9/4 Deflate -> you not see text in table. Not good

9/5 Deflate -> you not see text in table. Not good

 

 

 

 

 

 

 

 

 

 

You see chart image in pdf document

 

You do not see chart in pdf document

4 Answers, 1 is accepted

Sort by
0
ric
Top achievements
Rank 1
answered on 12 Dec 2013, 04:11 PM
I'm also experiencing similar issues : compressed images are not saved into the PDF correctly, a bit of investigation suggests the wrong chunk size is being written to the pdf's internal dictionary

e.g. I have a pdf which is 60kb in size, but the LENGTH key is set as ~1.5MB

that's a one-page PDF with as single, large image in (from a writablebitmap of a control)

it seems that certain PDF readers / code will ignore this when opening it, but others get very upset !
0
Petya
Telerik team
answered on 17 Dec 2013, 03:17 PM
Hello,

Thank you for contacting us!

@kity Actually, at this point we'd suggest not setting the ImagesDeflaterCompressionLevel property and leave its default value. The issue you are facing is already in our to-do list, but I cannot tell when it might be resolved.

@ric Thank you for sharing your observations with us. We will further investigate the cause of the observed behavior and will try to address it as soon as possible.

Regards,
Petya
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
kity
Top achievements
Rank 2
answered on 19 Dec 2013, 02:15 PM

Dataseries or Image Aspect Ration?

Detail bug characteristics:

See image test for more information. The problem is connect with data series but I am not 100% sure.

It is not any diference about exporting .pdf/.doc file or simple use telerik print preview.

Conclusion:

1. Compression or image file format bug

2. The problem is in dataseries but I am not 100% sure.

3. Some time when change the size of float panel work correctly. May be problem is in telerik algothm that use for Image Aspect Ration when export chart image.



Version:

I have made test with lattest telerik version "RadControls_for_Silverlight5_2013_3_1216_DEV_hotfix".

Test:

See attache image for more information.

The top dialogs are "telerik print preview".



Please fix this bug. It is from the begging. I have seen this bug from more than 3 mounts before.

























0
kity
Top achievements
Rank 2
answered on 20 Dec 2013, 08:05 AM

OK. I am now 100% sure that Telerik have bug with algorithm that depending aspect ration.

Telerik.Windows.Media.Imaging.ExportExtensions.ExportToImage(chart, ms, encoder);




Tags
General Discussions
Asked by
kity
Top achievements
Rank 2
Answers by
ric
Top achievements
Rank 1
Petya
Telerik team
kity
Top achievements
Rank 2
Share this question
or