how do I set the source tray (InputBin) per page when using System.Printing to print? - system.printing

I am trying to print a document using classes in the System.Printing .NET namespace. I have tried using PrintDialog.PrintDocument on a DocumentPaginator and building an XPS file and then using Queue.AddJob to send it, but I can't seem to find a way to select a different source tray / input bin for different pages within the document. I can do it for the whole document using the PrintTicket.InputBin property and I have come across a reference to a PageInputBin schema element, but I don't know how to access it.
Alternatively, if anyone can tell me a reliable cross-printer approach for setting booklet mode (2 A4 sides per A3 side folded and saddle & stitched) on the old GDI+ routines then that would be great!

Related

Get view index sizes programmatically

I'm familiar with the "Manage Views" tool in Domino Administrator, and wondered if anyone had come up with a way to access the view Index size programmatically. Ideally I'd use LotusScript but any other method would be great too.
I'm hoping to analyze which views are actually used across a large number of databases, without having to extract the info manually.
AFAIK this is not possible in LotusScript. But the index size could be retrieved with the C-API function NIFGetCollectionData.
You need to open the database with NSFDbOpen, get the view with NIFFindView, open the view with NIFOpenCollection and finally get the size with NIFGetCollectionData. And of course you need to call NIFCloseCollection and NSFDbClose to clean up.
Maybe there is an easier way, but you'll probably have to develop the necessary tooling yourself. A small quest in 6 steps:
open the log.nsf database for your server
open the view Usage/by Size
open a usage document for a fairly large database, e.g. mail/yourmail.nsf
the document shows all views and their (index) sizes
open the Document Properties box (Alt-Enter)
the field AllViewInfo (RichText) contains that data
Downsides:
AFAIK there is no ready-made LotusScript library for log.nsf.
those sizes are collected during the night, so they're not up to date
going through a rich-text's data can be daunting
HTH

A Study on the Modification of PDF in nodejs

Project Environment
The environment we are currently developing is using Windows 10. nodejs 10.16.0, express web framework. The actual environment being deployed is the Linux Ubuntu server and the rest is the same.
What technology do you want to implement?
The technology that I want to implement is the information that I entered when I joined the membership. For example, I want to automatically put it in the input text box using my name, age, address, phone number, etc. so that the user only needs to fill in the remaining information in the PDF. (PDF is on some of the webpages.)
If all the information is entered, the PDF is saved and the document is sent to another vendor, which is the end.
Current Problems
We looked at about four days for PDFs, and we tried to create PDFs when we implemented the outline, structure, and code, just like it was on this site at https://web.archive.org/web/20141010035745/http://gnupdf.org/Introduction_to_PDF
However, most PDFs seem to be compressed into flatDecode rather than this simple. So I also looked at Data extraction from /Filter /FlateDecode PDF stream in PHP and tried to decompress it using QPDF.
Unzip it for now.Well, I thought it would be easy to find out the difference compared to the PDF without Kim after putting it in the first name.
However, there is too much difference even though only three characters are added... And the PDF structure itself is more difficult and complex to proceed with.
Note : https://www.adobe.com/content/dam/acom/en/devnet/pdf/pdfs/PDF32000_2008.pdf (PDF official document in English)
Is there a way to solve the problem now?
It sounds like you want to create a PDF from scratch and possibly extract data from it and you are finding this a more difficult prospect than you first imagined.
Check out my answer here on why PDF creation and reading is non-trivial and why you should reach for a tool you help you do this:
https://stackoverflow.com/a/53357682/1669243

Automate Save As File with IUIAutomation in Internet Explorer 9+

There are 63 entries on Stack Overflow related to "IE VBA Save-as" topic.
That is to automate the Download Notification Bar of IE 9+.
Several methods are recommended to automate this process.
Method 1. using XMLHttp (example link, applied to sites that show the direct url of to-be-downloaded file)
Method 2. using autoitx.dll to send hotkeys (example link, not so stable based on my experience)
Method 3. using IUIAutomation (blogspot link )
I think Method 3 is suitable for most of these situations.
However, I have NOT successfully tried this method, because
1) I can't add reference to UIAutomationCore.dll
I get this dll under C:\Windows\SysWOW64 and the project(*.xlsm) folder
Question1:Please tell me how to add reference to UIAutomationCore.dll.
2) Subroutine Download_Save_As in the page (blogspot link ) uses sending shortkeys to navigate to the save-as window.
I don't thinks this is stable enough as I tried the AutoitX way.
Question2:Is it possible to click the save-as option by using purely IUIAutomation way? and how to?
You have to find the file in reference library and move it where it is looking. You can hover on a reference to see where they are kept. I don't know why this particular reference's location is different.

Embedding an image to a single Excel cell using Classic ASP - is such thing possible?

Short background - I'm exporting an Excel file using Classic ASP, in which I generate a table which is originated at an MS SQL database.
One of the columns I retrieve holds paths to images I have on my server. I use the following code to define an "Excel-targeted" response:
Response.ContentType="Application/vnd.ms-excel"
Response.AddHeader "content-disposition", "attachment; filename=""Sales_Report-"& Month(Date())&"-"& Day(Date())&"-"& Year(Date()) &"-"& ".xls"""
The problem - I've been googling for a solution and came to realize (correct me if I'm wrong here) that embedding it as "contents" of a single page is impossible.
However, it is possible to either placing the image in one cell's remark (I'd like to avoid that), or alternatively just set the image as a cell's background.
Important note - my goal is to have the images sort and filter with the rest of the row they're located in. I did manage to place the images exactly where they should be to begin with, but they just float as regular images in the spreadsheet.
I'm using plain HTML elements and not XML - but an XML solution (if exists) would also be awesome.
Thanks.
OK, so after some research I've come to discover the research I was lacking to begin with. It obviously depends on the MS Excel version which eventually opens the generated file.
Generating XLS files with advanced cell settings is quite doable and intuitive when one acquires better understanding of the XML structures which help generating files through the code, with either Classic ASP & ASP.NET code behind.

Multi-threading in Cocoa & Determining what cells are checked in Cocoa

Question 1 - I am currently writing a program that has a table view that is loaded with data from an on-disk property list. Each of these cells has a name associated with it, and a checkbox. The program's purpose is to have a 'Get' button, and when pressed, will go through the table, checking to see what cells are checked. For each one that is checked, it will grab it's URL (which is just the secondary cell) and download it.
Example
x File 1
_ File 2
x File 3
When pressing 'Get', it will go download the file (Files 1 & 3) from somesite.com/File1.zip, somesite.com/File3.zip.
Currently, what I have written will just download the last file checked.
Question 2 - Once I can figure that out, I would like to know how to download all the files at the same time, rather than in succession, because that's what it looks like my program is doing right now.
The class that contains the code invoked by the button should contain:
IBOutlet NSButton *checkbox1;
in the variables area in its header (plus checkbox2 and checkbox3).
This IBOutlet should be connected to the checkbox in the interface layout. Read about IBOutlets in the Cocoa Fundamentals Guide.
As for downloading multiple files simultaneously… you should be using multiple NSURLConnections asynchronously. This can be a little tricky. Have a look at the NSURLConnection documentation. Then also look at this question here for managing multiple connections at once:
Managing multiple asynchronous NSURLConnection connections

Resources