Kinson Sa
Posts: 0
Joined: Sun Mar 22, 2015 9:40 pm

Print Page

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

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Print Page

Hello,

You are able to use current page for that.

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

instead of
predocument.body.innerHTML/pre

Kinson Sa
Posts: 0
Joined: Sun Mar 22, 2015 9:40 pm

Print Page

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

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Print Page

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

Return to “Issues”