给定一组PDF文件,其中一些页面是彩色的,其余的是黑白的,是否有任何程序可以在给定的页面中查找颜色,哪些是黑白?例如,这可以用于打印论文,并且仅花费额外的费用来打印彩色页面.考虑到双面打印的人的奖励积分,并且如果彩色打印机后面是彩色页面,则向彩色打印机发送适当的黑白页面.
在标准PrintDialog中,有四个与选定打印机关联的值:状态,类型,位置和注释.
如果我知道打印机的名称,我怎样才能在C#2.0中获得这些值?
我们需要一台可以通过蓝牙或wifi连接到Android手机的便携式打印机(手持设备,这很重要).
这是我对如何使用打印机的基本理解ColdFusion
.
我的问题:有没有办法在不重启CF服务的情况下重新加载打印机?
这是我们正在尝试解决的问题.CF错误细节:
Error: Printer \\(server)\(printerName) is not available. Available printers are: , ???, , , , ???, , ???, , .
Run Code Online (Sandbox Code Playgroud)
重新启动CF服务修复了这个问题,但最近似乎经常发生这种情况.我想知道是否有一些java代码重新加载打印机,所以它可以自动完成.我们正在使用CF9.
我列举了连接在PC上的打印机.我是用C#System.Printing
命名空间完成的.它运作良好.但主要是它显示软件打印机,如Microsoft XPS Document writer,Microsoft Fax等.我想知道是否可以从枚举中删除这些ssoftware打印机.我所做的代码如下所示:
PrintQueue printQueue = null;
LocalPrintServer localPrintServer = new LocalPrintServer();
// Retrieving collection of local printer on user machine
PrintQueueCollection localPrinterCollection =
localPrintServer.GetPrintQueues(new[] { EnumeratedPrintQueueTypes.Local,
EnumeratedPrintQueueTypes.Connections });
System.Collections.IEnumerator localPrinterEnumerator =
localPrinterCollection.GetEnumerator();
while (localPrinterEnumerator.MoveNext())
{
// Get PrintQueue from first available printer
printQueue = (PrintQueue)localPrinterEnumerator.Current;
if (!printQueue.IsOffline)
{
MessageBox.Show(printQueue.FullName.ToString());
string s = "Printer found " + printQueue.FullName.ToString();
listBox1.Items.Add(s);
}
else
{
// No printer exist, return null PrintTicket
// return null;
}
}
Run Code Online (Sandbox Code Playgroud) 我目前正在编写一个程序,它接受一个指定的文件并用它执行一些操作.目前,它打开它,和/或将其附加到电子邮件并将其邮寄到指定的地址.
该文件可以是以下格式:Excel,Excel报表,Word或PDF.
我目前正在做的是用文件的路径生成一个进程然后启动进程; 但是我也正在尝试修复我添加的错误功能,它根据指定的设置将动词"PrintTo"添加到启动信息中.
我想要完成的任务是我想打开文档,然后将自己打印到程序本身命名的指定打印机.然后,文件应自动关闭.
如果没有办法一般地执行此操作,我们可能能够为每种单独的文件类型提供一种方法.
这是我正在使用的代码:
ProcessStartInfo pStartInfo = new ProcessStartInfo();
pStartInfo.FileName = FilePath;
// Determine wether to just open or print
if (Print)
{
if (PrinterName != null)
{
// TODO: Add default printer.
}
pStartInfo.Verb = "PrintTo";
}
// Open the report file unless only set to be emailed.
if ((!Email && !Print) || Print)
{
Process p = Process.Start(pStartInfo);
}
Run Code Online (Sandbox Code Playgroud)
仍然难倒......可能会像微软那样称呼它,'那是设计'.
我的操作系统是Windows 7 32位.我安装了RedMon1.7,Ghostscript 8.71和GSview 4.9 ; 安装成功.我在Windows 设备和打印机中添加了新的本地打印机,单击了" 创建新端口",然后从" 端口类型"列表中选择了" 重定向端口 " .单击Next并在Add New Port窗口中命名为RPT1:并单击OK,但它显示无法添加指定端口.操作无法完成(错误0x00000001)
我尝试给端口提供不同的名称,RPT2:,RPT4:,VPport:等但都给出了相同的结果.已禁用Windows防火墙但已尝试但仍会出现相同的错误,已禁用防病毒软件(Avira)但未进行任何更改.
什么可以阻止Windows 7添加重定向端口?
顺便说一下,我按照本教程中的说明创建了一个postscript打印机.
http://www.stat.tamu.edu/~henrik/GSPSprinter/GSPSprinter.html
欣赏任何想法或建议.谢谢
我正在使用WMI代码创建器来创建添加联网打印机的代码.
http://img13.imageshack.us/img13/9847/wmicodecreatorwin32prin.png
生成的代码运行良好(无论如何,在我的域帐户下):
using System;
using System.Management;
using System.Windows.Forms;
namespace WMISample
{
public class CallWMIMethod
{
public static void Main()
{
try
{
ManagementClass classInstance =
new ManagementClass("root\\CIMV2",
"Win32_Printer", null);
// Obtain in-parameters for the method
ManagementBaseObject inParams =
classInstance.GetMethodParameters("AddPrinterConnection");
// Add the input parameters.
inParams["Name"] = "\\\\PrintServer\\PrinterName";
// Execute the method and obtain the return values.
ManagementBaseObject outParams =
classInstance.InvokeMethod("AddPrinterConnection", inParams, null);
// List outParams
Console.WriteLine("Out parameters:");
Console.WriteLine("ReturnValue: " + outParams["ReturnValue"]);
}
catch(ManagementException err)
{
MessageBox.Show("An error occurred while …
Run Code Online (Sandbox Code Playgroud) 我使用Tkinter在python中绘制一些行,我想将该图片打印到Windows中的USB连接和/或网络打印机.我该怎么办?
可以ofstream
用来在打印机上书写吗?
例如:
string nameOfPrinter = "xyz";
ofstream onPrinter(nameOfPrinter);
onPrinter << "Printing.... ";
Run Code Online (Sandbox Code Playgroud)
如果我这样做,我会得到打印机的输出(在纸上)?
如果没有,为什么我不会得到输出?请建议使用打印机进行打印的方法.
我的目标是Windows平台(32位)
printers ×10
c# ×4
printing ×4
.net ×2
android ×1
automation ×1
bluetooth ×1
c++ ×1
coldfusion ×1
coldfusion-9 ×1
colors ×1
ghostscript ×1
java ×1
parsing ×1
pdf ×1
postscript ×1
printdialog ×1
process ×1
python ×1
redmon ×1
shellexecute ×1
visual-c++ ×1
wifi ×1
windows ×1
windows-7 ×1