Search Results

Search found 2199 results on 88 pages for 'printing'.

Page 35/88 | < Previous Page | 31 32 33 34 35 36 37 38 39 40 41 42  | Next Page >

  • C# WebBrowser.ShowPrintDialog() not showing

    - by jeah_wicer
    I have this peculiar problem while wanting to print a html-report. The file itself is a normal local html file, located on my hard drive. To do this, I have tried the following: public static void PrintReport(string path) { WebBrowser wb = new WebBrowser(); wb.Navigate(path); wb.ShowPrintDialog() } And I have this form with a button with the click event: private void button1_Click(object sender, EventArgs e) { string path = @"D:\MyReport.html"; PrintReport(path); } This does absolutely nothing. Which is kind of strange... but things get stranger... When editing the print function to do the following: public static void PrintReport(string path) { WebBrowser wb = new WebBrowser(); wb.Navigate(path); MessageBox.Show("TEST"); wb.ShowPrintDialog() } It works. Yes, only adding a MessageBox. The MessageBox is showing and after it comes the print dialog. I have also tried with Thread.Sleep(1000) instead, which doesn't work. Can anyone explain to me what's going on here? Why would a messagebox make any difference? Can it be some kind of permission problem? I've reproduced this on both Windows 7 and 8, same thing. I made this small application with only the above code to isolate the problem. I am quite sure it works on windows XP though, since an older version of the application I'm working on runs on it. When trying to do this directly with the mshtml-dll instead I also get problems. Any input or clarification is greatly appreciated!

    Read the article

  • Brother bPAC SDK - Examples only print after Form is shown

    - by Scoregraphic
    Hi there We have a small Brother Barcode printer which we like to control from a WCF Service. Brother has an API called bPAC SDK version 3 which allows to print those labels. But the problem arises, as soon as we want to print from code only without showing a windows with a button on it. As an addition, this happens only if you want to print a QR-code as barcode. Standard EAN-codes seems to work. Below is a small piece of code which outputs the stuff to a bitmap instead of the printer (debugging reasons). DocumentClass doc = new DocumentClass(); if (doc.Open(templatePath)) { doc.GetObject("barcode1").Text = txtCompany.Text; doc.GetObject("barcode2").Text = txtName.Text; doc.Export(ExportType.bexBmp, testImagePath, 300); doc.Close(); } If this is called by a button click, it perfectly works. If this is called in Form.Show-event, it perfectly works. If this is called in Form.Load-event, it does NOT work. If this is called in a Form constructor, it does NOT work. If this is called somewhere else (without forms), it does NOT work. DocumentClass and related classes are COM-objects, so I guess the form setup/show process seems to do something which is not done without opening forms. I tried calling CoInitialize with a p/invoke, but it hadn't changed anything. Is there anyone out there willing and able to help me? Are there any alternatives which (also) MUST be able to print directly on our Brother printer? Thanks lot.

    Read the article

  • Windows Spooler Events API doesn't generate events for network printers

    - by clyfe
    the context i use Spooler Events API to capture events generated by the spooler when a user prints a document ie. FindFirstPrinterChangeNotification FindNextPrinterChangeNotification the problem When I print a document on the network printers from my machine no events are captured by the monitor (uses the fuctions above) Notice Events ARE generated OK for local printers, only Network Printers are problematic!

    Read the article

  • QuickReport throws "There Is No Default Printer Currently Selected" Exception

    - by M Schenkel
    I have created a Delphi Service which prints TQuickReports. Everything works fine if compiled and run as a Windows Application. But when converted to operate as a service trying to create a form containing a TQuickRep component throws the exception. This service runs fine on many other boxes but not this one in particular. Here are some details: Using QuickReport version 4.07 Box is a Windows Server 2008 operating system. Using Delphi 2007 Printer.Printers.Count is returning a positive value. In fact I can list out all of the printers. I have tried running the service both using Local System Account and Logged on as an Admin.

    Read the article

  • How to generate and print large XPS documents in WPF?

    - by bitbonk
    I would like to generate (and then print or save) big XPS documents (400 pages) from my WPF application. We have some large amount of in-memory data that needs to be written to XPS. How can this be done without getting an OutOfMemoryException? Is there a way I can write the document in chunks? How is this usually done? Should I not be using XPS for large files in the first place? The root cause of the OutOfMemoryException seems to be the creation of the huge FlowDocument. I am creating the full FlowDocument and then sending it to the XPS document writer. Is this the wrong approach?

    Read the article

  • How do I deselect grid row when grouping in David Poll's silverlight CollectionPrinter

    - by kpg
    I'm using David Poll's CollectionPrinter and modifications by Fama to perform grouping. I'm using the control to print a datagrid with grouping and it works well if not a little slow. Problem: When the grid is displayed the first row of the grid is selected and the first cell of the row is also selected. I want to either deselect the row or change the datagrid template to make selected rows/cells appear as not selected. I tried to specify a grid template to change the row/cell selection appearance but when I added the default template I got a COM error of all things - anyway I concluded that what I was doing was not compatible with the SLab libraries, or perhaps because the grid was specified in a datatemplate. In any case I abandoned that approach. Since I have the SLab source if I understood it more there may be a way to deselect the row after from that side of things - but I know the SLaB CommectionPrinter does not rely on the data template to be a grid, so I'm not sure how to modify the code to accomplish what I want. Question: How can I prevent the row from being selected or deselect it once it is or change the appearance of the selectd row when using the CollectionPrinter with grouping? Note that the row selection problem may occur without grouping as well, I don;t know, but it definatly does with grouping.

    Read the article

  • WIA Automation for scanner color intent is not working

    - by Mike Nicholson
    I cannot get my Canon Pixma MP150 to scan a color scan from c# code. The following code is resulting in a black and white image, or if I change the value of 6146 to 2 then a grayscale image is created. I would like to be able to have a color scan from code. I know the scanner does color images because I can do one through the xp wizard in "scanners and camera". Can anyone help me figure out what value I am not setting for a color scan. All documentation and examples I can find just say to change the value of 6146. Thank you for taking the time to read this! private void ScanAndSaveOnePage () { WIA.CommonDialog Dialog1 = new WIA.CommonDialogClass(); WIA.DeviceManager DeviceManager1 = new WIA.DeviceManagerClass(); System.Object Object1 = null; System.Object Object2 = null; WIA.Device Scanner = null; Scanner = Dialog1.ShowSelectDevice(WIA.WiaDeviceType.ScannerDeviceType, false, false); WIA.Item Item1 = Scanner.Items[1]; setItem(Item1, "6146", 1); setItem(Item1, "6147", 150); setItem(Item1, "6148", 150); setItem(Item1, "6151", 150 * 8.5); setItem(Item1, "6152", 150 * 11); WIA.ImageFile Image1 = new WIA.ImageFile(); WIA.ImageProcess ImageProcess1 = new WIA.ImageProcess(); Object1 = (Object)"Convert"; ImageProcess1.Filters.Add(ImageProcess1.FilterInfos.get_Item(ref Object1).FilterID, 0); Object1 = (Object)"FormatID"; Object2 = (Object)WIA.FormatID.wiaFormatBMP; ImageProcess1.Filters[1].Properties.get_Item(ref Object1).set_Value(ref Object2); Object1 = null; Object2 = null; Image1 = (WIA.ImageFile)Item1.Transfer(WIA.FormatID.wiaFormatBMP); string DestImagePath = @"C:\test.bmp"; File.Delete(DestImagePath); Image1.SaveFile(DestImagePath); } private void setItem (IItem item, object property, object value) { WIA.Property aProperty = item.Properties.get_Item(ref property); aProperty.set_Value(ref value); }

    Read the article

  • Send ESC commands to a printer in C#

    - by Ewerton
    My application needs to print invoices, then a get the invoice from database, insert informations os the invoice in a big string (tellling the line, column, etc). after this a have the string ready to be sent to a printer. My problem is: I need to put some ESC/P commands/characters in my big string i try to do something like this: char formFeed = (char)12; Convert.ToChar(12); MyBigString.Insert(10, formFeed); whit this, the line 10 will do a FormFeed, but this not work NOTE: i send the MybigString all at once to printer. to make my code works i need to send the data line by line to a printer ? Thanks for the helps. PS: Sorry my English, i'am a Brazilian developer which dont speak English (yet).

    Read the article

  • How to print long bill in WPF

    - by RAJ K
    I have a WPF application for product purchase billing. My client wants that app should be able to bill and print upto 1-99 products at once. they use bill printer (mini size printer) for billing. How I can achieve this in WPF C#. Any code or link would be helpful. Thank you...

    Read the article

  • print a linear linked list into a table

    - by user1796970
    I am attempting to print some values i have stored into a LLL into a readable table. The data i have stored is the following : DEBBIE STARR F 3 W 1000.00 JOAN JACOBUS F 9 W 925.00 DAVID RENN M 3 H 4.75 ALBERT CAHANA M 3 H 18.75 DOUGLAS SHEER M 5 W 250.00 SHARI BUCHMAN F 9 W 325.00 SARA JONES F 1 H 7.50 RICKY MOFSEN M 6 H 12.50 JEAN BRENNAN F 6 H 5.40 JAMIE MICHAELS F 8 W 150.00 i have stored each firstname, lastname, gender, tenure, payrate, and salary into their own List. And would like to be able to print them out in the same format that they are viewed on the text file i read them in from. i have messed around with a few methods that allow me to traverse and print the Lists, but i end up with ugly output. . . here is my code for the storage of the text file and the format i would like to print out: public class Payroll { private LineWriter lw; private ObjectList output; ListNode input; private ObjectList firstname, lastname, gender, tenure, rate, salary; public Payroll(LineWriter lw) { this.lw = lw; this.firstname = new ObjectList(); this.lastname = new ObjectList(); this.gender = new ObjectList(); this.tenure = new ObjectList(); this.rate = new ObjectList(); this.salary = new ObjectList(); this.output = new ObjectList(); this.input = new ListNode(); } public void readfile() { File file = new File("payfile.txt"); try{ Scanner scanner = new Scanner(file); while(scanner.hasNextLine()) { String line = scanner.nextLine(); Scanner lineScanner = new Scanner(line); lineScanner.useDelimiter("\\s+"); while(lineScanner.hasNext()) { firstname.insert1(lineScanner.next()); lastname.insert1(lineScanner.next()); gender.insert1(lineScanner.next()); tenure.insert1(lineScanner.next()); rate.insert1(lineScanner.next()); salary.insert1(lineScanner.next()); } } }catch(FileNotFoundException e) {e.printStackTrace();} } public void printer(LineWriter lw) { String msg = " FirstName " + " LastName " + " Gender " + " Tenure " + " Pay Rate " + " Salary "; output.insert1(msg); System.out.println(output.getFirst()); System.out.println(" " + firstname.getFirst() + " " + lastname.getFirst() + "\t" + gender.getFirst() + "\t" + tenure.getFirst() + "\t" + rate.getFirst() + "\t" + salary.getFirst()); } }

    Read the article

  • Print gif using java on a 4x6" paper

    - by Wienczny
    What is the best way in Java to print a gif given as byte[] or ByteArrayInputStream on a paper with a size of 4x6 inches? This: PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet(); aset.add(new MediaSize(4, 6, Size2DSyntax.INCH)); aset.add(new Copies(1)); PrintService[] pservices = PrintServiceLookup.lookupPrintServices(DocFlavor.INPUT_STREAM.GIF, aset); DocPrintJob printJob = pservices[0].createPrintJob(); Doc doc = new SimpleDoc(sap.getGraphicImageBytes(), DocFlavor.INPUT_STREAM.GIF, null); printJob.print(doc, aset); does not work because the MediaSize is not a PrintRequestAttribute. This should be almost the same as in Package javax.print Description

    Read the article

  • How can I write javascript that will load and print a web page to an image file and put that file in a specified location

    - by Rben
    Here's what I want to do: Load a web page from a specific location Print that web page into a jpeg, png, or other graphic file format Upload that image to another site, or save it to a location on my local network I know about window.print(), but that always seems to open up a print window, and I'd like to do as much of this operation silently as possible. Essentially, I want to be able to take a snap shot of the web page so it can be put in a directory that is accessed by one of those electronic picture frames. They can either access a web-based service, or a directory on the local network. Thanks in advance for your help, Rben

    Read the article

  • How to get the PrintDocumentImageableArea for a given PrintQueue without going through PrintDialog?

    - by Patrick Klug
    From MSDN (link): The type PrintDocumentImageableArea has no public constructor. Hence, the variable documentImageableArea must be declared and assigned to Nothing and only then passed to the method. This method displays a PrintDialog requiring input from the user. After the user has selected a printer, paper size, and orientation and closed the dialog, documentImageableArea points to an actual object and its properties are initialized. I have my custom print dialog and need to get the PrintDocumentImageableArea of a given PrintQueue and PrintTicket! (I need the margin's I need to apply) From what I can gather it is quite common for anything but the most basic applications to use their own custom print dialog. There must be a way to get to this information!? Any input appreciated!

    Read the article

  • How can I easily print multiple layers on multiple pages in Visio

    - by Mark Robinson
    We've created a flow chart using Visio that has multiple layers. (The background is that each layer represents variations on a basic process.) Now we want to be able to print each layer individually. Currently this involves lots of clicking to select the correct layer and and then press print - then repeating this for each of the 10 layers. Is there a simpler way? E.g. define each layer once and use a "print each layer" tool / macro?

    Read the article

  • Crystal reports 11 RDC (COM API) displays printer dialog even when I tell it not to prompt

    - by bdonlan
    I'm using Crystal Reports 11's RDC (COM) API to print. My code looks like this: HRESULT res = m_Report->SelectPrinter(b_driver, b_device, b_port); if (FAILED(res)) return res; // For these calls, the #import wrapper throws on error m_Report->PutPrinterDuplex(dmDuplex); m_Report->PutPaperSize(dmPaperSize); m_Report->PutPaperSource((CRPaperSource)pdlg->GetDevMode()->dmDefaultSource); if (m_Report->GetPaperOrientation() == crDefaultPaperOrientation) m_Report->PutPaperOrientation(crPortrait); VARIANT vfalse; VariantInit(&vfalse); vfalse.vt=VT_BOOL; vfalse.boolVal=0; res = m_Report->PrintOut(vfalse); However, at the end of all this, crystal reports still shows its own printer selection dialog - but only for some reports, it seems. Why does crystal reports show a print dialog even when I pass false for promptUser? And how, then, can I suppress crystal reports' internal printer selection dialog and force it to use my values? Edit: Whoops, CR11, not CR9. Some further information: The reports that work properly (ie, do not show the print dialog) are generated internally using the RDC API; we create a new report object, import subreports into it, then print the result. No problem there. The reports that do not work properly (ie, force the print dialog to open) have been created with a previous version of crystal reports; however, opening and saving the report does not seem to help. Sample reports in the Crystal Reports installation directory show the same problem. I tried reproducing with VBScript; however, the result was that nothing was printed at all (no dialog, no nothing): Set app = CreateObject("CrystalRuntime.Application.11") Set report = app.OpenReport("C:\Program Files\Business Objects\Crystal Reports 11.5\Samples\en\Reports\General Business\Inventory Crosstab.rpt") report.PrintOut(True) rem Testing with a True parameter to force a print dialog - but no printout and nothing appears (no error either though)

    Read the article

  • Print out PDF with javascript

    - by Daniel Abrahamsson
    I have a need to print out multiple PDFs with the help of javascript. Is this even possible without rendering each PDF in a separate window and calling window.print()? Basically, I would like to be able to do something like print('my_pdf_url').

    Read the article

  • How to print PDF on default network printer using GhostScript (gswin32c.exe) shell command

    - by Maciej
    I'd like to print PDF file(s) on windows' network printer via GhostScript. (I dont want to use Adobe Reader) I've read gswin32c.exe which can do the job. I experimented with many commands and coudn't find the way how to force gs to print PDF on my (windows default) network drive. I don't need point exact network printer- default can be used. But if there is no such option I'm happy to pass printer name as well. (I've tried with param -SDevice="\server_IP\printer_name" but this didnt work as well...) Command working under Windows cmd: gswin32c -dPrinted -dBATCH -dNOPAUSE -dNOSAFER -q -dNumCopies=1 -sDEVICE=ljet4 -sOutputFile="\\spool\\\Server_Name\Printer_name" "C:\test.pdf" Method created base on above - doesnt work and thorws exception. (Error code = 1) /// <summary> /// Prints the PDF. /// </summary> /// <param name="ghostScriptPath">The ghost script path. Eg "C:\Program Files\gs\gs8.71\bin\gswin32c.exe"</param> /// <param name="numberOfCopies">The number of copies.</param> /// <param name="printerName">Name of the printer. Eg \\server_name\printer_name</param> /// <param name="pdfFileName">Name of the PDF file.</param> /// <returns></returns> public bool PrintPDF (string ghostScriptPath, int numberOfCopies, string printerName, string pdfFileName) { ProcessStartInfo startInfo = new ProcessStartInfo(); startInfo.Arguments = " -dPrinted -dBATCH -dNOPAUSE -dNOSAFER -q -dNumCopies=" + Convert.ToString(numberOfCopies) + " -sDEVICE=ljet4 -sOutputFile=\"\\\\spool\\" + printerName + "\" \"" + pdfFileName + "\""; startInfo.FileName = ghostScriptPath; startInfo.UseShellExecute = false; Process process = Process.Start(startInfo); return process.ExitCode == 0; } Any idea how to make it working under C#?

    Read the article

  • How to show printer properties/preferences dialog?

    - by Patrick Klug
    I can't figure out how to properly show the printer preference dialog of a given printer so that the user can change the printer settings. Most of the examples that I can find online manage to show the dialog but any changes the user might make are lost which makes it useless. Example: http://www.codeproject.com/KB/system/PrinterPropertiesWindow.aspx (I tried to change the code as suggested by BartJoy but that didn't fix it) Does anyone know how to do this properly?

    Read the article

  • Generated Word 2007 prints scrunched up

    - by Brad
    Our website generates Word 2007 documents from database data by creating the xml, zipping it and sending it as a MIME attachment. Usually, this works fine. On occasion, the document will look fine on the screen, but not when printed. The letters end up scrunched together. Here is an example. This is a 1 page document, the first page is a scan of the document printed correctly, the 2nd page is a scan of the same document printed with the problem. Here is the original document. Has anyone ever seen anything similar? I cannot figure out if this is a bug in the code that generates our XML, a bug in the printer driver or a bug in Word. Any ideas would be greatly appreciated. Please note that this document does not contain any real data other than public information, but disregard the contents - this is not an official document, and only meant to illustrate our problem.

    Read the article

  • how to connect to ethernet printer throught python?

    - by Prasanth
    How can i connect and send data to a Ethernet receipt printer Epson-T88V through python2.7, i have set the ipaddress of the Ethernet printer manually and the utility software communication is also successful. How do i detect and connect to these printers and send data to print. Is there and module for Ethernet connection in python. Using more than one Ethernet printer and separate data to be printed simultaneously from a single system, i am using windows xp and python 2.7 hope i am clear Thanks.

    Read the article

< Previous Page | 31 32 33 34 35 36 37 38 39 40 41 42  | Next Page >