We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

.net pdf 6.2.0 possible bug? islandscape set to true issue with tables

In testing the 6.2.0 version we have a table that contains rows that goes onto more than 1 page. If we leave the islandscape method to false, the table paginates correctly.

If we set islandscape method to true, the first page paginates (margins are honored) and looks correct. However all subsequent pages lose the top margin and loses 5 rows of data in the table.

It's almost as if the document shows landscape but the table is still being rendered in portrait.

Please advise, Thanks,

Hi,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Please share the template file and sample code to show the issue. This will help us identify the issue soon.

Thank You & Best Regards,

System.Configuration.Configuration rootWebConfig =
System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration("/PRS");

System.Configuration.ConnectionStringSettings connString;

connString = rootWebConfig.ConnectionStrings.ConnectionStrings["PRSConnectionString"];


SqlConnection conn = null;
conn = new SqlConnection((string)connString.ToString());
conn.Open();
string sSql = "";
SqlCommand command = null;
string sID = "0";


int i = 0;
decimal iAmt = 0.0m;

Aspose.Pdf.Generator.Pdf pdf1 = new Aspose.Pdf.Generator.Pdf();
pdf1.IsLandscape = true;


Aspose.Pdf.Generator.MarginInfo marginInfo = new Aspose.Pdf.Generator.MarginInfo();
marginInfo.Top = 50;
marginInfo.Bottom = 50;
marginInfo.Left = 50;
marginInfo.Right = 50;

Aspose.Pdf.License license = new Aspose.Pdf.License();
license.SetLicense("Aspose.Pdf.lic");
string sRpt = "";
string sRpt2 = "";

sRpt = sRpt + "

Accounts Receivable

" + "
" + Request.QueryString["RefEnt"] + "

";
sRpt = sRpt + " ";

sRpt2 = "Accounts Receivable : " + Request.QueryString["RefEnt"] + " for " + Request.QueryString["FromDate"] + " to " + Request.QueryString["ToDate"];

Aspose.Pdf.Generator.Section sec1 = pdf1.Sections.Add();
//sec1.PageInfo.PageWidth = 900;
//sec1.PageInfo.PageHeight = 500;
//sec1.PageInfo.Margin.Top = 50;
//sec1.PageInfo.Margin.Bottom = 50;
//sec1.PageInfo.Margin.Left = 50;
//sec1.PageInfo.Margin.Right = 50;
sec1.PageInfo.Margin = marginInfo;


Aspose.Pdf.Generator.Table tab1 = new Aspose.Pdf.Generator.Table();

sec1.Paragraphs.Add(tab1);

//tab1.DefaultCellPadding = marginInfo; /// <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

tab1.DefaultCellBorder = new Aspose.Pdf.Generator.BorderInfo((int)Aspose.Pdf.Generator.BorderSide.All, 0.1F);


tab1.DefaultColumnWidth = "90px";

tab1.IsFirstRowRepeated = true;
tab1.IsBroken = true;


tab1.Title = " table title goes here ";


tab1.IsVerticalBroken = true;

//tab1.DefaultCellPadding.Left = 5;

//tab1.Rows.Add();
//Aspose.Pdf.Generator.Row row1 = tab1.Rows.Add();

//row1.Cells.Add("Received ");
//row1.Cells.Add("Patient Name ");
//row1.Cells.Add("CaseNumber ");
//row1.Cells.Add("Physician Advisor Other ");
//row1.Cells.Add("CaseManager ");
//row1.Cells.Add("Report Date ");
//row1.Cells.Add("Physician Advisor ");
//row1.Cells.Add("Contract Rate");
//row1.Cells.Add("Time To Review ");
//row1.Cells.Add("Amount Due ");

sRpt2 = "";


sSql = "SELECT [Received], [PatientName], [CaseNumber], PhysicianAdvisorOther, [CaseManager], CONVERT(VARCHAR(10), [ReportDate], 101) AS [ReportDate], [PhysicianAdvisor],[Billing].[ContractRate] as ContractRate, [Billing].[ClientUnits] as [TimeToReview], [Billing].[ARAmt] as AmountDue, [ReferringEntity], [RecReview], [Peer2Peer], [Stage], [ChartReview], [ProdLine], CONVERT(VARCHAR(10), [Completed], 101) AS [Completed], [Review].[id], [Billing].[id] FROM [Review], [Billing] where [Review].[id] = [Billing].[id] and CONVERT(VARCHAR(10),[ReportDate], 101) >= '" + Request.QueryString["FromDate"] + "' and CONVERT(VARCHAR(10), [ReportDate], 101) <= '" + Request.QueryString["ToDate"] + "' and [Stage] = 'QAed' and [Review].[ReferringEntity] = '" + Request.QueryString["RefEnt"] + "' order by [ReportDate], [PatientName] ";
command = new SqlCommand(sSql, conn);

