私はPDFに画像をエクスポートする必要があるプロジェクトがあります。 pdfにエクスポートするには、イメージとテキストが必要です。 silverPDF.dllとPdfReaderを使ってこれを行う方法はありますか?画像をPDFにエクスポート
ここにコードします。
private void btnOutlook_Click(object sender, System.Windows.RoutedEventArgs e)
{
XBrush xbrush;
SaveFileDialog savePDF = new SaveFileDialog();
savePDF.Filter = "PDF file format | *.pdf";
if (savePDF.ShowDialog() == true)
{
PdfDocument document = new PdfDocument();
PdfPage page = document.AddPage();
XGraphics gfx = XGraphics.FromPdfPage(page);
XPdfFontOptions options = new XPdfFontOptions(PdfFontEncoding.Unicode, PdfFontEmbedding.Always);
XFont font = new XFont("Huxtable", 20, XFontStyle.Bold, options);
for (int x = 0; x < 10; x++)
{
if (x % 2 == 0)
{
xbrush = XBrushes.Red;
}
else
xbrush = XBrushes.Black;
gfx.DrawString(string.Format("{0}", stringArray[x]), font, xbrush, new XRect(0, (x * 20), page.Width, page.Height), XStringFormats.TopLeft);
}
document.Save(savePDF.OpenFile());
}
}
このコードでは、このコードに画像を挿入してpdfに挿入できますか?何か方法はありますか?すべての返信をありがとう。
(そうでない場合、私は、サンプルコードを貼り付けただろう)iTextSharpライブラリを使用して、私の以前の雇用主で前に似た何かを行ったように私はSilverPDFについて何を知っているが存在しません他のユーティリティクラスを使用してオンラインでいくつかのチュートリアル。 [Here's](http://forums.asp.net/t/1348035.aspx/1)です。 –