Control margins in printing web

Stimulsoft Reports.WEB discussion
Post Reply
Leandro
Posts: 74
Joined: Tue Aug 08, 2006 9:07 am
Location: Brasil

Control margins in printing web

Post by Leandro »

When I open the report Simple List in winform are 3 pages printed correctly.
When viewing the report on the web has 3 pages, but when print generates 6 pages. Below the print screen.

Designer
Image

Report in Web
Image

Configuration IE8
Image

Printer spool
Image


What should I do to print the number of pages equal to the display?
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Control margins in printing web

Post by Edward »

Hi,

The result you received was a 6 pages instead of 3 because when a report was printed from the browser it is always HTML representation of the report which is obviously can not be WYSIWYG. To avoid this use better printing using Adobe Acrobat and there is an option for such printing.

But you could still receive the result you were after. Just open the Page properties in IE and set header and footer as blank and reduce page margins to zero.

Unfortunately there is no rule about margins - you always need to set them a bit bigger in the report template if you going to print using HTML representation of the report from the browser.

Thank you.
Leandro
Posts: 74
Joined: Tue Aug 08, 2006 9:07 am
Location: Brasil

Control margins in printing web

Post by Leandro »

Hi Edward,

Is there a setting that instead of opening the preview normal html open the pdf file directly in the browser?
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

Control margins in printing web

Post by Jan »

Hello,

You can use "Print to Pdf" option from Print menu.

Thank you.
Leandro
Posts: 74
Joined: Tue Aug 08, 2006 9:07 am
Location: Brasil

Control margins in printing web

Post by Leandro »

Hello Jan,

I would like to render the report directly to PDF, without opening the page with the visualization.
How to implement it?
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Control margins in printing web

Post by Edward »

Hi

Yes, that is possible. Please use the following code:

Code: Select all

Stimulsoft.Report.Web.StiReportResponse.ResponseAsPdf(this, report, false)
Thank you.
Leandro
Posts: 74
Joined: Tue Aug 08, 2006 9:07 am
Location: Brasil

Control margins in printing web

Post by Leandro »

Hello Edward,

Perfect, thank you!!!
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Control margins in printing web

Post by Edward »

Hi Leandro,

You are welcome.

Please let us know if you need any help.

Thank you.
Leandro
Posts: 74
Joined: Tue Aug 08, 2006 9:07 am
Location: Brasil

Control margins in printing web

Post by Leandro »

Thanks, so far it's alright
Post Reply