How to extend the functionality of a printer driver - printing

When a user attempts to print a document, the print dialog where you select the paper type appears, is it possible to extend the dialog with more paramters which the user will select? Based on the selected parameters, I want to build a printer driver that will add a watermark to every document printed on the printer with the installed driver. Are there extensible interfaces provided by kdmf or any driver framework available to do this? If no, what is the best way to go about this?

Related

Is it possible to load a dynamic website and trigger a search field inside of it?

I am new to Delphi and I want to know, is it technically possible to perform this task?
Firstly, I want to load a dynamic website, and then search it using an external input field, as in the picture.
When I enter a search parameter in the left side, it should perform a search operation in the loaded website.
Yes, it is technically possible.
On the right side of your application window, you should drop a TWebBrowser (This is actually based on Internet Explorer) or the new TEdgeBrowser.
You can then use those component's methods to make them load the page you want to.

How to create a "detail panel" in Cytoscape?

I'm generating networks and importing them into Cytoscape using cyREST.
I have a lot of extra information available about each node, more than can be fit into node labels. I would like the user to be able to click on a node and bring up a detail panel with this additional info. Is there any feature of Cytoscape, or an existing plugin that can do that?
There is no easy way from within CyREST to do that, although you could encode that information in a single text column and then use the 'tooltip' visual property to provide a way for a user to get the information on a mouseover. Beyond that, you would need to provide an app to integrate with your CyREST application. Several apps do exactly what you are describing (e.g. look at StringApp for an example)
-- scooter

process enter key using wx_erlang (erlang port wxwidgets)

I am building a simple browser in erlang, using wx. This simple browser has a text box for entering a url. I want to execute a callback when the user presses the enter key while in the text box.
I can see several potential ways of doing this, one option would be to process each keypress event, and execute its default action unless it is an enter key, in which case the custom processing occurs.
I was hoping there might be a higher level event I could use, like control lost focus. I am new to wx, and do not mind if programmers using other tools comment as the question (at this stage) is more about using wx that a particular language binding.
Not sure how is it called in wx_erlang, but there is wxEVT_TEXT_ENTER event to which you should bind. Note that you must create the control with wxTE_PROCESS_ENTER style to get this event.

How to find or add the username of the printing user to an XPS printed with XPSDrv

Does anyone know if there is a simple way to include the username of the printing user somewhere accessible either in the XPS package or in any header in the data stream from the driver when using XPSDrv? By using a filter in the filter pipeline (even though it is not simple in my opinion)? By reading TCP/IP header values? I have googled my fingers short trying find a reasonable solution.
Simple? No, not really. Your best bet is probably to modify a filter in your XPS driver to do the following:
Extract the user token from the pipeline's property bag using the XPS_FP_USER_TOKEN key.
Get the user's SID from the token using GetTokenInfo
Get the username from the SID using LookupAccountSID
Add the username to the print ticket. To keep things as simple as possible, I'd suggest reusing a field from the public schema, such as the JobComment ParameterInit.
This is all just a starting point. I suspect you're going to need to delve into the details of how an XPS driver works in order to make this a reliable solution.
You can store meta data in de the XPS (Core Properties), or you could probably use the print ticket for this purpose too.

Assigning Fogbugz cases programmatically

I want to write an application that assigns Fogbugz cases programmatically, how would I accomplish this? Is it possible to achieve this given any of the following scenarios:
The user enters text in my
application's input field and the
Fogbugz report is opened in the
browser where the "note" field is
populated with the text from the user
input
The fogbugz report is assigned to the
specified user in the application
without the browser even being opened
i.e. the report is stored directly in
the DB.
I'm planning to add default values to the other fields as well so I would assume the process would be the same for adding text to the "note" field.
You can do this with the Fogbugz API. See the heading "Editing Cases" for the specifics on how to edit a case (which includes creating a new one). It's a little complicated (or perhaps just oddly designed) but, as I remember, you basically have to call cmd=new if you want to create a new case, supply your text in the 's' parameter and set the ixPersonAssignedTo to the correct person. For an existing case, use cmd=edit.
This is possible both with a regular form posted to your Fogbugz installation and some server side code that calls the API.
You might want to write a plugin for FB and allow others to use it. (share it or sell it)

Resources