Grid Printng - Fit to Page- Scale to Fit (Aspose 2005)

Hi,

<span style=“font-size: 10pt; font-family: “Arial”,“sans-serif”; color: black;”>Hi,


I’ve to give user 2 options(LIKE excel page setup screen)
1)A3 sheet or 2)A4 sheet and hard code Fit to 1 Page and wide by=1(tall). So that
all my data fits in a single sheet to print

<span style=“font-size:10.0pt;font-family:“Arial”,“sans-serif”;
mso-fareast-font-family:“Times New Roman”;color:black”>( Please note: Data in my Gridweb
will be less than 1 or l.5 pages) .

So that all my data fits in a single sheet to print(Data will
be less 1 or l.5 pages .



Can you please reply me which method we can follow with your suggestions how to
do.<span style=“font-size:10.0pt;font-family:“Arial”,“sans-serif”;
mso-fareast-font-family:“Times New Roman””>

T<span style=“font-size: 10pt; font-family: “Arial”,“sans-serif”; color: black;”>hanks in advance

Hi,

Thanks for your interest in Aspose.

Can you please elaborate your problem with images/sample (xls/xlsx) files anything helpful?

Also, I have forwarded your query to our development team and we will let you know once we get any update.

This issue has been logged as CELLSNET-28160.

Hi,

I here attached my requirement screen shot. When i select the option from the screen, the grid data is fit to single page.

And also the water mark did not show the grid and print. It will be displayed only export the grid as XLS.

Aspose.Cells.GridWeb.Data.Picture pic = g.WebWorksheets[0].Pictures.AddPicture(“A1”);
pic.Image = System.Drawing.Image.FromFile(@“H:\AJAXEnabledWebSite4\xparent.gif”);


Please suggest me

Thnaks in advance

Meenaa

Hi,

We cannot support watermark. We recommend that create a transparent
picture instead of watermark and add it into a worksheet. Please try the
following code with Aspose.Cells.GridWeb v2.5.3.2005

C#


Picture pic = GridWeb1.WebWorksheets[0].Pictures.AddPicture(“c4”);

pic.Image = System.Drawing.Image.FromFile(@“c:\excel\transparent.gif”);

Please ensure the transparent picture can be opened correctly with your browser.

Hopefully, this can resolve your issue.

Also, I have added your comment and files in our database.

Hi,


Printing is working fine with the format but columns are printing acccording to
the paper size,if it is A3 or A4 printing content should scale to fit in a
single page, according to the requirement ,I’ve to give user 2 options(LIKE
excel page setup screen which i attached as word doc
) 1)A3 sheet or 2)A4 sheet and hard code Fit to=1 and
wide by=1(tall). So that all my data fits in a single sheet to print( Please
note: Data in my Gridweb will be less than 1 or l.5 pages) . Can you please
reply me as soon as possible,as it is quite urgent.

Hi,

Please try default2.aspx and update Page_Load method as follow:

ASP.NET - C#


if (!IsPostBack)
{

g.WebWorksheets.Clear();

g.WebWorksheets.Add();

g.WebWorksheets.Add();


//set sheets selectedIndex to 0

g.WebWorksheets.ActiveSheetIndex = 0;


Aspose.Cells.GridWeb.Data.Picture pic = g.WebWorksheets[0].Pictures.AddPicture(“a2”);

pic.Image = System.Drawing.Image.FromFile(Request.PhysicalApplicationPath + “xparent.gif”);

}


Adding a picture should be invoked after WebWorksheets.Clear(). If the picture is added into “a1”, it cannot be shown in print page. It is very strange. We cannot resolve this currently. You can add it into other cell.

We use zoom style to zoom printing content, please calculate zoom value by your content and page size.

Hi,

thank you for your quick response. Yes, it is working fine.

But I want print "Fit in single page"

I’ve to give user 2 options(LIKE
excel page setup screen which i attached as word doc
)
1)A3 sheet or 2)A4 sheet and hard code Fit to=1 and
wide by=1(tall).
So that all my data fits in a single sheet to print
( Please
note: Data in my Gridweb will be less than 1 or l.5 pages) .


Can you please
reply me as soon as possible,as it is quite urgent.

thanks in advance to
Shakeel Faiz
Support Developer
Aspose Sialkot Team


bye from Meenaa

Hi,


Attached is Default2.aspx in an archive. It can print data in a page. Please check body’s room style and let us know of your feedback on this.

Hi,

i want “Fit/Scale to Page Printing”. Please reply me

how to check body’s room style?

my body tag style is
body {
margin:0;
padding:0;
}


Urgent Please

thanks
Meenaa

Hi,

There is a line in default2.aspx,

newWin.document.writeln(’<body style=“zoom:0.4;” onload=“window.print();” bottomMargin=“0” leftMargin=“0” topMargin=“0” rightMargin=“0”>’);

You can change the zoom’s value to fit/scale to page printing.