SqlDataReader rdr = command.ExecuteReader();
string sRecDate = "";
int iIndex = 10;
int iRows = 0;
while (rdr.Read())
{
Aspose.Pdf.Generator.Row row2 = tab1.Rows.Add();

i = i + 1;

sRpt = sRpt + "

";

sRecDate = Convert.ToString(rdr.GetDateTime(0));
iIndex = sRecDate.IndexOf(" ");
sRpt = sRpt + "

"; // received
row2.Cells.Add(sRecDate.Substring(0, iIndex));


sRpt = sRpt + "

"; // patient name
row2.Cells.Add(rdr.GetString(1));

sRpt = sRpt + "

"; // casenumber
String sCaseeNumber = rdr.GetString(2);
if (sCaseeNumber.Length > 10)
{
sCaseeNumber.Insert(10, " ");
}
row2.Cells.Add(sCaseeNumber);

sRpt = sRpt + "

"; //PhysicianAdvisorOther
row2.Cells.Add(rdr.GetString(3));

sRpt = sRpt + "

"; //Case manger
row2.Cells.Add(rdr.GetString(4));

sRpt = sRpt + "

"; //report date
row2.Cells.Add(rdr.GetString(5));

sRpt = sRpt + "

"; //phy adv
row2.Cells.Add(rdr.GetString(6));


sRpt = sRpt + "

"; //contract rate
row2.Cells.Add(Convert.ToString(rdr.GetSqlDecimal(7)));


sRpt = sRpt + "

"; //time to review
row2.Cells.Add(Convert.ToString(rdr.GetValue(8)));

sRpt = sRpt + "

"; //amt due
row2.Cells.Add(Convert.ToString(rdr.GetSqlDecimal(9)));


sRpt = sRpt + "

";

iRows = iRows + 1;

}
rdr.Close();


sRpt2 = "";
string sSql1 = "SELECT sum([Billing].ARAmt) FROM [Review], [Billing] where [Review].[id] = [Billing].[id] and CONVERT(VARCHAR(10), [ReportDate], 101) >= '" + Request.QueryString["FromDate"] + "' and CONVERT(VARCHAR(10), [ReportDate], 101) <= '" + Request.QueryString["ToDate"] + "' and [ReferringEntity] = '" + Request.QueryString["RefEnt"] + "' group by [ReferringEntity]";
SqlCommand command1 = null;
command1 = new SqlCommand(sSql1, conn);
iAmt = Convert.ToDecimal(command1.ExecuteScalar());


conn.Close();
conn = null;

sRpt = sRpt + "

Received PatientName CaseNumber Other CaseManager ReportDate PhysicianAdvisor ContractRate TimeToReview AmountDue
" + sRecDate.Substring(0, iIndex) + " " + rdr.GetString(1) + " " + rdr.GetString(2) + " " + rdr.GetString(3) + " " + rdr.GetString(4) + " " + rdr.GetString(5) + " " + rdr.GetString(6) + " " + rdr.GetSqlDecimal(7) + " " + rdr.GetValue(8) + " " + Convert.ToString(rdr.GetSqlDecimal(9)) + "

";
sRpt = sRpt + "Total Case : " + i.ToString() + "
";

sRpt = sRpt + "Amount Due : " + iAmt.ToString();

sRpt = sRpt + " ";

String sFile = @"d:\wwwroot\Accounting\AR\" + Request.QueryString["RefEnt"] + ".html";

TextWriter tw = new StreamWriter(@"d:\wwwroot\Accounting\AR\" + Request.QueryString["RefEnt"] + ".html");
tw.WriteLine(sRpt);
tw.Close();
tw = null;


pdf1.Save("d://wwwroot/Accounting/AR/" + Request.QueryString["RefEnt"] + ".pdf");

Hi,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for sharing the sample code.

We have found your mentioned issue after an initial test. Your issue is registered in our internal issue tracking system with issue id: PDFNEWNET-30598. You will be notified via this forum thread regarding any update against your issue.

Sorry for the inconvenience,

Hi,

What is your timeframe for this bug fix ? Regards

Swee Sim

Hi,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for being patient,

Our development team is working hard to fix your reported issue but it is not resolved at the moment. I have asked the development team to share the ETA for the fix. We will update you once we get the feedback from the development team.

Sorry for any inconvenience caused,

Hello Swee,


Thanks for your patience. I am pleased to share that the issue reported earlier has been fixed and its HotFix will be included in our upcoming release version of Aspose.Pdf for .NET 6.6.0. Please take a look over the attached PDF document which I have generated using this new version.

Soon you will be updated with the status of correction. Please be patient and spare us little time. We apologize for your inconvenience.

The issues you have found earlier (filed as PDFNEWNET-30598) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.