I'm using the pdf/pdf.dart package to create a PDF document that displays long paragraphs of text in an article-like format. I'm running into an issue where I cannot figure out how to format the pdf in a way where text spans across multiple columns.
I have an input as a big String of text, and I need it to be formatted into two columns to span across multiple pages. I have only been able to span the text in 1 column across multiple pages (using the column and richtext pdf widgets).
To clarify here is an example of the format I have been able to achieve (notice the text is in a single column): https://www.ohchr.org/sites/default/files/UDHR/Documents/UDHR_Translations/eng.pdf
Here is what I am hoping to achieve (notice the text spans across multiple columns on the same page): https://constitutioncenter.org/media/files/constitution.pdf
Is this possible with the package I am using, if not are there any packages anyone knows of that can achieve this?
Related
I would like to know:
How to add automatically a formatted end row to all tables in a Word document?
I mean I have a Word document with a lot of tables. Some of them are spread over two or more pages. When a table is spread over several pages, I want to add **automatically ** a formatted end row like : "continued..." to each part of the table
I provide a example in attachment.enter image description here
https://www.intel.com/content/www/us/en/docs/programmable/683023/21-4/f-tile-channel-placement-tool.html
If anyone can help me.
Cotton
I want to add automatically a formatted end row like : "continued..." to each part of the table
I have a model xml data:
Model data
I have been using split-column-data: to display column dynamically as I have some data with multiple different column. The thing is the border between each rows is missing. <?split-column-data:Test?> <?TestValue?> This is how i display the Test column dynamically. below are my RTF template from word
RTF template in words
I keep getting this:
Row border is missing
And the ideal out would be: ideal output with row border missing
Sorry for my bad english, but I need help please. Thanks
If you have already tried all the standard boarder stuff in Word, you can insert a nested table for each field (table within a table). Change the parent cell to have 0 margins/padding. Keep the for-each/end-for-each in the parent table.
I am putting a footnote in an .rtf template, and before generating a report it seems ok,
but when I load an XML sample and preview the document (.pdf or .doc etc.)
the footnote content goes right into the body of my report (example is in the picture).
I've tried using text boxes, but it doesn't help.
I've also tried just making a paragraph look as a footnote, but since I have a lot of
tags in my template, the footnote-looking text doesn't stay at the
bottom of the page.
and I can't use footers/headers because I need only one footnote at one page.
Try to draw a borderless table with one column and two rows where the first row has fixed hight (exactly) of the size of body, and the second row fixed hight of the size you want to reserve for the footer. Then you place your xml data in those two rows of the table the same way as you put it on the page. I use that for different forms when the position of the data is fixed. There are also other table/row/column properties that you might want to use.
i have an ExcelWriter xlsx template that is populated via a datatable. Everything works perfectly but one column in the datatable is too large for the cell. The column is actually varchar(max) populated from text box area in a web application so the column can have multiple sentences in it. I tried to setup the xlsx template to do word wrap - and that works (kinda), but the text is still only in one cell. Is there a way to split or wrap the column across multiple cells vertically?
Text wrap is Excel's way of dealing with this issue. The other options are to alter your data before passing it to Excel Template so that your cell value is actually multiple rows in your data source.
If neither of these options are possible, A less desirable way might be to do some formula trickery where you store your large cell value in one cell and break it up into other cells with formulas such as LEFT MID or RIGHT
See http://www.excel-easy.com/functions/text-functions.html for some examples
I have face several problems when using ITextSharp table.
1) How to auto fit table column width to maximum?
2) How to push the entire table to the right (right-align table not right-align table content)
below are what i am trying to achieve where | indicates starts and end of page.
As we can see, column 1 (invoice A, B, CDE) are of different width, same to column 3. I would like itextsharp to auto fit the width. Perhaps there is a function in itextsharp that can achieve this?
| Invoice A : Be |
| B : Cdefg |
| CDE : abc |
Regarding part 1 of your question: auto-sizing of columns based on their content
Please take a look at The Best iText Questions on StackOverflow. It has different examples on how to tune tables, especially in the chapter named "Tables".
It is important to understand that PDF is a format where you decide what content goes where. In other words: you define the width of the columns. The width of the columns is not defined by their content as is the case in HTML.
If you want the tables to "auto-size", why don't you create your tables as HTML and then use XML worker to convert the HTML to PDF. In that case, iText's XML Worker will look at the content and adjust the column width accordingly. For an example, take a look at my answer to the following question: How to get particular html table contents to write it in pdf using itext
Incidentally, that example is written in Java, but if you need a C# example, you'll find a C# example here: itextsharp html to pdf
Regarding part 2 of your question: setting the alignment of a table
There is a method for that. In Java, it's setHorizontalAlignment(). You can find the C# counter-part here: Align itextsharp table
In other words, you need:
table.HorizontalAlignment = Element.ALIGN_RIGHT;