Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8352019
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T08:49:56+00:00 2026-06-09T08:49:56+00:00

Hi and thanks for looking! Background I am printing a multi-page report using Rotativa

  • 0

Hi and thanks for looking!

Background

I am printing a multi-page report using Rotativa PDF which prints pages of HTML to a PDF. In doing this, I need to follow @page conventions of CSS 2.1 and higher.

My application is in C#, MVC 3.

Problem/Question:

Even if I specify 8.5in by 11in in the @page declaration, the page within the printed PDF is only scaled to about 75% of the 8.5X11 sheet. I know this because I have a background image that should cover the entire page, but it prints to the PDF at only about 75% of the whole page. The content is scaled down too so everything is proportionally correct, just not canvasing the whole 8.5X11 frame as it should.

I am setting up the cover page of the report like this in CSS:

@page defaultPage{size:8.5in 11in;margin: 2cm;}    
#CoverPage {
        page: defaultPage;
        background-image: url(/Resources/rendered_assets/img/cover_bg.jpg); 
        background-repeat:no-repeat;
        width:8.5in;
        height: 11in;           
    }

And the HTML:

 <div id="CoverPage">
        <p>foo</p>
        <p>bar</p>
 </div>

Any idea what I might be doing wrong? Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T08:49:58+00:00Added an answer on June 9, 2026 at 8:49 am

    Don’t know if it would solve your problem.. but with the latest Rotativa release you get the possibility to pass some options to the rendering engine. You can set PageWidth and PageHeight and Margins like this:

        return new ViewAsPdf()
        {
            FileName = "TestView.pdf",
            PageSize = Size.A3,
            PageOrientation = Orientation.Landscape,
            PageMargins = { Left = 0, Right = 0 }, // it's in millimeters
            PageWidth = 122, // it's in millimeters
            PageHeight = 44
        };
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello and thanks for looking! Background I am designing a greenfield application using .NET4
Thanks for looking on this problem. I have a page that is totally valid
Hi and thanks for looking! Background I am working on a developer tool for
Hi and thanks for looking! Background This is an extension on this question: How
Im looking for a way to change the background image of a div using
Hi and thanks for looking! Background I need to pull the file locations (path
Hi and thanks for looking! Background I have a workflow that constructs a set
Hi and thanks for looking! Background C#, .NET 4.0, MVC, currently running in debug
Hi and thanks for looking! Background I have a computing task that requires either
Hi and thanks for looking! Background I am building my first application in Node.JS

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.