Adding a chart Image in PDF Format to an Infragistics Report
Adding a chart Image in PDF Format to an Infragistics Report
Hi
Would anyone by any chance know how I can use the Infragistics Report
and add a TChart Image into this report and save it as a pdf.
I know how to create a PDF file with Infragistics but I dont quite know how to give it a Steema.TeeChart.Export.PDFFormat
Thanks.
Would anyone by any chance know how I can use the Infragistics Report
and add a TChart Image into this report and save it as a pdf.
I know how to create a PDF file with Infragistics but I dont quite know how to give it a Steema.TeeChart.Export.PDFFormat
Thanks.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi qcrnd,
I'm afraid you'll have to ask Infragistics support how to add a pdf file itno their reports. I imagine it should be very similar to adding an image.
I'm afraid you'll have to ask Infragistics support how to add a pdf file itno their reports. I imagine it should be very similar to adding an image.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Hi Narcis
the thing is I am not sure what the PDFFormat is exactly. I tried copying a PDFFormat to clipboard and when I opened adobe acrobat the option of creating a PDF from clipboard image was disabled. If I used JPEGFormat then it is OK. There seemed to be giberrish in the clipboard when copying PDFFormat to clipboard.
How exactly can I use the Image that was copied to the clipboard
Thanks.
the thing is I am not sure what the PDFFormat is exactly. I tried copying a PDFFormat to clipboard and when I opened adobe acrobat the option of creating a PDF from clipboard image was disabled. If I used JPEGFormat then it is OK. There seemed to be giberrish in the clipboard when copying PDFFormat to clipboard.
How exactly can I use the Image that was copied to the clipboard
Thanks.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi qcrnd,
Are you copying PDF export to the clipboard like this?
Are you copying PDF export to the clipboard like this?
Code: Select all
tChart1.Export.Image.PDF.CopyToClipboard();
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Hi Narcis
I think I will approach this a little differently after a little research.
I think I will use the Save into IO.Stream and then create a bitmap.
But now I have a different question.
HOW can I export a TChart Image but with a different size then the actual TChart itself
The only way I found is to actually modify the size of the tchart itself, call Update() and then call the export. But then the resize will be visible and it doesnt look nice.
I tried using SuspendLayout but that doesnt help either.
How can I solve this .
Thanks.
I think I will approach this a little differently after a little research.
I think I will use the Save into IO.Stream and then create a bitmap.
But now I have a different question.
HOW can I export a TChart Image but with a different size then the actual TChart itself
The only way I found is to actually modify the size of the tchart itself, call Update() and then call the export. But then the resize will be visible and it doesnt look nice.
I tried using SuspendLayout but that doesnt help either.
How can I solve this .
Thanks.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi qcrnd,
Yes, you can set specific image dimensions before exporting, for example:
Yes, you can set specific image dimensions before exporting, for example:
Code: Select all
tChart1.Export.Image.Bitmap.Width = 800;
tChart1.Export.Image.Bitmap.Height = 600;
tChart1.Export.Image.Bitmap.Save(fileName);
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Hi Narcis
Thanks , is this a proper redrew when changing the size just like the tchart is redrawn or is it a simple stretch bitmap , because stretch wont work nicely .
Regarding PDF , how exactly can I create an Windows Image using the PDF format. I tried pdfFormat.Save to IO.Stream but it caused an exception.
Thanks.
Thanks , is this a proper redrew when changing the size just like the tchart is redrawn or is it a simple stretch bitmap , because stretch wont work nicely .
Regarding PDF , how exactly can I create an Windows Image using the PDF format. I tried pdfFormat.Save to IO.Stream but it caused an exception.
Thanks.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi qcrnd,
No, it is a bitmap redraw.Thanks , is this a proper redrew when changing the size just like the tchart is redrawn or is it a simple stretch bitmap , because stretch wont work nicely.
Code below works fine for me here using latest TeeChart for .NET v3 release.Regarding PDF , how exactly can I create an Windows Image using the PDF format. I tried pdfFormat.Save to IO.Stream but it caused an exception.
Code: Select all
System.IO.MemoryStream stream = new System.IO.MemoryStream();
tChart1.Export.Image.PDF.Save(stream);
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Hi Narcis
regarding Redraw , still dont understand , how exactly is the bitmap redrawn , is simply streched and if so what you are saying is that to get good results it is better to change the size of the actual chart itself or am I mistaken.
Regarding the PDF , sorry my mistake , I meant that after I create a stream what do I do with the stream , How can I create and image from this stream
for JPEG i do Bitmap bmp = new Bitmap(stream) , what Image can I use for a stream created from a PDFFormat.
Thanks.
regarding Redraw , still dont understand , how exactly is the bitmap redrawn , is simply streched and if so what you are saying is that to get good results it is better to change the size of the actual chart itself or am I mistaken.
Regarding the PDF , sorry my mistake , I meant that after I create a stream what do I do with the stream , How can I create and image from this stream
for JPEG i do Bitmap bmp = new Bitmap(stream) , what Image can I use for a stream created from a PDFFormat.
Thanks.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi qcrnd,
Hope this helps!
No, sorry if I haven't explained myself clearly. When saving a chart as a bitmap and setting a specific size for it, TeeChart internally renders a new bitmap without stretching/resizing current chart. For getting better quality exports you should just set dimensions you want and save the image as in the code snippet I posted.regarding Redraw , still dont understand , how exactly is the bitmap redrawn , is simply streched and if so what you are saying is that to get good results it is better to change the size of the actual chart itself or am I mistaken.
When you save a chart in PDF format to a stream or the clipboard they contain a PDF file. If you want to use it as an image you may use other image export formats. For vectorial exporting you could use SVG.Regarding the PDF , sorry my mistake , I meant that after I create a stream what do I do with the stream , How can I create and image from this stream
for JPEG i do Bitmap bmp = new Bitmap(stream) , what Image can I use for a stream created from a PDFFormat.
Hope this helps!
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Hi Narcis
So for the first question . Excellent thats good.
For the second question - In that case , any idea how I can integrate an SVG into a PDF . I created and SVG Chart file and but acrobat isnt able to create a PDF from this file.
I also tried creating an System.Drawing.Image from the SVGFormat stream and got an exception just like the PDFformat.
Thanks.
So for the first question . Excellent thats good.
For the second question - In that case , any idea how I can integrate an SVG into a PDF . I created and SVG Chart file and but acrobat isnt able to create a PDF from this file.
I also tried creating an System.Drawing.Image from the SVGFormat stream and got an exception just like the PDFformat.
Thanks.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi qcrnd,
Can you save TeeChart generated SVG files to disk and open them using Internet Explorer?
Thanks in advance.
Can you save TeeChart generated SVG files to disk and open them using Internet Explorer?
Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Hi Narcis
No I cannot , I tried to drag the file into IE and I get
The XML page cannot be displayed
Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.
--------------------------------------------------------------------------------
Parameter entity must be defined before it is used. Error processing resource 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11...
No I cannot , I tried to drag the file into IE and I get
The XML page cannot be displayed
Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.
--------------------------------------------------------------------------------
Parameter entity must be defined before it is used. Error processing resource 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11...
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi qcrnd,
In that case you may need to install SVG viewer plugin:
http://www.adobe.com/svg/viewer/install/
In that case you may need to install SVG viewer plugin:
http://www.adobe.com/svg/viewer/install/
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |