首页
学习
活动
专区
圈层
工具
发布
    • 综合排序
    • 最热优先
    • 最新优先
    时间不限
  • 来自专栏跟着阿笨一起玩NET

    WinForm中的简单打印

    ,无暇思考,万能的谷歌啊 public class Printer { private DataGridView dataview; private PrintDocument summary> /// <param name="dataview">要打印的DateGridView</param> /// <param name="printDoc">PrintDocument 用于获取打印机的设置</param> public Printer(DataGridView dataview, PrintDocument printDoc, string[] footer - 1; AreaHeight = temptop; } /**/ ///

    /// 在PrintDocument this.printDialog1.ShowDialog() == DialogResult.OK) { this.printDocument1

    1.9K20发布于 2018-09-20
  • 来自专栏静默虚空的博客

    [译] MongoDB Java异步驱动快速指南

    SingleResultCallback<Document> printDocument = new SingleResultCallback<Document>() { @Override 例如,如果我们想查找 key为“i” ,value为71 的 document,我们要按下面的方法做(重用 printDocument 回调)。 collection.find(exists("i")).sort(descending("i")).first(printDocument); 投射域 有时我们不需要将所有的数据都存在一个 document collection.find().projection(excludeId()).first(printDocument); 聚合 有时,我们需要将存储在 MongoDB 中的数据聚合。  collection.aggregate(singletonList(group(null, sum("total", "$i")))).first(printDocument); 注意 当前,还没有专门用于

    3.2K100发布于 2018-01-05
  • 来自专栏跟着阿笨一起玩NET

    c#实现打印功能 c#实现打印功能,可以设置纸张大小,字体和颜色等

    /param> private void btnPrint_Click(object sender, EventArgs e) { // printDocument1 为 打印控件 //设置打印用的纸张 当设置为Custom的时候,可以自定义纸张的大小,还可以选择A4,A5等常用纸型 this.printDocument1 .DefaultPageSettings.PaperSize = new PaperSize("Custum", 500, 300); this.printDocument1.PrintPage this.MyPrintDocument_PrintPage); //将写好的格式给打印预览控件以便预览 printPreviewDialog1.Document = printDocument1

    3.3K10发布于 2019-09-11
  • 来自专栏跟着阿笨一起玩NET

    c#实现打印功能

    /param>         private void btnPrint_Click(object sender, EventArgs e)         {             // printDocument1 为 打印控件             //设置打印用的纸张 当设置为Custom的时候,可以自定义纸张的大小,还可以选择A4,A5等常用纸型             this.printDocument1 .DefaultPageSettings.PaperSize = new PaperSize("Custum", 500, 300);             this.printDocument1.PrintPage this.MyPrintDocument_PrintPage);             //将写好的格式给打印预览控件以便预览             printPreviewDialog1.Document = printDocument1

    3.9K20发布于 2018-09-20
  • 来自专栏Java架构师必看

    显示打印对话框

    ShowDialog()   ---------------------------------------------------------------   Dim  pt  As  Printing.PrintDocument ShowDialog(Me)   ---------------------------------------------------------------   Dim  pd  As  Printing.PrintDocument

    1.6K20发布于 2021-03-22
  • 来自专栏嵌入式技术笔记

    Qt 报表实现(三)---QPainter+QPrinter

    void printDocument(QPrinter *printer); 打印版式设置 横向打印和纵向打印; 打印方向 Portrait 纵向,Landscape:横向 使用如下函数设置 enum private: void drawTable(QPainter *painter, int no); signals: public slots: private slots: void printDocument QPrintPreviewDialog preview(&printer); connect(&preview, SIGNAL(paintRequested(QPrinter*)), this, SLOT(printDocument printer.setOrientation(QPrinter::Portrait); //打印方向 if (printDialog.exec() == QDialog::Accepted) { printDocument -200,m_starty+m_height+2,200,m_rowHeight), Qt::AlignRight, "制表时间:"+dateTime); } void CTestReport::printDocument

    2.2K21发布于 2021-05-31
  • 来自专栏.NET开发那点事

    WPF PrintDialog 支持选择打印范围

    自己处理一下~ public class PrintDialogWithPageRange:PrintDialog     {         public new void PrintDocument             if (this.PageRangeSelection == PageRangeSelection.AllPages)             {                 base.PrintDocument

    63020编辑于 2022-05-07
  • 来自专栏码客

    WPF开发之调用打印机打印文件

    param name="PrinterName">打印机名称</param> private void Print2(string PDFPath, string PrinterName) { PrintDocument pd = new PrintDocument(); Process p = new Process(); ProcessStartInfo startInfo = new ProcessStartInfo

    2.7K20发布于 2021-08-03
  • 来自专栏云计算linux

    C#之二十三 打印和水晶报表

    1、PrintDocumentPrintDocument组件用于设置一些属性,这些属性说明在基于Windows操作系统的应用程序中要打印什么内容以及打印文档的能力,可将它与PrintDialog组件一起使用来控制文档打印的各个方面 ,PrintDocument是最重的Windows打印对象,负责建立和其它打印对象的联系,该组件的常用属性及方法如下: 2、PrintPreviewDialog组件常用属性及方法 属性及方法 说明 DefalultPageSetting “打印到文件“复选框 AllowSelection(属性) 获取或设置一个值,该值指示是否启用“页“选项按钮 Document(属性) 获获取或设置一个值,指示用于获取PrinterSetting类的PrintDocument PrintDocument1 设置要打印的文档 PrintPreviewDialog PrintPreviewDialog1 显示“打印预览“窗口 PrintDialog PrintDialog1 显示 “打印“窗口 主要程序代码: Private void printDocument1_PrintPage(objectsender,System.Drawing.PrintPageEventArgs

    3K00编辑于 2024-12-13
  • 来自专栏coderidea

    深入理解接口隔离原则:构建灵活的面向接口软件

    DocumentEditor { void createDocument(); void openDocument(); void saveDocument(); void printDocument openDocument(); } interface Savable { void saveDocument(); } interface Printable { void printDocument

    44230编辑于 2023-11-14
  • 来自专栏DotNet NB && CloudNative

    C# 打印PDF文档的10种方法

    Spire.Pdf.PdfDocument doc = new Spire.Pdf.PdfDocument(); doc.LoadFromFile(FileName); PaperSize p = null; //实例化一个PrintDocument 对象来获取当前打印机的纸盒信息 PrintDocument printDoc = new PrintDocument(); //遍历打印机纸盒里面的纸张,找到需要的A3 foreach (PaperSize

    3.7K50编辑于 2022-03-22
  • 来自专栏全栈程序员必看

    .NET控件名称缩写一览表「建议收藏」

    sclServiceController 14 tmrTimer 印刷 1 psd PageSetupDialog 2 prd PrintDialog 3 pdc PrintDocument

    1K10编辑于 2022-08-09
  • 来自专栏办公魔盒

    [实用]VB.NET PDF文件批量打印

    (ds_ks.Text) pdf.PrintToPage = pdf_page - Val(ds_js.Text) End If pdf.PrinterName = pt_list.Text pdf.PrintDocument.Print Return True End If End FunctionSub get_pt() ''获取打印机列表 On Error Resume Next Dim prtdoc As New PrintDocument

    3K10发布于 2019-07-22
  • 来自专栏c#Winform自定义控件系列

    使用GDI+画报表

    printDialog1.ShowDialog(); //设置打印文档 4 printPreviewDialog1.Document = this.printDocument1 800); 7 printPreviewDialog1.ShowDialog(); 8 } 9 10 private void printDocument1

    74510发布于 2019-09-11
  • 来自专栏Java架构师必看

    使用.NET自带的类实现DataGrid报表的打印。

    {  ///

     /// DataGrid打印  ///  public class DataGridPrinter  {   private PrintDocument TheDataGrid.Font.SizeInPoints)  + kVerticalCellLeeway);    }   }   public DataGridPrinter(DataGrid aGrid, PrintDocument

    89520发布于 2021-03-22
  • 来自专栏c#Winform自定义控件系列

    RDLC(Reportview)报表直接打印,支持所有浏览器,客户可在linux下浏览使用

    2007"; 89 if (m_streams == null || m_streams.Count == 0) 90 return; 91 PrintDocument printDoc = new PrintDocument(); 92 // string aa = printDoc.PrinterSettings.PrinterName; 93

    2.4K30发布于 2019-09-11
  • 来自专栏菩提树下的杨过

    利用ActiveX实现web页面设置本地默认打印机、纸张大小

    FormInPrinter(string PrinterName, string PaperName) { bool bolRet = false; PrintDocument pd = new PrintDocument(); pd.PrinterSettings.PrinterName = PrinterName; foreach string FormName, decimal Width, decimal Height) { bool bolRet = false; PrintDocument pd = new PrintDocument(); pd.PrinterSettings.PrinterName = PrinterName; foreach

    2.4K20发布于 2018-09-20
  • C#中通过API实现的打印类---修改自泥人张版本

    FormInPrinter(string PrinterName, string PaperName)   {    bool bolRet = false;    System.Drawing.Printing.PrintDocument pd = new System.Drawing.Printing.PrintDocument();    pd.PrinterSettings.PrinterName = PrinterName FormName, decimal Width, decimal Height)   {    bool bolRet = false;    System.Drawing.Printing.PrintDocument pd = new System.Drawing.Printing.PrintDocument();    pd.PrinterSettings.PrinterName = PrinterName

    33100编辑于 2025-04-05
  • 来自专栏跟着阿笨一起玩NET

    推荐一款DataGridView的打印解决方案

    int RowsPerPage;         // Number of Rows per Page         private static System.Drawing.Printing.PrintDocument  printDoc =                        new System.Drawing.Printing.PrintDocument();  // PrintDocumnet Object

    2.2K20发布于 2018-09-18
  • 来自专栏Java架构师必看

    asp是什么缩写[净含量缩写]

     spt SerialPort  scl ServiceController  tmr Timer 印刷  psd PageSetupDialog  prd PrintDialog  pdc PrintDocument

    3K20编辑于 2022-02-28
领券