Search Results

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

Page 29/88 | < Previous Page | 25 26 27 28 29 30 31 32 33 34 35 36  | Next Page >

  • Overloaded function print

    - by Olga Shirokova
    For one of the assignments I need to create an overloaded function print that prints an element or all elements of an array. I have no problem with printing the entire array: for( int i = 0; i < size; i++) cout << list [ i ] <<endl; But how do I make the same function to print only one particular element? The way I see it is to ask a user what to print, either one element or all numbers. Or am I missing something here?

    Read the article

  • Zebra Label Printer with C#

    - by user3702654
    I'm having trouble printing a label using ZDesigner GK420T using C# .NET. I converted the following string to Bytes and passed into the printer. ^XA ^FO3,3^AD^FDZEBRA^FS ^XZ The expected outcome was that the printer was supposed to print 'ZEBRA' but it didn't. My C# Code: StringBuilder sb; sb = new StringBuilder(); if (frmPrintJob._type != 1) { sb.AppendLine("^XA"); sb.AppendLine("^FO3,3^AD^FDZEBRA^FS"); sb.AppendLine("^XZ"); } int intTotalPrinted = 0; for (int i = 1; i <= NoOfCopies; i++) { if (RawPrinterHelper.SendStringToPrinter(PrinterName, sb.ToString()) == true) intTotalPrinted++; } What am I doing wrong here? Do I need any extra code?

    Read the article

  • Print specific part of webpage

    - by Grega Menih
    I'm trying to print a specific part of my application. The application has a list of users, displaying their first and last name. When I click a user I get a popup with more detailed information about them. How would I go about printing just the popup for a user I clicked? The popup looks like this: <div id="user<?=$user->id;?>" class="popup"> <div class="details"> User details... </div> <a href="#print">Print</a> </div> The print button isn't working yet though.

    Read the article

  • How to get "printer ready bytes" from a source in c#?

    - by luis_villase
    Hey everyone! I'm in a bit of trouble here, hoping you can help a fellow programmer out. I have an application that receives a pointer to raw bytes (plus length and stuff) and sends said raw data to a printer. This is important, I have no choice but to use this method to get any printing done. If I send a raw string, it will print with no problem. However, I need to be able to print formatted text, images, etc. So the thing is... I would like to be able to get printer ready bytes from a given source (maybe a pdf, or html, does not matter as long as it contains formatted text and/or images). It would be like "splitting" the print command like so: a) Open file and read data b) Load printer data into memory c) Send bytes to printer Obviously, I've got a) and c) covered, it's b) the one that's breaking my head. Any thoughts? Thanks in advance for your help.

    Read the article

  • How can I print a text in two columns using Java Swing?

    - by Jonas
    I have a longer text saved in a String. I would like to print the text in two columns on a single page. How can I do this using Java Swing? I don't understand how I can wrap the text when it's time to use a new line. I have read Lesson: Printing in the Java tutorial, but I haven't found any useful methods for working with text or Strings except FontMetrics. Is there any good methods in the Java API for this or is there any good library I can use for this?

    Read the article

  • how to get the PageFormat from a Java.awt.print.PrinterJob

    - by Alex
    Hi, I'm trying to use the PageFormat information to modify my javax.swing based printout prior to printing it. I am stumped as to how I can get the PageFormat from the PrintJob (which is obtained using getPrinterJob() and printDialog()). I know there is the getPageFormat method, but I can't figure out how to get the PrintRequestAttributeSet (which is not the printJob.getPrintService().getPrintAttributes()). Honestly, all I really want to know is the width and height of the page. Any ideas on how I can do that? Thanks.

    Read the article

  • Should i keep #wrapper{ width:100%} in print css?

    - by metal-gear-solid
    Should i keep #wrapper{ width:100%} in print css? because on screen my design is a fixed width design 960 px. but there are so many paper type and sizes in the world and anybody can take print on any size paper, bigger and smaller. So if in print css i do not specify relative width then i think print of page will cut of from right size if user will take print on the paper size which can smaller or larger width than my site #wrapper width (960px). then it can create problem. http://www.dpandi.com/paper/index.html printer also leave some margin when printing. So should keep everything is relative size in print css?

    Read the article

  • How to fix the endless printing loop bug in Nevrona Rave

    - by Sean B. Durkin
    Nevrona Designs' Rave Reports is a Report Engine for use by Embarcadero's Delphi IDE. This is what I call the Rave Endless Loop bug. In Rave Reports version 6.5.0 (VCL10) that comes bundled with Delphi 2006, there is a nortorious bug that plagues many Rave report developers. If you have a non-empty dataset, and the data rows for this dataset fit exactly into a page (that is to say there are zero widow rows), then upon PrintPreview, Rave will get stuck in an infinite loop generating pages. This problem has been previously reported in this newsgroup under the following headings: "error: generating infinite pages"; Hugo Hiram 20/9/2006 8:44PM "Rave loop bug. Please help"; Tomas Lazar 11/07/2006 7:35PM "Loop on full page of data?"; Tony Chistiansen 23/12/2004 3:41PM reply to (3) by another complainant; Oliver Piche "Endless lopp print bug"; Richso 9/11/2004 4:44PM In each of these postings, there was no response from Nevrona, and no solution was reported. Possibly, the problem has also been reported on an allied newsgroup (nevrona.public.rave.reports.general), to wit: 6. "Continuously generating report"; Jobard 20/11/2005 Although it is not clear to me if (6) is the Rave Endless loop bug or another problem. This posting did get a reply from Nevrona, but it was more in relation to multiple regions ("There is a problem when using multiple regions that go over a page-break.") than the problem of zero widows.

    Read the article

  • .Net Crystal Report printing application running on termianal service connection errors when session

    - by MrEdmundo
    I have created a .Net application to run on an App Server that gets requests for a report and prints out the requested report. The C# application uses Crystal Reports to load the report and subsequently print it out. The application is run on Server which is connected to via a Remote Desktop connection under a particular user account (required for old apps). When I disconnect from the Remote Session the application starts raising exceptions such as: Message: CrystalDecisions.Shared.CrystalReportsException: Load report failed This type of error is never raised when the Remote Session is active. The server running the app is running Windows Server 2003, my box which creates the connection is Windows XP. I appreciate this is fairly weird, however I cannot see any problem with the application deployment I have created. Does anyone know what could be cause this issue? EDIT: I bit the bullet and created the application as a windows service, obviously this doesn't take long I just wasn't convinced it would solve the problem. Anyway it doesn't!!! I have also tried removing the multi-thread code that was calling the print function asynchronously. I did this in order to simply the app and narrow down the reason it could fail. Anyway, this didn't improve the situation either! EDIT: The two errors I get are: System.Runtime.InteropServices.COMException (0x80000201): Invalid printer specified. at CrystalDecisions.ReportAppServer.Controllers.PrintOutputControllerClass.ModifyPrinterName(String newVal) at CrystalDecisions.CrystalReports.Engine.PrintOptions.set_PrinterName(String value) at Dsa.PrintServer.Service.Service.PrintCrystalReport(Report report) The printer isn't invalid, this is confirmed when 60 seconds later the time ticks and the report is printed successfully. And The request could not be submitted for background processing. at CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.GetLastPageNumber(RequestContext pRequestContext) at CrystalDecisions.ReportSource.EromReportSourceBase.GetLastPageNumber(ReportPageRequestContext reqContext) --- End of inner exception stack trace --- at CrystalDecisions.ReportAppServer.ConvertDotNetToErom.ThrowDotNetException(Exception e) at CrystalDecisions.ReportSource.EromReportSourceBase.GetLastPageNumber(ReportPageRequestContext reqContext) at CrystalDecisions.CrystalReports.Engine.FormatEngine.PrintToPrinter(Int32 nCopies, Boolean collated, Int32 startPageN, Int32 endPageN) at CrystalDecisions.CrystalReports.Engine.ReportDocument.PrintToPrinter(Int32 nCopies, Boolean collated, Int32 startPageN, Int32 endPageN) at Dsa.PrintServer.Service.Service.PrintCrystalReport(Report report) EDIT: I ran filemon to check if there were any access issue. At the point when the error occurs file mon reports Request: OPEN | Path: C:\windows\assembly\gac_msil\system\2.0.0.0__b77a5c561934e089\ws2_32.dll | Result: NOT FOUND | Other: Attributes Error

    Read the article

  • Use a System.Drawing.Printing.PrintDocument to generate a PDF in memory

    - by MarkB29
    Does anyone know if the following is possible and if so what the best way of doing it is for free? I am generating a PrintDocument in a project I am currently working on and displaying a print dialog box so a user can choose which printer they want to use etc. The is currently a windows form application and if a user wants to print to a PDF they can select to print to CutePDF or something similar. However I am now putting a ASP.Net web frontend on the application and want to use the same code to generate the PrintDocument but want to print it to a PDF on the fly and serve it up via the Response stream in the format of a PDF download. So my question is....How can I use the current PrintDocument and generate a PDF in memory from it?? Thanks

    Read the article

  • Hibernate: OutOfMemoryError persisting Blob when printing log message

    - by paul
    I have a Hibernate Entity: @Entity class Foo { //... @Lob public byte[] getBytes() { return bytes; } //.... } My VM is configured with a maximum heap size of 512 MB. When I try to persist an object which has a 75 MB large object, I get an OutOfMemoryError. The names of the methods in the stack trace (StringBuilder, ByteArrayBlobType.toLoggableString, pretty.Printer.toString) suggest that hibernate is trying to write a very large log message that contains my object. Am I correct about why hibernate is using so much memory? What is the simplest way to work around this problem? java.lang.OutOfMemoryError: Java heap space at java.lang.AbstractStringBuilder.<init>(AbstractStringBuilder.java:44) at java.lang.StringBuilder.<init>(StringBuilder.java:81) at org.hibernate.type.ByteArrayBlobType.toString(ByteArrayBlobType.java:117) at org.hibernate.type.ByteArrayBlobType.toLoggableString(ByteArrayBlobType.java:127) at org.hibernate.pretty.Printer.toString(Printer.java:53) at org.hibernate.pretty.Printer.toString(Printer.java:90) at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:97) at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:26) at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000) at org.jboss.seam.persistence.HibernateSessionProxy.flush(HibernateSessionProxy.java:181)

    Read the article

  • Printing Stdout In Command Line App Without Overwriting Pending User Input

    - by Chris S
    In a basic Unix-shell app, how would you print to stdout without disturbing any pending user input. e.g. Below is a simple Python app that echos user input. A thread running in the background prints a counter every 1 second. import threading, time class MyThread( threading.Thread ): running = False def run(self): self.running = True i = 0 while self.running: i += 1 time.sleep(1) print i t = MyThread() t.daemon = True t.start() try: while 1: inp = raw_input('command> ') print inp finally: t.running = False Note how the thread mangles the displayed user input as they type it (e.g. hell1o wo2rld3). How would you work around that, so that the shell writes a new line while preserving the line the user's currently typing on?

    Read the article

  • Django template-printing variables

    - by Hulk
    In django views def add(request): dict{} co_data = optarr dict.update({'co_data' : co_data}) logging.debug(co_data) return render_to_response('scheme/create.html',context_instance=RequestContext(request,{'dict': dict})) And data has the following string 1##2##3##4## And in the template when i say {{co_data}} it doesnt display the values.Please point out whats wrong in the code. Thanks..

    Read the article

  • Printing entire array in C#

    - by DMan
    I have a simple 2D array: int[,] m = {{0,0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0,0} }; How can I print this out onto a text file or something? I want to print the entire array onto a file, not just the contents. For example, I don't want a bunch of zeroes all in a row: I want to see the {{0,0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0,0} }; in it.

    Read the article

  • C++ alignment when printing cout <<

    - by user69514
    Is there a way to align text when priting using cout? I'm using tabs, but when the words are too big they won't be aligned anymore Sales Report for September 15, 2010 Artist Title Price Genre Disc Sale Tax Cash Merle Blue 12.99 Country 4% 12.47 1.01 13.48 Richard Music 8.49 Classical 8% 7.81 0.66 8.47 Paula Shut 8.49 Classical 8% 7.81 0.72 8.49

    Read the article

  • noweb dpp filter and latex not printing curly braces

    - by Dervin Thunk
    Hello. Well, this smells like a tumbleweed, but I will ask it anyway. Suppose you have a noweb file with some c# code. You also have the c++ pretty-print filter dpp. If you run the command noweave -filter ./dpp -x test.nw > csharp.tex on the file below, it will print everything except for the curly braces. Instead of them, I get an em-dash and a closing quotations marks (i.e. ?) in the dvi. The tex source looks fine... Any ideas? @ C\# test file <<test.c>>= while( (a[right] >= pivot) && (left < right) ) { right--; }

    Read the article

  • Python: Pretty printing a xml file directly from a tar.gz package

    - by EddyR
    This is the first Python script I've tried to create. I'm reading a xml file from a tar.gz package and then I want to pretty print it. However I can't seem to turn it from a file-like object to a string. I've tried to do it a few different ways including str(), tostring(), etc but nothing is working for me. For testing I just tried to print the string at "print myfile[0:200]" and it always generates "<tarfile.ExFileObject object at 0x10053df10>" import os import sys import tarfile from xml.dom.minidom import parseString tar = tarfile.open("data/ucd.all.flat.tar.gz", "r") getfile = tar.extractfile("ucd.all.flat.xml") myfile = str(getfile) print myfile[0:200] output = parseString(getfile).toprettyxml() print output tar.close()

    Read the article

  • printing multi dimentional array

    - by Honey
    i have this multi dimentional array that i want to print into a table having each record/item go into its own row but it goes column wise. this is the output that im getting: http://mypetshopping.com/product.php ps: the value of $product will by dynamic based on what product is being viewed. <?php session_start(); ?> <table> <thead> <tr> <th>Name</th> <th>Hash</th> <th>Quantity</th> <th>Size</th> <th>Color</th> </tr> </thead> <tbody> <?php function addCart($product, $quantity, $size,$color) { $hash = md5($product); $_SESSION['cart'][$product]['name'] = $product; $_SESSION['cart'][$product]['hash'] = $hash; $_SESSION['cart'][$product]['quantity'] = $quantity; $_SESSION['cart'][$product]['size'] = $size; $_SESSION['cart'][$product]['color'] = $color; } addCart('Red Dress',1,'XL','red'); addCart('Blue Dress',1,'XL','blue'); addCart('Slippers',1,'XL','orange'); addCart('Green Hat',1,'XXXL','green'); $cart = $_SESSION['cart']; foreach($cart as $product => $array) { foreach($array as $key => $value) { ?> <tr> <td><?=$value;?></td> <td><?=$value;?></td> <td><?=$value;?></td> <td><?=$value;?></td> <td><?=$value;?></td> </tr> <?php } } ?>

    Read the article

  • Printing an NSDocument

    - by Brian Postow
    I'm trying to print a document. The document is an array of NSImageReps, or a single NSPDFImageRep, which has multiple pages. I'm having trouble figuring out how to use the NSPrintOperation class to print this. The NSPrintOperation seems to need an NSView to print. Do I need to manually add each image into the view at a calculated position and then let it do the pagination? that seems like it isn't in the spirit of Cocoa... is there some technique that I'm missing?

    Read the article

  • Why Java SimpleDateFormat().parse() is printing weird formate?

    - by MAK
    My input is String formated as the following: 3/4/2010 10:40:01 AM 3/4/2010 10:38:31 AM My code is: DateFormat dateFormat = new SimpleDateFormat("dd/mm/yyyy hh:mm:ss aa"); try { Date today = dateFormat.parse(time); System.out.println("Date Time : " + today); } catch (ParseException e) { e.printStackTrace(); } the output is: Sun Jan 03 10:38:31 AST 2010 Sun Jan 03 10:40:01 AST 2010 I'm not sure from where the day (Sun) came from? or (AST)? and why the date is wrong? I just wanted to keep the same format of the original String date and make it into a Date object. I'm using Netbeans 6.8 Mac version.

    Read the article

  • Problem with printing output using PHP library

    - by Jack
    I am using the PHP library tools on a we hosting service( with cURL enabled). I have so far tried 2 tools but I cant get the output of my code to print to the screen. http://github.com/jdp/twitterlibphp - PHP library Sample code - <?php require("twitter.lib.php"); $twitter = new Twitter("xxxx", "xxxxx"); $public_timeline = $twitter->getPublicTimeline(); echo'<pre>'; print_r( $public_timeline ); echo'</pre>'; ?> I don't get any output. What can be the problem? Do I need to install any modules or packages? Please Help

    Read the article

  • Prevent python from printing newline

    - by wrongusername
    I have this code in Python inputted = input("Enter in something: ") print("Input is {0}, including the return".format(inputted)) that outputs Enter in something: something Input is something , including the newline I am not sure what is happening; if I use variables that don't depend on user input, I do not get the newline after formatting with the variable. I suspect Python might be taking in the newline as input when I hit return. How can I make it so that the input does not include any newlines so that I may compare it to other strings/characters? (e.g. something == 'a')

    Read the article

< Previous Page | 25 26 27 28 29 30 31 32 33 34 35 36  | Next Page >