HTML文字列からPDFファイルを作成しようとしていますが、基本的にHTMLは複数の列を持つテーブルです。問題は、PDFファイルを生成するときに、すべての列を表示できないことです。C#NReco HtmlToPdfConverterページ幅
私はいくつかのオプションを試してみましたが、これまでのところ運:
var generator = new NReco.PdfGenerator.HtmlToPdfConverter();
generator.CustomWkHtmlPageArgs = "--enable-smart-shrinking";
generator.CustomWkHtmlArgs = "--page-width value";
generator.PageWidth = Value;
また、本体やテーブルなどのすべてのHTML要素の幅= 100%
がどのようにHTMLを一つに合わせて作ることができませんしていますページ?あなたのテーブルには、指定さ(単位mm)幅とデフォルトDPIのためのPDFページ上で利用できるより多くのスペースを必要とするので、あなたはすべての列を見ることができない
<!doctype html>
<html lang="en">
<body >
<table border="1" width="100%">
<tr>
<th >Heat Id</th>
<th >Heat Order Id</th>
<th >MSP</th>
<th >Grade</th>
<th >Recipe</th>
<th >Shift</th>
<th >Crew</th>
<th >Start Date</th>
<th >End Date</th>
<th >Tap Date</th>
<th >Tap Wt. (Tons)</th>
<th >Scale Tap Wt. (Tons)</th>
<th >Cast Heat Wt.</th>
<th >Cast Slab Wt.</th>
<th >Charge Wt. (Tons)</th>
<th >Pseudo 1 Bucket</th>
<th >Scrap Wt. (Tons)</th>
<th >Scrap Flux Wt. (Tons)</th>
<th >Alloys Wt. (Lbs)</th>
<th >Tap Flux Wt. (Lbs)</th>
<th >MWH</th>
<th >Avg MW</th>
<th >KWH/Charge Ton</th>
<th >Tap To Tap Time A & B Furnace (min)</th>
<th >Tap To Tap Time Single Furnace (min)</th>
<th >Power On Time (min)</th>
<th >Power On %</th>
<th >Delay Time (min)</th>
<th >Tons/Hr</th>
<th >Total O2</th>
<th >Total O2 SS</th>
<th >Total Gas</th>
<th >Total C</th>
<th >Tap Temp</th>
<th >Tap C</th>
<th >Tap O2</th>
<th >Ladle ID</th>
<th >Comments</th>
<th >Auto Preheat On Time (min)</th>
<th >Auto Preheat Energy (MWH)</th>
<th >Heating/Lancing Energy (MWH)</th>
</tr>
</table>
</body>
</html>
「基本的に」を明確にしてください – lloyd