Beispiel #1
0
        private void print(Figure figure, int index, String path)
        {
            vdPrint printer = figure.getDocument().Model.Printer;

            //printer.DocumentName = lineNo.ToString();
            printer.PrinterName     = path + "\\" + index + ".pdf";
            printer.Resolution      = 300;
            printer.OutInBlackWhite = true;
            printer.paperSize       = new System.Drawing.Rectangle(0, 0, 827, 1169);//A4
            printer.LandScape       = false;
            printer.PrintExtents();
            printer.PrintScaleToFit();
            printer.CenterDrawingToPaper();
            printer.PrintOut();
        }
Beispiel #2
0
 /// <summary>
 /// 保存为Pdf
 /// </summary>
 public void saveAsPdf(String fileName)
 {
     try
     {
         vdPrint printer = document.Model.Printer;
         //printer.DocumentName = lineNo.ToString();
         printer.PrinterName     = fileName;
         printer.Resolution      = 300;
         printer.OutInBlackWhite = true;
         printer.paperSize       = new System.Drawing.Rectangle(0, 0, 827, 1169);//A4
         printer.LandScape       = false;
         printer.PrintExtents();
         printer.PrintScaleToFit();
         printer.CenterDrawingToPaper();
         printer.PrintOut();
     }
     catch { }
     finally
     {
     }
 }