PDFlib first line indent - indentation

I using PDFLib as pdf renderer and IDML format from InDesign as input format and my question: is parameter
LeftIndent
only possible way how to create in bullet list indent? I have found in CookBookPdfLib, that PDFLib supports LeftIndent but no such property as in InDesign
FirstLineIndent
I mean that if i have multiple lines with one bullet, on the first line i can apply (in InDesign), so called FirstLineIndent, which moves only first line of text after one bullet.
Example of functionality: image.
With PDFLib i have to create this functionality on my own or it is implemented?

you might check out the option "parindent". Check out the PDFlib API reference for details.

Related

How to prevent Amazon SageMaker from splitting my .txt file into lines?

I want to create a labeling job for workers to label my text data. Each text file should be labeled as an entity. SageMaker seems to split my text into lines, so each line can be labeled, which does not make any sense for my project. I used GroundTruth option ‘Create a labeling job’ and could not find any configuration options to prevent the splitting.
Firstly replace all the new line characters in your text i.e "/n" with a <br/> tag. Then you will need to create a custom labelling job , also you can choose from the pre-defined templates for the initial code. Inside the tag just include "skip_autoescape" it will help in considering the <br/> as the line break and you can see the desired output as a single entity.
Follow below docs for more references :
https://docs.aws.amazon.com/sagemaker/latest/dg/sms-custom-templates-step2.html

Collect all specific comments inside code in a table

Suppose I have a logger function, and I called it all over my code. My logs usually show the probability of the existence of a problem or a bug. More actions and investigations needed to confirm the problem or bug. For example, maintainer or tester should grab the input, open it in an editor, and if a specific string is inside the input, The problem or bug is confirmed.
I want to document the procedure of confirming the bug in a comment above of the log function in code. I also want to extract all of these kinds of comments and create, say an HTML table from them. So I can give that table to the tester or maintainer to find correct bugs for me.
I show it in a simple code. I know it's silly, but does the job:
std::ifstream t("file.txt");
std::string input;
// Read the whole file into input string
// DIAGNOSTICS COMMENT
// NOHELLO_BUG
// Diagnostics steps: 1.Open input file file.txt 2. Search hello inside the file, if hello exists inside the file, there should be a bug, send file.txt to the developer!
if (input.find("hello") == std::string::npos)
{
logger::log("hello not found inside input file!");
return false;
}
Is there any command in Doxygen for this purpose, although Any other solution is welcome too. The most obvious way is to write that table by myself, But maintaining that table will be a disaster too.
Doxygen contains a.o. the commands \todo, \bug
From the documentation:
https://www.doxygen.nl/manual/commands.html#cmdtodo
\todo { paragraph describing what is to be done }
Starts a paragraph where a TODO item is described. The description will also add an item to a separate TODO list. The two instances of the description will be cross-referenced. Each item in the TODO list will be preceded by a header that indicates the origin of the item.
\bug https://www.doxygen.nl/manual/commands.html#cmdbug:
\bug { bug description }
Starts a paragraph where one or more bugs may be reported. The paragraph will be indented. The text of the paragraph has no special internal structure. All visual enhancement commands may be used inside the paragraph. Multiple adjacent \bug commands will be joined into a single paragraph. Each bug description will start on a new line. Alternatively, one \bug command may mention several bugs.
Furthermore doxygen contains the command \xreflist with which you can define your own lists.
Small excerpt from the documentation (https://www.doxygen.nl/manual/commands.html#cmdxrefitem):
\xrefitem "(heading)" "(list title)" { text }
This command is a generalization of commands such as \todo and \bug. It can be used to create user-defined text sections which are automatically cross-referenced between the place of occurrence and a related page, which will be generated. On the related page all sections of the same type will be collected.
The first argument is an identifier uniquely representing the type of the section. The second argument is a quoted string representing the heading of the section under which text passed as the fourth argument is put. The third argument (list title) is used as the title for the related page containing all items with the same key. The keys "todo", "test", "bug" and "deprecated" are predefined.

Using document as a template: problem with heading numbering

The document body is hardcoded and then inserted into a template document with contains cover, summary, headers and styles. Heading styles are numbered 1, 1.1, 1.2, and so on. But to insert a heading just with 'Heading [n]' style does not work, numbering is lost. I think this happens because numbering is set through a multilevel list with headings attached.
Question: is it possible to use a document as a template without coding any formatting, or it is inevitable to deal with list styles in the code?
Yes, you can use a document as a template without any formatting. Please note that when you copy nodes from one document to another, this option specifies how formatting is resolved when both documents have a style with the same name, but different formatting.
The formatting is resolved as follows:
Built-in styles are matched using their locale independent style
identifier. User defined styles are matched using case-sensitive
style name.
If a matching style is not found in the destination document, the
style (and all styles referenced by it) are copied into the
destination document and the imported nodes are updated to reference
the new style.
If a matching style already exists in the destination document, what
happens depends on the importFormatMode parameter passed to
Document.ImportNode as described below.
When using the UseDestinationStyles option, if a matching style already exists in the destination document, the style is not copied and the imported nodes are updated to reference the existing style.
So, in your case, I suggest you please use UseDestinationStyles option while inserting one document into another.
I work with Aspose as Developer Evangelist.

edit styles for normal.dotm template

My intention is to edit the Normal.dotm file from word.
All the links i read and the examples talk about open the file in word, which opens as a template, add the styles that i want and save to use it later to create new documents.
In these examples, when i open the file with word, i never see the characters inside the normal.dotm.
When i open the file with (for example) notepad or wordpad, it shows rare characters that i cant read.
It is possible to edit manually(or directly) or add the styles in the text inside the file? or the only way possible is to add the styles when i open the file with word as a template?.
I think once i found a link that said it was incorrect to directly add text to that file manually. But i am not sure of that.
Can you give me some advice?. Thank you.
This is the wrong forum for this type of question. SO is for questions about programming. In future please ask this sort of question on Super User.
To answer your question:
It is possible to edit Normal.dotm outside of Word but only if you are an expert in OOXML. If that is not the case open it inside Word using File | Open.
Documents in Word should be created from a template suited to the purpose, i.e. if you want to create letters first create a letter template with appropriate styles and content. You should not attempt to create all your documents based on the Normal template.

Script to generate html Beyond Compare folder differences

I've found several ways to automate folder comparison using scripts in Beyond Compare, but none that produce the pretty html report created from Session>Folder Compare Report>View in browser.
Here is an example of what that looks like.
I would love to be able to find the script that gives me that html difference report.
Thanks!
This is what I am currently getting
load "C:\Users\UIDQ5763\Desktop\Enviornment.cpp" &
"C:\Users\UIDQ5763\Desktop\GreetingsConsoleApp"
folder-report layout:side-by-side options:display-all &
output-to:C:\Users\UIDQ5763\Report.html output-options:html-color
The documentation for Beyond Compare's scripting language is here. You were probably missing either layout:side-by-side, which gives the general display, or output-options:html-color which is required to get the correct HTML stylized output. You may want to change options:display-all to options:display-mismatches if you only want to see the differences, and you might want to add an expand all command immediately before the folder-report line if you want to see the subfolders recursively.'
The & characters shown in the sample are line continuation characters. Remove them if you don't need to wrap your lines.