how to make a custom horizontal alignment in mlreportgen.dom.*?

조회 수: 3 (최근 30일)
Aju George
Aju George 2018년 7월 9일
답변: Rahul Singhal 2018년 7월 16일
how to make custom text and image alignment in
mlreportgen.dom.*
I used
HAlign()
but it is only having 'center','left','right' is there any method to customize this? any solution will be appreciated
  댓글 수: 3
Aju George
Aju George 2018년 7월 11일
I want to make a medical report having signals. I want to plot my signals on the right side along with a report on the left side. Are there any alternative methods?
Aju George
Aju George 2018년 7월 11일
an similar kind report attached that i wish to make(for representation only,sourse- google)

댓글을 달려면 로그인하십시오.

답변 (1개)

Rahul Singhal
Rahul Singhal 2018년 7월 16일
Hi Aju,
The team has a planned enhancement to support multi-column page layout and will be available in future releases. As an alternative, you can create a page-wide invisible table and append your report content to the first column of the table and images to the second column of the table. Here is a sample script:
import mlreportgen.dom.*
% Create a document
doc = Document("output", "pdf");
open(doc);
% Create a page wide invisible table
tbl = Table();
tbl.Border = "none";
tbl.Width = "100%";
% Create a single row for the table
row = TableRow;
% Create first table entry for the report content and append it to the row
entry1 = TableEntry;
entry1.Style = [entry1.Style {Width("50%")}];
append(entry1, Paragraph("Report content goes here."));
append(row, entry1);
% Create second table entry for the images and append it to the row
entry2 = TableEntry;
entry2.Style = [entry2.Style {Width("50%")}];
append(entry2, Paragraph("Image goes here."));
img = Image(which("ngc6543a.jpg"));
img.Height = "2in";
img.Width = "2in";
append(entry2, img);
append(row, entry2);
% Append row to the table and table to the document
append(tbl, row);
append(doc, tbl);
% Close and view the document
close(doc);
rptview(doc);
Hope this helps!

카테고리

Help CenterFile Exchange에서 MATLAB Report Generator에 대해 자세히 알아보기

제품


릴리스

R2017a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by