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.
Unfortunately, activation email could not send to your email. Please try again.

Printing in VB.NET

Thread ID:

Created:

Updated:

Platform:

Replies:

117160 Aug 26,2014 08:36 AM Sep 1,2014 08:47 AM WinRT 6
loading
Tags: SfDiagram
jim watterson
Asked On August 26, 2014 08:36 AM

I'm trying to print a diagram vb.net VS2013 8.1 app. The statement;

Await Diagram1.PrintingService.RegisterForPrinting()

produces an error - expression does not produce a value.

Removing the await stops the error and allows the app to show the print dialog but then the print preview fails.

Any ideas?


jim watterson
Replied On August 26, 2014 07:16 PM

fter further experimenation I have found that:

I have Diagram1PageSettings = Nothing - which I copied from the examples or documentation. If remove this and add

Diagram1PageSettings .PageWidth =500
Diagram1PageSettings .PageHeight=500

A reversed out block is drawn on top of my diagram corresponding to this size with the line colours inverted. This block then prints but is not what I want.  

All I want is to print my diagram as I see it. The documentation says that PageWiidth & PageHeight should be set by the contents?

Saranya Chandrasekaran [Syncfusion]
Replied On August 28, 2014 02:39 AM

Hi Jim,

Sorry for the inconvenience caused.

Regarding “Printing in VB.NET” to your reported scenario, we have created simple sample to meet your requirement. Currently, we don’t have a support to directly print the Diagram content. We have used Pagesettings to print the Diagram with specified Size. We will update the documentation with necessary information in future. Please refer to the attached sample.

Please let us know if you have any concerns.

Regards,

Saranya C


Attachment: PrintingSample_54cc1b5f.zip

jim watterson
Replied On August 28, 2014 03:02 AM

Thank for your response. I am trying to fit the diagram onto the page if possible and only go to another page if it won't fit. 

If I could set the PageSettings to the printable area of the page then this would work but I cannot see how to retrieve this because i never have access to the printer context - is there an event I can override during the preview call to get the page size?

Saranya Chandrasekaran [Syncfusion]
Replied On August 29, 2014 07:04 AM

Hi Jim,

We are working on your requirement. We will update you on Monday September 1,2014.

Please let us know if you have any concerns.
Regards,
Saranya C

jim watterson
Replied On August 30, 2014 02:45 AM

When I print anything it is hard up against the left and top in the preview. When I print the top and left are chopped off by a few pixels. PrintMargin has no effect. I've set a colour and thickness for the border but it is never displayed. I do not understand what OffPageMaxMargin is for.


Mohana Priya Raja [Syncfusion]
Replied On September 1, 2014 08:47 AM

Hi Jim,

We have analyzed your query. We have provided some virtual method to override the printing functionality in PrintingService. The Print Margin property is used to define the Margin for PageBreaks.

Please refer to our online help documentation link for more details about printing.

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

It would be better for us, if you provide more details (sample, document or video) to represent your requirement. This helps us to serve you better.

Please let us know if you have any concerns.

Regards,

Mohana Priya R


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;