Questions tagged [printing]

-1

votes
0

answer
16

Views

How to print items of class including os('clear')?

Can somebody explain to me why the menu() function in the code below does not print the attributes of the class person while menu2() does? Thank you import os class person(): def __init__(self, name, age): self.name = name self.age = age def printAttr(self): print([self.name, self.age]) def menu(tit...
user10161844
1

votes
2

answer
49

Views

How to set a prefix for all print() output in python?

I am printing to a console in python. I am looking for a one off piece of code so that all print statments after a line of code have 4 spaces at the start. Eg. print('Computer: Hello world') print.setStart(' ') print('receiving...') print('received!') print.setStart('') print('World: Hi!') Output...
Dave
1

votes
4

answer
35

Views

Python Print list on separate lines

I'm trying to print my leader board out however its printing it on one line instead of multiple. So far this is my code: cursor.execute('SELECT username, score FROM Players order by score DESC limit 5') topscore = cursor.fetchall() topscore = list(topscore) print(topscore) And when it runs it output...
Jack Vincent
-1

votes
1

answer
19

Views

Why is my code not able to print stuff from the arraylist?

So I am working on a fitness app that takes in user information and outputs the number of calories they burn plus the meal plan they should follow based on their BMI. Well, so far I had no troubles and I saved all the info about what kind of foods to eat based on the meal plan in an ArrayList. Howev...
Needyboy
0

votes
1

answer
13

Views

print out two or more dataframes in jupyter (python) side by side

I'm trying print two or more dataframe in the output of jupyter notebook cell using Python. Actually I am using a function from Wes Mckinney that perform this work but the dataframes don't have headers. I would like that each table has title specifying the name of each table, of course. I need a fun...
Rodrigo López
0

votes
0

answer
22

Views

Is there a way to print two Java methods in two columns?

I'm making a Battleship game with two players and I have several classes. In my main class, I call the same method twice to print my board and the other players' boards. Is there a way to print both on the same lines but separated by some padding? //Prints the board to the console public void printB...
Nikhil Katti
1

votes
2

answer
1.3k

Views

Printing breaks bootstrap layout

I have the following page: Column 1,1 in small row 1 in xs Column 1,2 in small row 2 in xs Column 2,1 in small row 3 in xs Column 2,2 in small row 4 in xs This page appears as expected when viewing (i.e. there's 2 columns and 2 rows on small+ screens and 4 rows on mobile) however the problem is...
apokryfos
1

votes
4

answer
94

Views

How to print every nth index of a python list on a new line?

I'm trying to print out a list and for every 5 indexes, it prints a new line. So for example, if I have: [1,2,3,4,5,6,7,8,9,10] the output would be: 1 2 3 4 5 6 7 8 9 10 I tried this so far: lst = [1,2,3,4,5,6,7,8,9,10] for i in lst: if len(lst) > 5: print(lst,'\n') but all I get is: [1, 2, 3, 4, 5,...
Landon G
1

votes
1

answer
71

Views

Python - FizzBuzz - How to Get Number and String to Both Print

I have this bit of Python code: for num in range(1,21): string = '' if num % 3 == 0: string = string + 'Fizz' if num % 5 == 0: string = string + 'Buzz' if num % 5 != 0 and num % 3 != 0: string = string + str(num) print(string) And I'm wondering how to make it so that it prints the number + 'Fizz' fo...
HappyHands31
1

votes
2

answer
53

Views

quotes are still shown when I use print in python+jupyter

A simple code like this: print('sfjeorf',4,'fefa',5,) I run this in jupyter, using python. And the result is: ('sfjeorf', '4', 'fefa', '5') What I should do to get rid of the quotes and the brackets so that the result is shown like: sfjeorf4fefa5
Feng Chen
1

votes
3

answer
40

Views

issues in printing next() in python 3

I'm having a weird issue with the command print(next()) in python 3. When i use it to print on the console, it works perfectly, but when i try to save the output into a file, it doesn't work! The commands that i'm using are the following: for item in final: fasta = open(fname) # fname is the name if...
Fernanda Costa
3

votes
1

answer
31

Views

How do I print a string from a struct?

So I have the string john. I pack it into a struct. When I unpack it, how can I print john? Currently it only prints j. Same thing if I changed the string to Sammy or other names with different lengths? I have 2 functions to pack and unpack the struct. This what I don't need to worry about the lengt...
Mary
1

votes
1

answer
335

Views

@page css rule alternative for safari

How can I use write alternatives for these rules in safari? I am using angularPrint directive for adding print functionality to some of my pages, which adds some helper classes to my document and also use @page directive, everything works fine in all browsers except safari, I found that these rules...
Rathma
1

votes
2

answer
740

Views

How to print A binary tree?

how can i send (node.data) from SortTree Class to TreePrinter then used to print A Tree . import javax.swing.tree.TreeNode; public class SortTree { static Node root; TreePrinter type =new TreePrinter(); class Node{ int data; Node left, right; Node(int d) { data = d; left = null; right = null; } } N...
Adeeb_Alqubati
1

votes
0

answer
234

Views

How can monitor printers job from Windows print server with python?

We have Windows print Server which is all [rinters is connected to this server. My chief gives me a task that he needs print information.Which is include a username(active directory users), document name, document pages count, printed pages count and submitted date&time. I have found this link but t...
Bahruz Aghalarov
1

votes
1

answer
331

Views

Setting print margin content via @page css isn't working

I'm trying to change what shows up in the margins when I print out a page from my website. I've read here that it should be possible to set the content of 'page-margin boxes' like so: @page { @top-center { content: 'Page ' counter(page); } } ...But no matter what I try, this style seems to be comple...
FreakinOutMan
1

votes
0

answer
441

Views

How to create a template EZPL code

I've developed a client server printing system using GoLabel app to print labels using Godex printers. In this system, a print job request is sent from client to server and server generates a PRN code using GoLabel. And the prn code is sent to the client again. The system mostly works but in a case...
user3079364
1

votes
0

answer
118

Views

Window.print not print all pages in chrome

I have 13 page long transaction data. Show in tabular format in html page. If I try to print this data on Mozilla it's working fine, but If I try on Chrome only 7 to 8 pages are printed. Remaining are not printed. All Data load by Ajax
Shoaib Quraishi
0

votes
0

answer
6

Views

How to print multiple JTables to a single page when space is available

I have a java application with 2 JTable. The first table is made up of 2 columns and 5 rows always. The second JTable is made up of 4 columns and many columns. I want to print JTable 1 above JTable 2, then continue to print the rest of JTable. How would I do this? From a printable page perspective...
IamAUser12
1

votes
0

answer
24

Views

how I could print in horizontal mode in chromium with command line in linux?

Im trying this command chromium-browser --headless --disable-gpu --print-to-pdf=file14.pdf file:///input.html this command print verticallly But i dont know how I could print in horizontal in command lines Please hep me
user8862613
1

votes
0

answer
112

Views

Batch Print email attachments in order by date

Issue: Hello, I have a macro, which saves me for a lot of clicking, but in the end not so much time, when it all comes down to it. The code allows me to mark everything within any mail folder. It will print the attachments within the email. After this the error starts. Whenever I press this button,...
Patrick S
1

votes
0

answer
319

Views

Re-defining the Python 3 print function in Jupyter Notebook

I am trying to re-define the built-in print function in Python3 to have the flush keyword argument set to True by default. Something like the following (this does not actually work): def print(message): print(message, flush=True) Alternatively, is there another way to set the flush keyword to True b...
Jo Simon
1

votes
0

answer
1.7k

Views

JavaPos for an application. Service does not exist in loaded JCL registry

I'm trying to use javapos for an android application and I'm having quite an hard time making it works. Here's what I tried untill now. I have the jars of javapos an the jpos.xml file, which was given to me by the vendor of the printer. I loaded the jars inside the lib folder and jpos.xml inside the...
Tiz
1

votes
1

answer
283

Views

Ionic printer plugin not working on ios for external link

I am trying to print external link into ionic app using ionic printer plugin https://ionicframework.com/docs/native/printer/ printticket(){ let printurl = 'http://www.gmail.com'; let options: PrintOptions = { name: 'Waridi Events', duplex: true, landscape: false, grayscale: false }; this.printer.pri...
Somnath
1

votes
0

answer
50

Views

Java Printable not printing multiple pages

My print function could only print one page so I tried changing it to print multiple pages. I have now changed my code to print two pages. But the second page is always a blank page. So on one page there can be 27 'tasks' printed. There are 3 lines each page and each line containing 9 tasks. I have...
Nikola Petkovic
1

votes
2

answer
49

Views

Why does the name get printed twice while printing the message?

I wrote this winsock server. I connect a client using Pageant(PuTTY) and send a message to the server. The program displays the client's name alongside the message. The program gets the client's info in the char ( host ). #include #include #include #include #include #pragma comment (lib, 'ws2_3...
Ryuk
1

votes
0

answer
627

Views

Ionic 2 Print function to POS printer using USB

I need to develop the ionic android app which needs to be integrate with POS printer via USB. I was able to do the same with Bluetooth but when it come to USB connection i am totally zero on this. I hope some one can help me out. I tried with https://ionicframework.com/docs/native/serial/ but no id...
keerthi.rb
1

votes
0

answer
27

Views

While printing a PDF print its attachments too

Is it possible while printing a PDF which has a word document and few images embedded in it be directly printed along with main document?
user581157
1

votes
1

answer
376

Views

Print PDF in c# with staples

I'm trying to programmatically print pdfs using c#. I tried different libraries (PostSharp, PDFium, etc.) as well as the adobe SDK. However, I have not been able to find anything about printing and stapling the printouts. I tried using the PrintTicket object (Microsoft) to set the Stapling propert...
J Doh'
1

votes
1

answer
95

Views

Printing an image rotated in Java adds artifacts

I'm trying to print a simple image in Java with a small rotation transform. When the image is printed, there are artifacts at the image borders that are not in the original image, so the image comes out with these black lines at the borders. Has anybody seen this before? To replicate, run the follo...
Gerald Holmann
1

votes
1

answer
165

Views

GDI - Clipping is not working when used on a printer device context

I'm using the Embarcadero RAD Studio C++ builder XE7 compiler. In an application project, I'm using the both Windows GDI and GDI+ to draw on several device contexts. My drawing content is something like that: On the above sample the text background and the user picture are drawn with GDI+. The user...
Jean-Milost Reymond
1

votes
0

answer
285

Views

PosPrinter - Change default font

I am using Microsoft POS for .NET library for printing a receipt on an EPSON thermal printer (TM-T70II). The printing command is done by using this library and created Service Object. I am trying to change the default font which the device prints. If I have understood well, the device has two hardwa...
sski
1

votes
0

answer
25

Views

Printing arabic text using xps

I use XPS printer as my default printer but when I print, the print document (which contains Arabic text) alignment and text is completely disordered. When a physical printer is used, the result is absolutely correct. Can anyone please suggest what might be wrong?
Sruthi Suresh
1

votes
0

answer
106

Views

Printing PDF file with Custom Page size

How can I print PDF file without changing the page size? I use the code below but it changes the paper size. ProcessStartInfo info = new ProcessStartInfo(); info.Verb = 'print'; info.FileName = FilePath; info.CreateNoWindow = true; info.WindowStyle = ProcessWindowStyle.Hidden; Process p = new Proces...
Vic
1

votes
1

answer
31

Views

Remove Unwanted Space from Print Function

I need to make a program in Python 3 which outputs the numbers that are not repeted given a sequence of numbers, I have done this so far: a = list(map(int,input().split())) for i in a: if a.count(i) == 1: print(i,end=' ') The problem is, if you type the following sequence '4 3 5 2 5 1 3 5', the ou...
Xx_DarDoAzuL_xX
1

votes
0

answer
154

Views

Using CreateFile to send PDF direct to a printer ignores bold fonts

Please bear in mind that this code is running in an ISAPI module, and we would rather not mess around with changing which user the application logs in as, so the usual way of using the Printer classes is not likely to be an option. I have the following code: procedure WriteFileToPrinter(const APrint...
Dave Nottage
1

votes
1

answer
54

Views

Inserting print into a table

I am currently trying to use table.insert to insert print into a table my code is below: local myTable = {} table.insert(myTable, print('hi'))
Nicholas Johnson
1

votes
0

answer
35

Views

What is the purpose for registering multuple PrintPageEventHandlers to PrintDocument's PrintPage?

If I register two separate PrintPageEventHandler's and print, then the first event fires off and prints the pages, and then the second event fires and starts from the beginning, printing over the original text. What I currently understand is if I register one event, and set PrintPageEventArgs.HasMo...
eaglei22
1

votes
0

answer
322

Views

android how to connect with Bluetooth printer?

Actually i already make an connection between my android device and bluetooth printer i have few problems in it Bluetooth connection is made out in one fragment.When i go back into fragment once again i need to recreate the connection.But i want to create a connection once and reuse it untill Unp...
Karthi 028
1

votes
0

answer
375

Views

Printing using client machine printers (not server where the app is deployed) in Java

I developing an app with Java 8 using Spring. The user story is that the client should select many document (PDF) to be printed and then press a button and print all of them to the default client machine printer (Ctrl+P function from browser won't accomplish this requirement). But, I'm facing proble...
Jeremy410

View additional questions