Page 1 of 1

Print Page

Posted: Thu Mar 24, 2016 12:04 pm
by Kinson Sa

Dear friends,

I have check to print page

https://getsatisfaction.com/apperyio/...

And everything works, but as I have Render all pages in one HTML file (jQuery Mobile multi-page template), when I make this:

// Get HTML string
Apperyio.storage.page.set(document.body.innerHTML);

// Pass the HTML
cordova.plugins.printer.print(Apperyio.storage.page.get(), 'Document.html', function () {
alert('printing finished or canceled');
});

var Page is all html APP,

It is possible to just take the page I'm on??

Thanks

Thanks


Print Page

Posted: Thu Mar 24, 2016 4:15 pm
by Serhii Kulibaba

Hello,

You are able to use current page for that.

pre$("[data-role=page]:visible").html()/pre

instead of
predocument.body.innerHTML/pre


Print Page

Posted: Tue Mar 29, 2016 2:50 pm
by Kinson Sa

Dear Sergiy, thanks for your reply.

It works but I have a problem. see the page and the printings.

Screen page to print.

Image

Printing in web with windows.print()

Image

Printing in $("[data-role=page]:visible").html()

Image

Is there a way to solve this printing and look as when you are doing with the window printing????

Thanks


Print Page

Posted: Wed Mar 30, 2016 8:39 am
by Serhii Kulibaba

You have to disable "Render all pages in one HTML file (jQuery Mobile multi-page template)" or add CSS styles for that page to print the page correctly