1

AbcPdf ライブラリを使用して、aspx ページを pdf オブジェクトに変換しています。目標を達成しましたが、問題があります。aspx ページのデータは一連のテーブルであり、それらは動的です。つまり、2 つのテーブル、または 30 などのテーブルにすることができます。テーブルの数が 1 ページよりも大きい場合、ライブラリは必要なページを作成しますが、問題はテーブルが切り捨てられることです。

質問: AbcPdf ライブラリで、テーブルやオブジェクトの数が 1 ページより多い場合にそれらを切り捨てない方法はありますか?

4

1 に答える 1

0

うまく機能するサンプルコードは次のとおりです。

http://www.websupergoo.com/helppdf7net/source/4-examples/13-pagedhtml.htm

Doc theDoc = new Doc();
theDoc.Rect.Inset(72, 144);

theDoc.Page = theDoc.AddPage();
int theID;
theID = theDoc.AddImageUrl("http://www.yahoo.com/");

while (true) {
  theDoc.FrameRect(); // add a black border
  if (!theDoc.Chainable(theID))
    break;
  theDoc.Page = theDoc.AddPage();
  theID = theDoc.AddImageToChain(theID);
}

for (int i = 1; i <= theDoc.PageCount; i++) {
  theDoc.PageNumber = i;
  theDoc.Flatten();
}

theDoc.Save(Server.MapPath("pagedhtml.pdf"));
theDoc.Clear();
于 2011-04-05T13:32:44.987 に答える