printing with custom page size and print preview settings for IE/Firefox/Safari - printing

I am currently trying to add a "Print Label" functionality. After clicking the button, the print preview dialog should open and print in the label format (which is different and hidden from the screen view).
I had tested in chrome, IE, Firefox and safari in Windows 7. However, only chrome works as expected, printing in the expected page size and style. For IE and Firefox, although the label format stays intact when I save in PDF, I can only print in the letter (default) page size, which means a disaster when I use the label printer to print. When I attempt to change the page size to the custom label size, IE crashes while Firefox does not let me open the properties in the system print dialog. For safari (IN WINDOWS), I can print in the custom label size, however, I cannot remove the header and footer, resulting the label format to split into many pages.
The questions I have are:
1. Is the culprit the custom label size, or is it because of the limitations of the other browsers?
2. How can I remove headers and footers in Safari (windows)? My findings are pessimistic about that for now...
3. Are there any ways for me to generate print preview dialog, instead of print dialog, for other browsers? (Something like chrome)
4. Are there any ways for me to use Javascript to preset print settings, to set the printer to the label printer and change page size to the custom label size?
Thanks if anyone can enlighten me.

Related

PowerBI Text Box - anomalous black dots on published dashboard

When publishing a dashboard from PowerBI Desktop to PowerBI's web interface, I've encountered spurious black dots appearing along the bottom of a text box.
I've tried moving the text box, checking other objects nearby, and changing its border settings, but the dots are definitely being produced by the text box itself, regardless of its attributes.
What could cause this?
Not all text boxes and fonts display identically in Desktop and Online. Check that the word spacing in your text box has not increased when you published it - if additional spaces have appeared and pushed one or more words off the end of the text box, these may have appeared on a second line, and then been clipped by the text box size to only show the tops of the lettering.

Text is appearing blurry as you get further into the report

We have some reports generated with JasperReports 6.2.0 that have this bizarre affect where as you get further into pages of the report the text gets more blurry as you go. The first page or two is crisp text, but get to page 30 or so and it becomes unreadable. In our scenario we are printing checks, so I can only post close up shots of some text. But the first image is the first page, and the second image is about page 28. Notice the difference.
We have two font extensions set up with Calibri and MICR fonts, They are added correctly and have the pdfEncoding set to Cp1250 and pdfEmbedded to true (I have tried other values).
How can we make the text not become blurry? Thanks
UPDATE: I am removing Jasper Reports from the equation/cause of the issue. And believe it might be in the component PDF.js that we are using that renders the PDF into the print preview.

html5/css3, Asp.net MVC3 - View pdf in an html page on mobile safari

My upcoming mobile web project requires viewing dynamically chosen pdf files inside the webpage. I am using iFrame to display the pdf file and the file can be scrolled using two-finger scrolling. But the problems I am facing are:
The first page of the file is not displayed completely on the iPad and gets cut off along the width unlike when I view it on the desktop browsers where the first page of the pdf is always entirely displayed although zoomed out to fit in the iFrame area.
There is no visual indication for the users that the pdf document can be scrolled, i.e., there is no scroll bar on the pdf document.
The controls (page navigation, zoom etc.) for the pdf viewer (Adobe reader) don't appear on the document unlike when I see it on the desktop browsers.
What is the best way to achieve what I am trying to do? Do any of you experts know any solutions/workarounds to the problems I am facing? An entirely different approach using anything other than iFrame can also be considered.
The reason why the pdf should be inside the html page is that, the list of pdf files will be on a menu bar on the left side of the page and the user can click on any of them to view on the same page. Ideally, they will have the capability to toggle between full screen view and that view.
Any help is appreciated.
I created a tiny JavaScript module that helps you to show a PDF inline and be able to scroll it. But I also couldn't figure out a way to make it fit the total width of the parent container.
Check it out: https://github.com/williamrjribeiro/ipdf-scroll
Cheers.
I came across this Recommended way to embed PDF in HTML? while researching on the web to find an answer.
The mentioned link discusses about some options that I can use and the google document viewer works for me though don't know if there is anything (like data limit) I need to be aware of before using it on the website. Also I have no idea if it is a good solution (though the full screen mode is not available, but zoom-in/zoom-out and next/prev page buttons are there are show up in the mobile safari on the iPad) to use for an web app that will be run on the iPad.
Anyway, I will keep researching for a better solution and if i don't find any, I'll stick to the google document viewer.
The issue appears to be a bug with Safari on the IPad.
I didn't find a solution for embedding the pdf in html but I did find this:
If you return FileStreamResult from your controller action instead of a view, the pdf will open in a new tab, it's not embedded html but at least your user is not having to download files and open them manually.
I had the same problem of the pdf not being displayed completely. The only thing I found to fix this was the change the size of the div containing the pdf.
For example if the element containing the pdf is a div then I change its width to any value and the rollback to the value it had before. Changing Width or height any one works.
Sometimes I had to wait a little using a setTimeout before calling my resizable method

sIFR text getting stretched vertically in IE9

I've got a site that's using sIFR, and some of the replaced text is being stretched vertically in IE9. It's only happening in places where the text wraps 2 lines, and it fixes itself when I hover my cursor over it. The sIFR text is a link, but I'm not sure if that has any correlation.
I've tried various settings changes like fitExactly, forceClear, and forceSingleLine (though I want it to be able to wrap), and those didn't work. I've tried changing the font-size, line-height, and all other dimensions to px instead of em. innerHTML isn't being used anywhere on the page. It's frustrating that it works after being hovered on, but not before.
And I know you're probably thinking "use cufon or #font-face, dummy" but I'm stuck with sIFR for now. The client wants what the client wants...
I've found a solution,
if you try to hover with mouse cursor the text will display correct so..
I write few line of code to put in sifr-config.js
forcing flash reset "onReplacemment" callback only when IE9 is detected
you must use Jquery for browser detection or use another javascript way
see the link below:
http://www.voo-doo.net/robotphobia/2011/05/fix-sifr-ie9

internet explorer 7&8 print layout problems

I have created a print button on my site which launches the print dialogue box. I also have a print.css file which is used to layout the print document. In this print.css file I have discarded everything I don't need. Only the logo of the company, title of the page, the header image and the relevant content will print.
All looks dandy when I view it with the web developer toolbar in FF. When testing in Internet Explorer I get random text and my logo image decides it is going to sit anywhere it likes.
Is there a resource of best print practices to follow for printing, specifically in IE?

Resources