vue-html-to-paper icon indicating copy to clipboard operation
vue-html-to-paper copied to clipboard

How to prevent closing preview window after print or cancel?

Open gkandemi opened this issue 5 years ago • 6 comments

How to prevent closing preview window after print or cancel?

gkandemi avatar Feb 16 '20 17:02 gkandemi

Helle @gkandemi, thanks for posting an issue. By design this plugins automatically closes the window after printing or when cancel is clicked. See here.

May I know the reason behind this request? While it is ok to add an option to prevent the closing, I still need to understand the problem or the reason so that I would be able formulate a better solution. Thanks.

jofftiquez avatar Feb 19 '20 05:02 jofftiquez

Hello @jofftiquez, Thanks for replying. Well, it would be nice to preview in browser my template. BTW sorry for late response. I didn't realized the notification :)

If you don't have enough time please don't read below :)

So one favour, Do you know any print templates? I mean, I am doing print template like that.

Header Content (Iteration on every page ) Real content iteration items Footer Content (Iteration on every page )

Well the problem is, if tbody content shorter than page length tfooter locates after tbody immediately. I would like to footer content always stick bottom and shows on every page.

I can do it by

but on this case I can't put footer on all pages bottom.

I hope I could explain what I mean :)

Thanks for response.

gkandemi avatar Mar 03 '20 15:03 gkandemi

Hello, I understand. I thinks it's pretty doable. I will do it soon.

Sorry, I didn't get the whole problem but it sounds like this could help you https://www.smashingmagazine.com/2015/01/designing-for-print-with-css/.

jofftiquez avatar Mar 03 '20 15:03 jofftiquez

Hi,

Thanks both of them :)

gkandemi avatar Mar 03 '20 16:03 gkandemi

Hello again, @jofftiquez

I forgot to say about a bug. I don't know you saw this before. Well When I tried to preview my component, by doing "$htmlToPaper" Preview Screen Appears after that closing immediately. I need to try a couple of times to get preview window.

My components could have images sometimes. What do you think about it? is it because of images?

Thanks for this plugin and your works :)

gkandemi avatar Mar 03 '20 23:03 gkandemi

Hello @gkandemi thanks for the feedback.

Would mind including a screenshot of the error?

As for the image, you also have to consider the load time of the image. I'll see what I can do about it.

jofftiquez avatar Mar 04 '20 13:03 jofftiquez