Update: translated by English. Normally non English posts are not allowed and deleted. As it got already some replies and apparently an answer I decided to use deepl.com to translate it (and change a bit as vin should be fin according to me - XIII):
Hey, everybody,
I'm trying to change the orientation of my pdf page generated with Rotativa 2.0.2. All that I see on the net so far doesn't help me, certainly because of my version of Rotativa. So please help me.
Sincerely
Original:
Salut à tous,
J'essaie en vin de modifier l'orientation ma page pdf générée avec Rotativa 2.0.2. Tous ce que je vois sur le net jusqu'a présent ne m'aide pas, certainement à cause de ma version de Rotativa. Donc aidez moi svp !!!
.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today.
That you did not working with me. But I already found the solution.
return new ViewAsPdf()
{
RotativaOptions = new Rotativa.Core.DriverOptions()
{
PageOrientation = Rotativa.Core.Options.Orientation.Landscape,
}
};
I'm glad you have found a solution. My example uses
Rotativa, and you use Rotativa.Core, so the writing is a bit different.
Best Regards,
YihuiSun
.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today.
None
0 Points
2 Posts
Asp.Net MVC 5 Rotativa 2.0.2
Jun 09, 2020 11:25 AM|Anliou|LINK
Update: translated by English. Normally non English posts are not allowed and deleted. As it got already some replies and apparently an answer I decided to use deepl.com to translate it (and change a bit as vin should be fin according to me - XIII):
Hey, everybody,
I'm trying to change the orientation of my pdf page generated with Rotativa 2.0.2. All that I see on the net so far doesn't help me, certainly because of my version of Rotativa. So please help me.
Sincerely
Original:
Salut à tous,
J'essaie en vin de modifier l'orientation ma page pdf générée avec Rotativa 2.0.2. Tous ce que je vois sur le net jusqu'a présent ne m'aide pas, certainement à cause de ma version de Rotativa. Donc aidez moi svp !!!
Cordialement,
Contributor
2690 Points
774 Posts
Re: Asp.Net MVC 5 Rotativa 2.0.2
Jun 10, 2020 02:28 AM|YihuiSun|LINK
Hi, Anliou
According to your needs, I made an example, please refer to it.You need to set "PageOrientation".
Remarks: This is an English forum. You should submit your question in English so that it can better help you.
Controller
ViewAsPDF
Here is the result.
Best Regards,
YihuiSun
None
0 Points
2 Posts
Re: Asp.Net MVC 5 Rotativa 2.0.2
Jun 10, 2020 08:11 PM|Anliou|LINK
return new ViewAsPdf()
{
RotativaOptions = new Rotativa.Core.DriverOptions()
{
PageOrientation = Rotativa.Core.Options.Orientation.Landscape,
}
};
Contributor
2690 Points
774 Posts
Re: Asp.Net MVC 5 Rotativa 2.0.2
Jun 12, 2020 05:35 AM|YihuiSun|LINK
Hi, Anliou
I'm glad you have found a solution. My example uses Rotativa, and you use Rotativa.Core, so the writing is a bit different.
Best Regards,
YihuiSun