(DOORS DXL) Creating title page in Word with different size/color text - ibm-doors

I currently have a script that creates an HTML page that shows the differences in scripts that were made since the previous baseline and then saves it as a Word document. Now, what I'd like to do is add a title page with text that is of a different color and size than the main document. This text will also need to be centered to make it look more like the other documents our company makes. Luckily, the title of the document will be the same for all versions, so I'm adding this part of the script to before it adds the differences. However, I'm not sure how to make the text display as a different color and size before adding a "new page" break for the rest of the document. Can somebody help me out with how to add the text and new page to the front of the current document?
Chris

Related

Embedding other widgets in a GTK+ text entry

I would like to embed another widget in one end of a GTK+ 3 text entry box, a bit like many browsers do with search or protocol security "chips":
I know I can set an icon on a text entry with
entry = Gtk.Entry()
entry.set_icon_from_icon_name(Gtk.EntryIconPosition.PRIMARY, icon_name)
Even if I pass my own GdkPixbuf to set_icon_from_pixbuf this still limits me to icon sizes, when I want some arbitrary size (at least horizontally) depending on the "chip" content.
I also tried to "shunt" the text over with set_margin_left, but this moved the left edge of the whole entry box over, rather than the text within the box.
What would be an effective way to embed some other GTK+ widget (hopefully of any complexity, so I can make the chip more interactive) within a text entry?
GtkEntry is not a container, so it cannot have child widgets.
The appropriate way to implement what you see in the screenshot is to use a separate container and style it appropriately.
Have you considered putting the entry inside a frame, and restyling stuff to make it look like it was inside an entry? Then you could use standard containers to put whatever widgets next to the text entry spaces that you wanted.
The downside is that clicking your "icon" doesn't focus the entry automatically, but it makes that action totally configurable.

Set default text size/color for text boxes in Master Slide PowerPoint 2013

I'm working with a PowerPoint document which annoyingly sets all newly inserted text boxes' color to Red and uses Century Gothic. I believe this is due to the Master Slide being used by the document.
I would like to remove this automatic setting from text boxes in the Master Slide but I cannot figure out how?
I have gone into the Master Slide view and found that there are no text physical text boxes, there are however "Text Placeholders" but no text boxes. I find it strange and wonder:
how are these newly inserted text boxes contain pre-set font type and color?
If you aren't trying to do this in code, StackOverflow isn't really the right place for the question; you want SuperUser for "How do I ..." questions that don't involve code.
But what you want to do is select a text box that's formatted the way you want default text to be, then right click it and choose Set As Default Text Box. You won't get that option if you've clicked WITHIN the text box and have an insertion cursor; in that case press ESC, then rightclick.
If you're trying to do this in code, select a text box formatted to taste then do something like this:
Sub SetMeAsDefault()
Dim oSh As Shape
Set oSh = ActiveWindow.Selection.ShapeRange(1)
With oSh
.SetShapesDefaultProperties
End With
End Sub
The shape and text box defaults are independent of master formatting, which controls only the formatting of placeholders and text within placeholders. Text/shapes inserted via the Insert ribbon/menu follow the defaults set for the presentation as I've described above. Each presentation (and template) can have its own set of defaults.

Coldfusion - Dynamic Page Break

