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

  • Home
  • SEARCH
  • 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 302465
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T07:05:59+00:00 2026-05-12T07:05:59+00:00

When printing from WebKit, it seems to automatically impose a shrink factor on the

  • 0

When printing from WebKit, it seems to automatically impose a shrink factor on the output. Is there a way to disable shrinking when printing, preferably without modifying the WebKit source?
I think it may be possible using Qt 4.6 trunk and using setFixedLayout with a longer height, to trick WebKit into not shrinking, but I haven’t tried it yet. Maybe there is a way to get at the underlying WebKit so I can do this?

EDIT:
Chrome deals with this by extending the print layout height.
http://src.chromium.org/viewvc/chrome/trunk/src/chrome/renderer/print_web_view_helper.cc?view=markup

  • 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-05-12T07:06:00+00:00Added an answer on May 12, 2026 at 7:06 am

    It’s not possible to do with QT 4.5, as I ran into that issue a couple of months ago myself. I don’t now about Qt 4.6, though.

    The culprit is in src/3rdparty/webkit/WebCore/page/PrintContext.cpp on line 115 and 126. As you see the shrinking factor is not even constant but is calculated so that the content fits best on the available printing area.

    Setting both constants controlling the allowed shrinking range (PrintingMinimumShrinkFactor and PrintingMaximumShrinkFactor) to 1 resolves the problem. I analyzed the problem back then very thoroughly and I didn’t came up with a better solution than patching Qt.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 177k
  • Answers 177k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You can attach an element (picture, sound, etc) if they… May 12, 2026 at 3:31 pm
  • Editorial Team
    Editorial Team added an answer Read this one CS-Script - The C# Script Engine CS-Script… May 12, 2026 at 3:31 pm
  • Editorial Team
    Editorial Team added an answer I don't know NInject, but unless it works vastly different… May 12, 2026 at 3:31 pm

Related Questions

(How) is it possible to let the user store a file (via save file
The output we get when printing C++ sources from Eclipse is rather ugly. Is
I am trying to create colored headers and footers when printing a JTable. Specifically,
I hope somebody can help. TextRenderingHint.SingleBitPerPixel is apparently not turning off antialiasing when printing

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.