Better Printing Of Picking List

Everytime i print my invoice/Pick List any it splits items between pages. Any way to avoid this?

Comments

  • 22 Comments sorted by Votes Date Added
  • There is no better way. It's the behaviour of the internet on printing pages. If you want it perfect, you have to download the order via api and format the output in a reporting program. MS Access will do the job also for you, but you need some programmer skills.

    Frank
  • I did look into this and couldn't find a resolution at the time, it's the browser that does it, some browsers handle it differently.
  • Not many sites do this but it is possible to force a specific CSS for printing.

    For example <link rel="stylesheet" href="print.css" type="text/css" media="print" /> - this would only be loaded by the browser when someone prints a page.

    The good thing about having a separate CSS is that you can use display: none to hide all sorts of superfluous containers and essentially just leave the list behind.
  • @Hoddie we do have one of those actually, it's really quite effective. The issue is due to browsers splitting the table within a row I think.
  • Oh I see. You could perhaps add an empty <DIV> with the "page-break-before: always" style within every 10th (or whatever) row of the table. You'd need to use "display: none" for this DIV in the normal CSS file. You might need to include a "display: block" with the "page-break-before" bit.
  • Do you mean to sort of guess where the page break should be, then force it to break there?
  • Yeah, I think that's the only way. You could use try assigning "page-break-inside: avoid" to <tr> tag but I'm not sure how supported that is.
  • Ah, that sounds like a pain, as then I have to try and guess where the page break is. I'll make a note about it against the task though.
  • Well until ya perhaps get it sorted i downloaded firefox and its breaks the tables on its own. It also prints the sorting dropdown but hey... i can love with it.

    Perhaps a temp solution for now lol. ok.. back to chrome.
  • edited January 2014 Vote Up0Vote Down
    It is really very difficult to guess where the pagebreak will be. We normally use the page size A4 and the US standard is letter, I guess. So the size of the paper can differ between countries.

    Frank
  • Yes that's true. The {page-break-inside: avoid;} method within tag might be the better way to do it, though this might not work with all browsers.
  • I thought I would update this to say I spent another two hours on the issue and I'm unable to resolve it on chrome. It seems that chrome it's just awful at printing tables. The page prints fine in Firefox or Internet Explorer.
  • edited February 2014 Vote Up0Vote Down
    Perhaps ask in StackOverflow and see if any of the fellas there can answer it?
  • Funnily enough, there's atleast three seperate questions with no working solution.
  • I had the same problem once with another page, and this one worked for me.

    http://stackoverflow.com/questions/17761646/how-to-achieve-page-break-in-html-table-for-google-chrome

    But I'm quite n00bish, so can't say if it would work here.
  • Could you maybe force a page break after the items - so that all the address info "stays together"?

    I print the invoice as 2 pages per page, if it goes over 2 pages I print on back - so in this case it would definately look better.

    Also on paper sizes if you default with US Letter it will fit A4 - as A4 is longer
  • If you're using Chrome, you can select Print Using System Dialog at the bottom of the left pane. Or you can just press CTRL+SHIP+P and it will bring up the system dialog instead of the Chrome dialog. It's been working well for me.

    Or you can just use Firefox.

    @Admin It's not worth trying to program around Chrome printing. They just pretty much parse pages however they want and expect web developers to design their sites around Chrome (as far as I understand it, anyway).
  • I stand corrected. Even using the system dialog through Chrome will result in split rows. Firefox seems to be the way to go.
  • @Loremonger It's a bit annoying, I built the site in Chrome, but you can't print pick lists in Chrome. Do let me know if there are any styling issues in Firefox, I fixed a few button heights the other day,
  • I use FireFox 99% of the time. The only odd thing I have seen is when I click "add" for typing in the tracking number. There is no "X" in that window to close the window. There is still a box in the top right corner and the window does close if I use it, just no "X".

    I have noticed this a long time ago, just doesn't bother me at all, but since you asked I figured I would chime in.

    Oh and when people send messages the message wraps by the letter and not the word. So words are chopped in half in the private messaging system.

    Chris
  • i just copy and paste the url from chrome to Firefox to print with. Would never use Firefox full time lol.
Sign In or Register to comment.