私は動的入力テキストを扱っているので、ページは動的に作成する必要があります。ページ 1 が既にいっぱいの場合は、新しいページに書き込む必要があるため、処理されたデータに応じてページ 2、ページ 3 などを作成できます。
現在、私のテキストは切り捨てられています。ページ 1 のみを書き込み、残りのデータは書き込まれません。
以下の私の現在のコード:
//add page 1
theDoc.Page = theDoc.AddPage();
theDoc.AddImageHtml(html, true, 826, true);
//continue adding page if needed
while (theDoc.GetInfo(theID, "Truncated") == "1")
{
theDoc.Page = theDoc.AddPage();
theDoc.AddImageHtml(html, true, 826, true);
}
//save file
String pdfFilePath = WebConfigurationManager.AppSettings["pdfFilePath"];
Guid fileName = Guid.NewGuid();
pdfLink = pdfFilePath + fileName.ToString() + ".pdf";
theDoc.Save(pdfLink);
theDoc.Clear();
変数 html にはすべてのデータ (Web ページ) が含まれています。おそらく while ループに何かが欠けています。どんな助けでも大歓迎です!ありがとう