我的客户给我发了一个互联网链接:
http://ged.teliway.com/teliged2/appli/ged.php?doc=31393336303232342337313364
当您打开此链接时,它会打开一个pdf文件。 如何在不打开文件的情况下直接打印到这个pdf打印机?
一个想法是用这个pdf文件填充Devexpress报告:
private void simpleButton_PrintTempoOen_Click(object sender, EventArgs e)
{
foreach (string THeLien in TheOrdre.Get_LienTempo(dateEdit_DebImpr.DateTime, dateEdit_FinImpr.DateTime))
{
// Create a PrintingSystem component.
DevExpress.XtraPrinting.PrintingSystem ps = new DevExpress.XtraPrinting.PrintingSystem();
// Create a link that will print a control.
DevExpress.XtraPrinting.PrintableComponentLink link = new PrintableComponentLink(ps);
// Specify the control to be printed.
-->>> link.Component = gridControl_Report;
// Generate a report.
link.CreateDocument();
string filePath = THeLien;
link.PrintingSystem.ExportToPdf(filePath);
System.Diagnostics.Process process = new System.Diagnostics.Process();
process.StartInfo.FileName = filePath;
process.Start();
}
}
我在这个链接上查看了所有方法:http://www.torres.at/pdf-printing-net/