Bullet list types in Migradoc - migradoc

How can i give user defined ListType using Migradoc. I have found 6 types of Listtypes.
In those Bulletlist3 is the square but i need to give bigger size square so, how can i give that?

AFAIK you cannot use custom bullet list symbols with MigraDoc.
When we needed this, we just added an empty paragraph, used AddFormattedText to add the bullet symbol (we also needed big squares), added a tab, then came the normal text.
Set the paragraph style properly as discussed here:
https://stackoverflow.com/a/9635220/1015447

Related

Fold HTML tag attributes feature similar to Sublime Text

One feature I've found really useful in Sublime Text is the ability to fold HTML tag attributes. Is there a way to do this with VSCode that I'm missing?
I don't think there's a built-in way to do this. Also, it seems the extension API currently doesn't have a way of hiding characters, see this open feature request (except for a hack mentioned by the second comment).
Extensions also can't customize the built-in folding yet, see #3422.
To fold individual attributes just move your mouse pointer to the left of the editor, in the empty space on the right of the line numbers. Small - icons will appear. Click on the ones you want to fold items.
Keyboard shortcut is CTRL+SHIFT+].
You can get the full list of key bindings there: https://code.visualstudio.com/docs/getstarted/keybindings

How do I duplicate a PDF with some text replacement and redaction

I am exploring couple of third party components to work with PDF through C#. These are Aspose.pdf.net and iTextSharp. Following are the details about what I am exploring them for:
I have some PDFs that contain sensitive information in form of text, like name of person, city, etc.
These PDFs need to be duplicated into another copy but while creating duplicated copy, sensitive text needs to be searched & replaced with some dummy text. The replacement is essential to avoid tracing original information, by any fraudulent means.
Also, the replaced text requires to be redacted.
Finding text is expected to support RegEx, as there could be variations of text that needs to be masked.
Could you please assist me how can this be done using iTextShart.
Thanks in advance.
iTextSharp is capable of complete redaction(both visual as well as the data stored in the pdf) using the PdfSweep module (http://itextpdf.com/itext7/pdfsweep).
In order to have the redaction happen after text search you'd have to:
Extract the text from the document (can be done using iText).
Search through the extracted text and obtain the positions of the text you want redacted. (needs an implementation from your side)
Use these positions to define where PdfSweep has to redact. (a couple of lines of code)
By default, PdfSweep visualy redacts by drawing coloured bars over the locations, and internally removes the text and any image.
While it is technically possible to use iText to fill the redacted positions with some dummy text, the implementation thereof has a number of pitfalls.
PdfSweep is closed source module for iText7, you can contact our sales team for more information on the licensing.

How to get the font style of a paragraph

I am a newbie for docx4j and for my application I need to identify the sentences (or paragraph) is in bold. I cannot figure out how to get the font style details for a particular paragraph. Any help is appreciated
You need to look for w:rPr/w:b, that is, for the bold tag within the run properties element.
This can be in a run (w:r) within a paragraph (w:p), or within a style referenced from the run's style (w:rPr/w:rStyle if present) or the paragraph's style (w:p/w:pPr/w:pStyle, for example Heading1).
Since styles can be based on other styles, you need to climb the style hierarchy to check for bold.
The easiest way to do what you want is to mimic the PDF output; see https://github.com/plutext/docx4j/blob/master/src/main/java/org/docx4j/convert/out/fo/XsltFOFunctions.java
line 242 for the PPr level stuff
line 776 for the RPr level stuff
I assume you can work out how to visit each paragraph (see GettingStarted); probably you ought to traverse in Java (as opposed to via XSLT).

purpose of vertical bar in programming IDEs/Editors

In this example. I'm using Phpstorm Code Editor and I wonder the purpose of this Vertical Bar
This is a visual limiter of the line length.
Usually the code convention in programming languages or in particular project requires to have the line of code to be limited by length.
For example Python's PEP 8 coding convention requires it to be limited to 79 characters.
So basically this limiter in your text editor or IDE is just made for convenience to help you to control the maximum line length in your code. Usually you can set-up the maximum code line length in the settings.
From: http://www.jetbrains.com/phpstorm/webhelp/editor-appearance.html
Show right margin (configured in Code Style options) Select this check box to have a thin vertical line at the right margin of the editor displayed. Refer to the description of the General page of the Code Style settings.
From: http://www.jetbrains.com/phpstorm/webhelp/editor-appearance.html
Right Margin (columns) In this text box, specify the number of columns to be used to display pages in the editor.
Wrap when typing reaches right margin Select this check box to ensure that edited text always fits in the specified right margin.
So you can probably disable it if you want...

With WxWidgets, is the wxTextCtrl one-size-fits-all?

When working with guis of different kinds, I am used to the distinction of text field or text entry box versus text box. That is there is one type of object for the multi-line word processor style text box and another type of object for a single line, quite often non-scrollable text field / text entry box. Does wxTextCtrl serve both purposes? I know it does the text box but is it also the correct choice for the text field/text entry box?
EDIT
There are actually 2 types of text boxes for multi-line entry as pointed out in the answers. What really interests me are widgets specific for single line entry versus widgets specific for multi-line entry.
wxTextCtrl serves for both single and multiline entry. It is quite powerful but not exactly 'word processor style'. Closer to that would be wxRichTextCtrl.
wxComboBox uses wxTextEntry ( as does wxTextCtrl in single-line mode ). Although wxTextEntry is not offered as a control itself - it does not inherit from wxControl - if you like it so much you might be able to build something using it. But it seems like a lot of trouble for benefits that I do not see.
wxTextCtrl is a single line text control (what is called "entry" in other frameworks) by default. If you specify wxTE_MULTILINE style when creating it (this style can't be changed later), it becomes -- surprise -- a multi-line control, i.e. what is called "area" in other places.