I have a form which has a table which may contain 0 rows or several rows.
The problem is that if there are several rows I want close the table on the first page before the content spills over to the next page. Then create another table for the rest of the rows on the next page along with a nice header and table headings. The hard part is, because characters have different widths and I can't predict what the user will type, it's hard to calculate how many characters can fit on a row and how many rows can fit on a page. Also if the user types something in some of the row data, it wraps to a 2nd row.
The printout looks bad when the row has only a few rows because there is a lot of whitespace on the bottom so I was thinking of adding in blank rows to fill it up. But again, I won't exactly know how many rows I need to fill before it spills onto the next page.
Does anyone have a solution to this?
EDIT:
Sorry about that. To be more clear on what I'm doing, I created a form view using CF and HTML which mimics visually like a paper invoice. Invoice line items can be added in dynamically via AJAX. There's a bunch of info to be filled out on top (Company name, address, etc), then in the middle there's the invoice lines in a table with column headings, then under it there's more info to fill out including signature fields. This format cannot be changed as it is a requirement.
So the form layout is:
Top section (info including customer info and a bunch of other things)
Middle section (table of invoice line items)
Bottom section (a bunch of other info including signature fields)
Visually on the page the above format is maintained and if there's a lot of invoice line items added, the page just scrolls and the bottom section is still at the end.
An unlimited number of invoice lines can be added so if you simply just print the page, the invoice lines will overflow onto the next page and the "bottom info" including signatures will be on whatever page the last page may be, which is undesired.
I need it so that whatever number of lines that can fit on the first page without having the form overflow be displayed on the first page along with the "bottom info" including signature. The extra lines are displayed on the next pages with headings "Continuation Page" along with the table column headings of the invoice lines.
My solution is to create a "print view" which creates the form with entered info and cfloops the invoice lines query but only loop just enough to fill the first page. If the addition of another row makes the form overflow then I would stop the loop, display the rest of the form with the "bottom info" and signatures so it all fits on the first page nicely, then do a page break with the header "Coninuation Page" and display the invoice line table with column headers and the rest of the invoice line items. Of course if the continuation page is going to overflow then I would need to do a page break and repeat the "Continuation Page" process. The tricky part is how to determine how many lines can actually fit on the page because the length of data in each row varies depending on user input. Maybe only one invoice line row filled with tons of data is all that can fit on the first page without having the form overflow. Maybe it's 10 invoice line rows when little data is entered.
My main purpose is to keep the entire form on the first page. If several invoice line items are added which pushes the bottom of the form onto the next page then I want to display only enough invoice line rows to keep the form on the first page and have a Continuation Page for the rest of the invoice lines that didn't fit on subsequent pages.
Note: The print is done via a print link on the form page which pops up the print view page (without site heading, etc.) in another window. From there they can either print from the browser or click on a print link that does a javascript print. the same "print view" I created to print the invoice nicely is also used for a PDF view created using CFDocument. The number of characters per line is not the same in the generated PDF as the HTML print view so it's even harder to determine how many rows can fit.
If I understand your question correctly, then a PDF generated with CFDocument would seem to be the optimal solution. Using the cfdocumentitem tag you can specify headers and footers, which insure that the content you want appears on the first page. The cfdocument.currentpagenumber variable can be used to insure that it only appears on page one, and that the header on pages 2+ display the "Continuation Page" text that you desire. There is also a way to get the PDF to auto-print using a DDX file, though that is subject to security limitations.
You mention using CFDocument to create a separate print view, but I didn't see an explanation as to why an HTML version was required as well. I apologize if I missed it.
From personal experience with a similar project last year I would tend to recommend against using CSS for this and instead just require a PDF reader. It's possible that someone with more skill than I could make it work easily, but it was nothing but a headache for us and we could never get it to work quite right.

Adding multipage printing to Windows 8 ListView App

I have an app with a ListView showing a list of summary items.
I've added print support, but I'm stuck on splitting my content into different pages.
I can add multiple pages, but I don't know how to split my content into pages based on page size.
Currently I have a xaml user control for my print content with a bound ItemsControl in it. I'd either like to bind to a list of just the items that will fit on the page, or move the top visible item position up based on the page number.
I'm not sure which is the best approach and I'm not sure how to do either.
The only paging example I could find in the docs was for a rich text block, which relies on the RichTextBlockOverflow control. I don't think that will help me.

UIWebView locating text by touch

Would like to capture a touch on a UIWebView, map that to the relevant HTML text and insert a hyperlink into the HTML at that point.
Found a very nice reference to cleanly capture touches on UIWebView at:
http://mithin.in/2009/08/26/detecting-taps-and-events-on-uiwebview-the-right-way/
I've implemented it and it works very well.
Also found a very nice reference to search and highlight text in a UIWebView at:
http://www.icab.de/blog/2010/01/12/search-and-highlight-text-in-uiwebview/
I've implemented it [for a search feature] and it works very well.
But I can't quite make the intellectual jump from touch position [not text search] to a specific word in the UIWebView. Obviously this can be done, since touch-and-hold on a UIWebView triggers a "Copy or Define" popup which obviously knows the specific word you've pointed at.
The individual text nodes that JavaScript decodes from the DOM have no offsetLeft or offsetTop or offsetWidth or offsetHeight; I understand these need to be derived from the parent node.
But the individual text nodes can consist of many lines of text, depending on what the HTML source looks like. Potentially a single text node can contain an entire paragraph of text, hardly the one word that I'm trying to spot.
Can anyone suggest how "Copy or Define" can be so clever? Thanks.

Resources