Printing only starts after last page spools - vb.net

I'm having a problem that printing in VB.net where any network printer I choose is waiting until the last page is spooled before printing begins. However I'm looking to have it begin printing after the first page.
The printer is set to 'Start printing immediately', and this is giving me huge problems as we're trying to print duplex documents that may be 75 ~ 100 pages long.
Any ideas?

Can you paste a little sample of the code you are using to print? First off, I would look at the queue itself and ensure that things like the Print Processor are set to RAW and also confirm that other applications such as Word have no issue 'starting immediately' to this device.
Why is this such a big deal? Does you application take a long time to generate the data that this causes issue? You should be able to generate the print output quickly (assuming it's not a bunch of high res images or something) and get it into the queue fast. Assuming you have an up to date printer that's doing 30-40ppm the entire process should only take a couple of minutes.

Related

How to trace an output in Access back to the section of VBA code that produced it

I am working on updating an Access database with this year's new data. I did not write the code that goes along with it, and am trying to find out where the formula is for an output (ratios) that the VBA code produces. Is there a way to trace back where the output came from?
I've tried just doing CTRL F to find the word "ratio" in the code but it's so long I can't pin down exactly where it's coming from.
No error messages
In debug mode you can step through the code step by step by pressing F8. You should be able to find the origin of every data export that way.
If the outputed data is a result of calculations I would check every query in the database. One of these probably takes care of those ratio's.

How to limit cell text output in Google Colaboratory?

Is it possible to limit the number of lines output by a code cell in Google Colaboratory? As to mimic the behavior of the command shell that keeps only the last n lines?
Sometimes it happens that the browser crashes because of the size of the generated tab, due to the huge amount of text produced by debug text.
Is there a solution without having to reduce the amount of text actually generated by the code itself?
Add %%capture to the top of the cell to completely discard the output.
Found on: How do you suppress output in IPython Notebook?

Autohotkey: how to determine clipboard buffer contents size

I have a script that scrapes a certain portion of the screen and acquires about 100-200 bytes long text in to the clipboard. Sometimes, due to web server timeout or missing CSS definitions etc, the page doesn't render correctly and the sane mouse drag, selects a much larger amount of text and copies it to the clipboard.
I want to be able to notice this situation and scrap the clipboard contents and run my script again, till it is at the expected size of 100-200 bytes. Finally abort the script if large buffer keeps happening for certain number of times.
I have the logic for it but only thing I am not able to figure out the clipboard size and how to get it inside AHK script. Is there a predefined variable for it ? Or is there another, more complicated method ? What comes to mind is to paste the contents into notepad and save it. Then look at the file size, but it is very convoluted. I want something without a disk write operation.
Any ideas ? I saw the strlen command but not sure how to use it...
If it is text in your clipboard this works:
ClipSize := strlen(clipboard)
Example Script
sClip:=GetClipboardSize(Clipboard)
sClip_a:=GetClipboardSize(ClipboardAll)
MsgBox Clipboard Size: %sClip%`nClipboardAll Size: %sClip_a%
GetClipboardSize(c) {
if (!s:=strlen(c)) {
tmp:=A_temp "\clipboardsize_" A_TickCount "~~tempfile~~.tmp"
FileDelete,%tmp%
FileAppend,%ClipboardAll%,%tmp%
FileGetSize,s,%tmp%
FileDelete,%tmp%
}
return s
}

change length of multiple mp3 files

I have several hundred short mp3 files (1-5 seconds) I would like to trim them. namely, the length should be rounded up getting a whole second. for example if a mp3 file is 1.32s long, it should be afterwards 2.00 in length, the lack of time should be filled with silence. is it possible to automate this process? if so with what tool? thanks
Try Audacity, it allows batch processing: http://manual.audacityteam.org/index.php?title=Batch_Processing
I'm not sure whether it will do everything that you need it to do but it's worth checking out what all your options are within this program.
[EDIT]
Ok, so if you do have hundred and also might be something useful for you in the future this is what I would recommend or would personally do myself.
Get mp3DirectCut [freeware]
Get AutoHotKeys [freeware]
Learn how to use both, particularly AutoHotkeys
Save All filenames into a spreadsheet
Create a script that does the following with mp3DirectCut
Load file by name on spreadsheet
Hit the "End" button
Paste a pre-copied silent 1 sec long clip from clipboard
Parse the NAV field in the program (bottom left) to get the Total length
Calculate and enter desired endpoint to total length for Selection (then hit Enter)
Hit the "Del" button
Save complete song
Repeat

Print to POS Display Unit

I have an Epson Display Unit (for the Point of Sale), and have it set up as a printer. I can only get it to print what I want when I go to Printer Properties > Fonts (there is a test input box).
However printing from an app such as notepad yields no results. I'm trying to get it to work with the p.o.s. app I made in Excel. I found a COMM port communication script here, but I can't get past the OPEN command. Seems there's a "file in use". I'd like to know if anyone else has had experience with this sort of thing.
Under the assumption that your printer is connected to serial interface 1, provided that the serial interface parameters are correctly set, and you want to send a string of characters to that interface, you may try this ...
Sub WriteToCOM()
Open "COM1:" For Output As #1
Write #1, "ddd"
Close #1
End Sub
Paste this code into an Excel VBA script and cycle thru it with F8 - it worked for me
You may replace "COM1:" by any existing "COMx:" or "LPTx:" as well (don't forget the semicolon!)
I am using this to control an Amateur Radio (setting the frequency) from an Excel table containing broadcast station names and their frequencies. I am of course sending special characters to my gear using the chr() function.
The Macro is tied to a control button. My Excel is Office 2003 (it worked already in Office97)
Good luck
MikeD