macOS Printing in Swift

Please note this is not an iOS question. I have an NSView-based app (i.e. not document-based), and I’d like to bolt on a printing subsystem. I can get NSViews in my main controller to print ok. However, I want to have a special view constructed ju...
more »

2017-03-21 16:03 (0) Answers

Printing numpy array in python

Here's a simple code in python. end = np.zeros((11,2)) alpha=0 while(alpha<=1): end[int(10*alpha)] = alpha print(end[int(10*alpha)]) alpha+=0.1 print('') print(end) and output: [ 0. 0.] [ 0.1 0.1] [ 0.2 0.2] [ 0.3 0.3] [ 0.4 ...
more »

2017-03-17 13:03 (2) Answers

VBA excel printing to printer with user form

I have a userform, that when filled out, has a command button at the bottom. When the button is clicked, it copies the data to worksheet2, and then copies the row information into worksheet 4, which is a form, closes the userform.and opens up the wel...
more »

2017-03-12 03:03 (2) Answers

Print email with button

I have seen Google using tags like "view documents" in the inbox. I was wondering if there was a tag or code for printing the email directly. basically what I wish to do is to send a regular email with a "print this email" button. Is this possible? ...
more »

2017-02-09 14:02 (0) Answers

Python - Facebook API, messing around

I was playing around with the facebook API and I found this underneath post that I wanted to repeat. It works almost perfectly, except for the fact the print returns an empty array. The friends variable does contain 440 friends. I read that people c...
more »

2017-02-07 22:02 (0) Answers

Print modal content as full A4 page

I am trying two things : Show content on a modal as how it would appear on an A4 page windows.print() the modal on an A4 page through major browsers Following is my CSS: .page { width: 210mm; min-height: 297mm; padding: 20mm; mar...
more »

2017-01-27 09:01 (2) Answers

Finding if printer is online and ready to print

The following 4 questions didn't help, therefore this isn't a duplicate: ONE, TWO, THREE, FOUR I need to find a way to discover if the Printer that my system reports is available to print or not. Printer page: In the picture, the printer "THE...
more »

2017-01-21 04:01 (1) Answers

How to print lines from another class

I would like to know if there is any way of printing a line to a console view from outside. I have a class (class1) that has an onMessage method. public class Class1 implements MessageListener { ... public void onMessage(Message msg) { ...
more »

2017-01-13 20:01 (1) Answers

How to print a generic type in ada?

i am currently trying to print ("Ada.Text_IO.Put") a generic type, but this always fails with errors like that: missing argument for parameter "Item" in call to "Put" declared at a-tiinio.ads:60, instance at a-inteio.ads:18 expected type "Standard.I...
more »

2017-01-06 23:01 (2) Answers

Why doesn't both these codes give the same output?

So I want draw a field (of array strings) with obstacles and free spaces. "+" are the obstacles and free spaces are just "". And if we have a free space, I want it replaced by "*". I will choose one specific element of that 2d array that equals "" an...
more »

2017-01-05 11:01 (4) Answers

Update default printer name during runtime

Right now, I have a few lines of ObjC to poll for a default printer being set, and in my app it should update a label with that new printer's name, but so far it isn't working. In my controller, I have the following: [self updatePrinter]; Which c...
more »

2016-12-19 23:12 (1) Answers

Swift print() with color

I am using XCode 8 and the code let redColor = "\u{001B}[0;31m" var message = "Some Message" print(redColor + message) //This doesnt work print("\(redColor)\(message)" //This also doesnt work and the output would look like this [0;31mSome Messag...
more »

2016-11-14 08:11 (0) Answers

Excel VBA set print area to last row with data

I have an Excel table with a sheet "CR" where columns A to K are filled, with the first row being a header row. Rows 1-1000 are formatted (borders) and column A contains a formula to autonumber the rows when data in column F is entered. Sheet "CR" ...
more »

2016-11-13 17:11 (2) Answers

Cannot specify the correct size for printing

We have acquired a brother QL-700 printer recently and we are doing some sticker printing through this machine. The paper that we have been feeding is a 62mm-wide sticker roll without "length" restriction. The issue is, no matter how I do (I've tri...
more »

2016-11-10 10:11 (1) Answers

Excel ignoring VBA Print Settings

For some reason Excel is ignoring my "Fit 1 by 1" rule here. I tried to adjust the zoom but anything I do doesn't seem to work. Any ideas are utmost welcome! Thank you! Private Sub CommandButton1_Click() Dim Sel_Manager As String 'Specify headers ...
more »

2016-11-08 11:11 (1) Answers