Can only print one page. If the web page has more that will fit on one printer page only the first page is printed. Second page is blank. On a Mac with the print option of “PDF Preview” the second page has the heading and footer otherwis it’s blank.
Add a canvas to the web page, don’t know what to do with it, but I added it. Did not help.
As the size of the web page height is increase I tried to set the height of the canvas same but got a Java error.
Yes, but, the height of the page was set to one page with the canvas locked to all sides. as more data was added to the page I check and made the page bigger, however the canvas did not change, checked in the debugger, Here is the code:
if self.height < mtop + ccSOData1.height then
self.height = self.height + ccSOData1.height
pbClose.top = pbClose.Top + ccSOData1.height
pbPrint.top = pbPrint.top + ccSOData1.height
ccFooter1.top = ccFooter1.top + ccSOData1.height
'cvsPrt.Height = self.Height
end if
Note that the canvas (cvsPrt) is commented out. That caused an Java error.
If I understand right, you want to print from the browser, right ?
The browser will print based to 72 pixels per inch, which means a page has to be more than 792 pixels to trigger a new page on the printer. So if you want to print two pages, your webpage will need to be 1584 pixels.
I don’t quite understand what you do with the canvas. Is it what you are trying to print ?
[quote=286321:@Michel Bujardet]If I understand right, you want to print from the browser, right ?
The browser will print based to 72 pixels per inch, which means a page has to be more than 792 pixels to trigger a new page on the printer. So if you want to print two pages, your webpage will need to be 1584 pixels.
I don’t quite understand what you do with the canvas. Is it what you are trying to print ?[/quote]
The browser will print based to 72 pixels per inch, which means a page has to be more than 792 pixels to trigger a new page on the printer. So if you want to print two pages, your webpage will need to be 1584 pixels.
I don’t quite understand what you do with the canvas. Is it what you are trying to print ?[/quote]
Yes I do want to print from the browser.
Made some changes, to bump up the page size by 792 pixels, as required.
Removed the canvas.
Tested with Safari. The java print command did nothing. Using Safari ‘Print’ menu and all six pages printed. Good!
Tested with Opera. Printed all six pages. Good!
Tested with FireFox (my standard browser). Printed one page and part of a second page, the part that printed was part of a container which was split between pages. Did not print page 3 to 5 al all. NOT good!
Firefox has an Ad Blocker set up and that may be the cause, or something like that. As I don’t use Safari and Opera much I don’t have the set up.
Well, each browser has its own idiosyncrasies. What you really want to make sure of is that maxHeight is at the minimum the same as the WebPage height. In principle it should work with all browsers.