Unable to get paper colors from cups 2.0.1 using cups4j - cups

I'm currently using Cups Version 1.2.4 for a print-application.
A mandatory feature is to read the paper color (White Paper, Blue Paper, ..). This is done by reading the mediaSupported tag with an old print library called jipsi.
The print-application is now going to be updated with a new CUPS version 2.0.2 and the print library Cups4j.
If I try to read the paper color with the mediaSupported tag, the resultset outputs me papersizes like "iso_b4_250x352mm" instead of the paper colors I need to get.
The other data that Cups4j provides me for the printer also doesnt include the paper color.
Cups4j printer information new Cups
If I use the old Cups Version 1.2.4 and cups4j, the mediaSupported tag contains the paper colors, that I need to get.
Cups4j printer information old Cups
However the webinterface of the new Cups lists the paper colors that I need to access.
Pic of Cups Webinterface
Now my question:
Is there any way to get the paper color, maybe by asking the IPP protocol directly?

The IPP attribute media-color-supported contains the media colors which are supported by the printer.
You can try this C code to see whether the media-color-supported contains the required value. Or may be the values are stored in media-type-supported IPP attribute as per your screenshot.
Though I am not familiar with cups4j, a similar class exists in cups4j to get the printer attributes.

Related

Is it possible to discover that I used text expanders or I pasted text into a text box BEFORE sending my form?

I work writing messages on text boxes on a NON SECURE website interface of a company. I work from my pc and google chrome with no spy programs installed because i work from home on my own pc!
They do not want people to paste messages, but there are some words that I repeat a lot and I would like to use text expanders for those words or small expression.
My question is, is it possible that the company read and saves the keys that are digited on a text box BEFORE sending them the final message that I wrote?
Example, I could create a shortcut and use GDM to write Good Morning, is it possible that the company understand that I wrote GDM instead of good morning into the text box of that I pasted a word even if the final sent message will be Good Morning and not GDM? Will they be able to record my pressed keys like CTRL C and V or GDM instead of good morning?
Yes, It is possible to implement a javascript keylogger that logs every keystroke on that page. In your scenario the company would "benefint" from it, if they really want to detect pasting messages.
However this can be tricked by any application that calls the OS's native function that simulates the keystrokes and doesnt use keyboard shorcuts for the text expansion.

Mirador words highlighting

I am showing OCR-ed book pages in Mirador viewer. All words with coordinates are fetched from elasticsearch and search is across all books (meaning I can't use IIIF search api).
I need to highlight certain words in Mirador viewer.
I know that this is possible using annotations, but I need to use those annotations for something else (user comments), so I need another way for highlighting. Highlights should be displayed immediately, while annotations can be toggled.
Is there any solution with Mirador and IIIF presentation protocol or highlighting could be done on image server layer (currently I'm using IIPImage which doesn't support highlighting)?
Is there any other image server that supports highlighting and is it a good idea to do it this way?
Thanks!

Getting a specific text from a website using Regex in Shortcuts

I’m trying to create a Shortcut on iOS that uses Regex, what I’m trying to accomplish is getting the price of a product from a website but no matter what Regex commands I use don’t work. It would be easier if my computer was up and running and I was able to use addons to view the site better but I’m stuck on iOS for the time being. Viewing the source code line 606 displays
'productPrice':'409.99',
But nothing I try pulls the the price even from different lines in the code.
I’m trying to get the price from https://www.microcenter.com/product/512484/intel-core-i7-9700k-coffee-lake-36-ghz-lga-1151-boxed-processor
I just can’t figure out how to retrieve the price being shown, I’ve tried so many combinations I had to turn to more experienced user help.
this works for me: 'productPrice':'(.*?)', - link
Make sure you are getting the part of the page source that contains this information.
The answer was so simple, if using shortcuts on iOS I was able to pull the price of the MicroCenter product by these commands.
URL - microcenter page to product
Get Contents of URL (leave as is)
Get Text from Input
Match Text - Pattern - \$......
Get item from list - Item at Index / 2 (2 is for items on sale or not)
The rest you can decide what to do with it, make a notification or whatever you decide how to display the price. This answer I found was a way to make sure it works. Now I’ll make a menu of multiple items from micro I have my eye on to pull all the prices in 1 click display. https://m.imgur.com/Iljvsx6

Using VBScript in tandem with Chrome to fill out forms and download files

I need to download a series of credit reports using chrome, has to be chrome because my company uses last pass and I don't actually know the password. I also need to use VBScript with windows default libraries. The script needs to click (and I counted) 2 links -> then a radial button -> then input into 2 text boxes -> select the 6th item in a dropdown list -> click a download button -> then copy a string from the page and rename the downloaded file based on that. This last part I think I could do with windows.xmlhttp get then parse it, but if there's a better way I'm looking for suggestions.
My knowledge of VBscript is ad hock at best, I've had to learn it on the fly on an as needed basis, frankly its a miracle some of the scripts i wrote work at all.
The only solutions I could think of was to use WScript.SendKeys "{tab}" and WScript.SendKeys "{enter}" a few dozen times, this works most of the time, but has no reaction capability and can't copy text from the page and rename it for me. The page also doesn't always have the same number of buttons or links so my tab count will be off at times. My other idea was to use http post and http get but I'm more or less completely in the dark about how those work

Set the printer to landscape for the WebBrowser Control

I am printing an HTML file by using the WebBrowser Control, but I want to force it to print landscape. I thought the following might do the trick but it didn't
Dim ps As New System.Drawing.Printing.PrinterSettings
ps.DefaultPageSettings.Landscape = True
WebBrowser1.ShowPrintDialog()
Is there any way of doing this that doesn't resort to SetPrinter APIs?
This is not possible. While the user is capable of setting printer settings (and even able to select a different printer) using the user interface, this is not possible programatically.
Some "hacks" exist where users set values in the registery directly (for the Internet Explorer keys), but mistakes here could be problematic.
Refer to the following Microsoft Knowledge base article: http://support.microsoft.com/kb/313723
Also a connect issue on this: https://connect.microsoft.com/VisualStudio/feedback/details/678232
And another related StackOverflow question: How do I programatically change printer settings with the WebBrowser control?