PDFファイルに出力する際にファイル名を指定する方法はありますか? 私はそのようなオプションを見つけることができません。ファイル名ではなくファイルパスのみを指定できます
2 に答える
0
このコードは、その問題の可能な回避策です...
int dev = 0;
String path = "";
String ruta = "";
try
{
path = // Make a method to retrieve the file to save (savefiledialog)
ruta = // Make a method to get the path without the file and extension
dev = visorMapas.PrintToFile(ruta, Awesomium.Core.PrintConfig.Default);
try
{
System.IO.File.Move(ruta + "\\doc_" + dev + ".pdf", path); // This will rename it!
MessageBox.Show("Work done!");
}
catch (Exception ex)
{
// Oh no!
}
}
catch(Exception ex)
{
// Bad thing
}
それで、ファイルを保存します。awesomium でファイルを受け付けるメソッドが作れたらいいなと思います!
于 2014-01-07T18:12:44.123 に答える