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 8265847
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T04:56:44+00:00 2026-06-08T04:56:44+00:00

I have a printing solution for ExtJS objects that seems to work great for

  • 0

I have a printing solution for ExtJS objects that seems to work great for everything except for charts.

I’ve been using @media print CSS tip to create a “printing” div below my viewport (so it is not seen on screen, but it is the only item that is printed when a user clicks the print button).

I do this so that I can control the proportionate sizing of the object so that it fits on the page nicely and so that I can remove “non-printing” elements like toolbars. When I want to print an ExtJS object from my app I add it to this “printing” div and then call document.print.

The CSS for the div looks like this:

@media print {
    @page {size: landscape}
    body * {
      visibility: hidden;
    }
    .printer, .printer * {
      visibility: visible;
    }
    .printer {
      overflow: visible;
      position: absolute;
      left: 0;
      top: 0;
    }
}

This has been working fine for grids and forms and other ExtJS objects.

Now I have to set it up to print some charts but I get a “Layout run failure” error whenever I add the charts to my printer div – the chart does not get created at all. I am pretty sure that this is because the printer div is not actually seen on the screen, and the chart lays itself out based on how it is seen.

Other elements (like grids and forms) do not seem to care if they are visible on the screen to do a layout, so I was wondering is there any way to override this requirement for a chart object? Or is this inextricably buried in the chart code? It would be the ideal handling for me because I would not have to change around my printing mechanism.

Does anyone know if this is possible?

I could create the printable versions of charts inside of a proportionately sized Ext.window.Window object instead that also has my printer class. It would be visible while the layout occurs (about a second) and then get hidden right after I call document.print but obviously that isn’t as transparent.

@EvanTrimboli this is the root problem I was trying to handle with that other question.

  • 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-08T04:56:46+00:00Added an answer on June 8, 2026 at 4:56 am

    I ended up putting the chart config in a floating panel. Then I showed the panel and immediately zIndexed it underneath the viewport. Like this (where content is the chart):

    // create the printer panel
    printable = Ext.create('Ext.panel.Panel', {
        cls: 'printer',
        border: false,
        header: false,
        shadow: false,
        floating: true,
        height: content.length * 670,
        width: 900,
        items: content,
    }).show();
    
    // stash the panel where it wont be seen
    printable.setPosition(0, 0);
    printable.el.dom.style.zIndex = -50;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have to modify an existing printing solution (.NET 2.0, C#) that currently prints
I make an app that have to printing image. I need to print image
I have successfully implemented printing and print preview for my app using the PrintDocument,
I have a Python script that makes use of 'Print' for printing to stdout.
I have a Winforms application that generates its own PrintDocument object for printing. It
I have to develop an App for Android tablets that demands printing files to
I need to add printing capabilities to an app and I have been looking
This seems like it should have a super easy solution, but I just can't
I have an array of arrays that is currently printing each object in the
I have been researching options for printing report-like data via a web application. Some

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.