How to draw matrix with DIA? - dia

I need to use DIA to draw a matrix. I want a 16x16 matrix where I can edit the text of each box. How can I do this? Is there a pre-defined tool I can use?

Have you tried the "Resizable Grid" object from the "Misc" sheet? Once you've added it to your canvas, open its properties dialog (e.g. double click on it) to configure the number of rows and columns. The grid does not offer text boxes by default, but each cell has a connection point where you can connect text objects.

Related

Is there any way to convert GeneXus QueryViewer to PDF?

I need to show a graph generated by UserControl QueryViewer (from GeneXus) into a PDF.
Is that possible?
Yes, it's possible, but only if the output is "Table" or "PivotTable".
You can find the property named "Export to PDF" in the upper right corner of the screen.
This is not available for Card, Chart or Map outputs.

How can I insert circled numbers with text in button label/text, vb.net

I am trying to insert circled numbers with (a-z) text on button labels/text in a desktop vb.net application. Wingdings 2 font has what I need for the circled numbers but has no regular (a-z) text and the button font property does not allow two different fonts in the same button label/text.
In scouring the internet, I can find nothing, but I am sure I am not the first to need this feature.
The goal is to have a circled number at the beginning of each button label/text, so that the user can click the buttons in the right sequence.
You should be be to paste them in as Unicode in most fonts. Here are some Sans Serif ones, just try to copy and paste them with the rest of your button text:
🄋 ➀ ➁ ➂ ➃ ➄ ➅ ➆ ➇ ➈ ➉
If this does not work for you, You may want to try a button image instead. Maybe use something like Paint.Net to make the text you want into an image, and then set that as the button image. I'm not sure if you can do that in a sizable way with SVG or PNG or if you would have to make several images for different sizes and use code to switch them.
FYI, I got these characters from this site, if you want more options: http://xahlee.info/comp/unicode_circled_numbers.html

Access coordinates of comment boxes on PDF

I have developed a simple but effective tool to automate counting the instances of a specific statement in "sticky note" comment boxes. I'm using this fir marking student exam scripts. Users are using Ctrl+C,Ctrl+C to copy preexisting comments. However in some instances the comments paste directly on top of a preexisting comment. The script counts all but the user has not intended there to be a duplicate.
I'm looking to find a way to access the coordinates of the comment boxes on the PDF so I can check for coordinate duplicates.
Thanks in advance.
coordinates of the comment boxes
All comments are Annotations, and Annotations are required to have a "Rect" entry that defines the coordinates/location of the annotation.
Rect is an array of 4 numbers, defining two opposite corners of the axis aligned bounding box (AABB). The canonical form is to define the bottom left first, and the top right second, but you should just assume it is two opposite corners.

Which sequence of PDF operators are needed to set the background color of Tf and TF contents?

I need to manipulate the content streams of a page in such a way that if the contents of Tf of one of the elements of TF matches specific values the background area of those squares/glyphs needs to change.
I think that I would need save the graphics state, after creating two different string objects, then apply a fill operator then restore the graphics state.
My question is: would the fill operator recognize the area of the matched string and fill just this?
Second: would I need to repeat this sequence for each element of the TF array?
It's not quite that simple.
You have to determine the position of the text yourself (by keeping track of the current transformation matrix for the whole page content stream and the text matrix for the text object in which your text in question is drawn) and then insert a path outlining that area and filling it just before the text object in question.
But this in particular means that it is not necessary to split the strings of the text drawing instructions to have the search text be drawn by itself.
By the way, if this change of background is meant to represent something like a text marker marking, an alternative to changing the page content would be to create text markup annotations for the determined coordinates. That way you would merely have to parse the page content stream for the coordinates, you don't have to change it. In particular if the text drawing instructions may also be in some form Xobject referenced from the page content instead of the page content itself, this may simplify the code.

A Text value change on Powerpoint by using OpenXml doesn't fit

I use OpenXml for creating custom powerpoint presentation in this way: I put a keyword on the presentation, I found it during process with OpenXml and change the text value. Everything work fine but the fit option doesn't work at first.
The text box has options "Autofit: Shrink text on overflow; Wrap text in shape: On"
After my process, the new text appear on the right place but the autofit is not done, I need to click on the text box and make a input for see the autofit work. I think that PowerPoint only check option after a modification.
What I want is the autofit option is called at the end of the process. Can anyone help me?
I hope you understand what I want to do.
Thanks.
It's not possible using just OpenXML. The <a:normAutofit/> tag is used by a client application, such as PowerPoint, to render the text larger or smaller, as needed. OpenXML doesn't actually render anything, so until the client does, it will just read the text as if it is not auto-fitted.
There are a few options to think of to control this - none of them great however. One would be to use VSTO or VBA in PowerPoint to check all shapes on PPTX open and if they have a AutoFit tag, to re-render them. A second way would be to do all the font measurements yourself based on the shape's width & height and then set the font scale to the appropriate percentage. Another would be to make a textbox large enough to fit the largest amount of text you will ever insert and then turn autofit off.
Sorry this doesn't really help you immediately. I've done tons of research on this particular subject and it's all bad news.