We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Printing a Diagram

I have a diagram on screen which I'm trying to print. I want the diagram to fill as much of the page as possible while retaining the aspect ratio.

PrintingService.PrintMediaSize is set to isoA4
PrintingService.PrintOrientation is set to Lanscape

I have attached a document containing screen prints.

The first one show my application screen. The program always centres the diagram based on Diagram.ActualWidth. The PageSettings are left at default.
As you can see the control draws a line around the drawn objects. The contents of this box is what I want to see when I print.

When I select Stretch Uniform the diagram area is jammed up at the top left and unnecessary space is added to right and below.

Selecting Stretch Fill produced a distorted diagram.

I simply can't understand the relationship between the diagram, the box around the drawing objects and the PrintPreview.

Attachment: PrintingIssue_7e84beb5.zip

3 Replies

SC Saranya Chandrasekaran Syncfusion Team December 12, 2014 12:41 PM UTC

Hi Jim,

We are analyzing on your requirement. We will update you with the task stats on Monday December 15th, 2014.

 

Please let us know if you have further assistance on this.

Regards,
Saranya C



JW jim watterson December 14, 2014 07:35 AM UTC

Further to this. In the documentation is says that the page size will be based on the contents and the diagram shows a boxed area in the middle of the page.

The export settings says that exportmode.content will save the area occupied by the children exactly.

settings.ImageStretch = Stretch.Uniform

settings.ExportMode = ExportMode.Content

If you look at the attached png export you will see that the area to the left of the page is also exported making the image off centre.

Also if Stretch.None is specified the diagram is chopped off to the right by the amount of padding added on the left.

Again as with printing I only want to export the page contents as marked by the PageBorder 

Attachment: Export_e6de67fb.zip


SC Saranya Chandrasekaran Syncfusion Team December 15, 2014 10:46 AM UTC

Hi Jim,

 Printing:

 We have provided support for printing with PageSettings properties. Printing depends on the PageWidth and PageHeight properties of the PageSettings. After analyzing your sample, we came to know that you have tried to print the Diagram without PageSettings. We have created a simple to represent printing support in SfDiagram. Please refer to the attached sample.

 Exporting:

 We have provided Exporting with two modes (PageSettings and Content). In PageSettings mode, the area to be exported will be based on PageSettings and how Children are  arranged. In Content Mode, areas occupied by children are exported exactly. For further details about exporting, please refer to the following online help documentation link.

Link: http://help.syncfusion.com/UG/winrt/documents/customizationofexpor.htm

Note: We have provided PrintandExport support to SfDiagram only in Windows 8.1 (Visual Studio 2013)

Please let us know if you have further assistance on this.

Regards,

Saranya C


Attachment: PRINT_8f397c08.zip

Loader.
Live Chat Icon For mobile
Up arrow icon