Ticket S91487
Visible to All Users

Export to PDF - Support exporting of vector EMF and WMF images in native PDF commands

created 17 years ago

Please could you consider adding support for maintaing vector wmf / emf files when exporting report to a PDF.

Show previous comments (34)
L L
Lars H. Nikolajsen 12 years ago

    Thanks Daniel, it worked!

      So will this be implemented at all ?

        @Daniel looks good what I actually do in my case is inherit all my Reports from a base class e.g. XtraReportsExtended : XtraReports and call the method in there. Then all the functionality is built into each report automatically. Just an implementation choice I guess but it means I don't have to remember to call a method in each report. Not tested it in sub reports to be honest though.
        p.s. The code isn't fool proof. Until now I have only had charts in the report header or footer. I tried putting one in the group header of a report with filtering set appropriate for the grouping. This just caused a repeated draw of the same first chart through the report. I guess having this adjustment in the beforeprint method of the report means all group charts are overwritten with the same XrPictureBox, the method isn't called on an individual chart basis for each grouping. Not sure if there is a better event we could call this in to avoid that issue, anyone with any ideas?

        Answers approved by DevExpress Support

        created 11 years ago (modified 11 years ago)

        In the 14.1 version, we supported exporting of EMF+ images to implement the following suggestion: Export to PDF - Add an option to export all texts to PDF as native PDF text elements .

        To learn about use cases that have not been covered by the implemented functionality, we decided to close this suggestion as well.

        If you are still in need for support of WMF and EMF with no regard to the export of charts, please track the new suggestion at: Export to PDF - Support exporting of vector EMF and WMF images in native PDF commands .

          Comments (3)
          CM CM
          Corey Meredith_1 11 years ago

            Hallelujah!  Looking forward to trying it out!  Thanks!

            HS HS
            Håkon Seljåsen 9 years ago

              How do I turn on this enhanced pdf export of a chart in a XtraReport? It does not seem to work out of the box.

              Dmitry Tokmachev (DevExpress) 9 years ago

                Hello Håkon,

                I've created a separate ticket on your behalf (How to export a chart as a Metafile into the PDF file). It has been placed in our processing queue and will be answered shortly.

                Thanks,
                Dmitry

                created 13 years ago (modified 11 years ago)

                Hi everyone,
                Thank you for all your feedback. We appreciate your opinion. We have already discussed this feature and, according to our rough estimate, a complex solution is necessary. This feature is not in our To-Do list for upcoming releases, but this may change depending on the amount of available R&D team resources.
                Updated by Ingvar (DevExpress Support):
                Meanwhile, you can use a workaround kindly provided by Peter Thorpe. In the attachment, you will find a sample project that uses this idea and demonstrates how to increase the image quality only on export to PDF. In other words, Charts are not replaced with XRPictureBoxes, but produce "big" images on PDF export.
                In this sample project, you can find a custom XRChart descendant that produces a custom Brick type with a custom Exporter. If the PDF export is selected, the Exporter creates a bigger image of the current chart and draws it.
                To control the quality of the exported Chart image, I have added the PDFExportOptions property set to the MyXRChart class. This property set has two options:
                - UseAdvancedApproach - a boolean property that defines whether or not MyXRChart should use the standard PDF export mechanism or a custom one;
                - Scale - the multiplier for the Chart image size. This property is in effect only when the UseAdvancedApproach property is enabled.
                I hope you will find this approach useful.

                  Show previous comments (41)
                  DevExpress Support Team 11 years ago

                    Hi everyone,
                    I have updated our Answer with a workaround. Please review it.

                      I completely agree with Corey Meredith_1.

                      CS CS
                      Christoph Seifert 1 11 years ago

                        Recently I had a customer complaint about the bad graphic quality of the charts in PDF reports. Small data portions were simply swallowed up by their neighboring color. Of course they could not be made visible again by zooming into the PDF document. Then I have implemented your workaround suggestion to embed bigger pictures. Then the charts looked better but the file size of the PDF document was 8 times larger ( 1MB instead of 125 KB) at a chart scale of 5. A chart scale factor of 10 produced a generic error in the GDI+ library. Maybe the resulting image resolution was too big. But even with very big bitmap resolutions the loss of data remains possible.
                        Although you have provided a workaround solution please keep up (or start?) to work on a vector based solution. Because only this can provide the quality the customer expects. And if he then overlooks some small data portions it's his fault and not mine anymore.

                        Other Answers

                        created 12 years ago (modified 11 years ago)

                        Google search "active reports" for a solution to this issue. It's a very simple solution that will resolve this problem and allows graphs and images to be exported to PDF in full vector based formats.
                        Not only does this reduce the file size, it allows the charts to appear sharp and clear.

                          Show previous comments (13)

                            Absolutely agree with you.

                              Thanks, but how is getting adobe pro going to help ?

                                sorry, only now stumbled on this thread again. you can have the report show in the preview window and from there print to adobe distiller instead of using the devexpress inbuilt pdf engine.

                                Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

                                Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.