필터 지우기
필터 지우기

how can i create a pdf report with both portrait and landscape orientation?

조회 수: 4 (최근 30일)
Fragkiskos Nikolakis
Fragkiskos Nikolakis 2016년 12월 12일
편집: Sean de Wolski 2016년 12월 12일
I am trying to create a pdf report that concludes many graphics. Some graphics demand landscape orientation. How can I include lansdcape oriented pages in a portrait oriented report?
Thank you

답변 (2개)

José-Luis
José-Luis 2016년 12월 12일
You could always try a system call to pdftk.
  댓글 수: 1
Fragkiskos Nikolakis
Fragkiskos Nikolakis 2016년 12월 12일
thank you for your answer,but I create many reports every day so I don't have the time to fix each one of them. Is there any other way to do that so I can conventionalize all the reports?

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


Sean de Wolski
Sean de Wolski 2016년 12월 12일
편집: Sean de Wolski 2016년 12월 12일
Try this:
import mlreportgen.dom.*
rpt = Document('output','docx');
append(rpt, Heading1('Hello'));
clonedSection = rpt.CurrentPageLayout.clone();
section = DOCXSection();
section.PageSize.Orientation = 'landscape';
section.PageSize.Height = '8.5in';
section.PageSize.Width = '11in';
append(rpt, section);
append(rpt, magic(15));
append(rpt,clonedSection);
append(rpt, Heading1('World'));
close(rpt);
rptview(rpt);
If you're using templates, then the template dotx files can be landscape and you can append them as DocumentPart-s

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by