node-html-pdf-sample icon indicating copy to clipboard operation
node-html-pdf-sample copied to clipboard

Using bootstrap

Open jmorrisIII opened this issue 8 years ago • 5 comments

Is it possible to use bootstrap styling or an external style.css file with this method of creating pdfs or you have to declare the styles in the mark up?

jmorrisIII avatar May 16 '16 16:05 jmorrisIII

@jmorrisIII I haven't tried using Bootstrap but recently we tried using Materialize css and it works well enough, so i am thinking it should work for BS too but I will give it a try in some free time later on. I appreciate your comments.

itsmebhavin avatar May 17 '16 13:05 itsmebhavin

Thanks. I am having trouble referencing bootstrap locally . I can reference it from a cdn and it works. I also can't reference a local app.css. I have to put my css in the same file as html.

jmorrisIII avatar May 17 '16 14:05 jmorrisIII

If you have small test code which I can look or try, share it with me if you don’t mind.

From: jmorrisIII [mailto:[email protected]] Sent: Tuesday, May 17, 2016 9:08 AM To: bapatel1/node-html-pdf-sample [email protected] Cc: Patel, Bhavin [email protected]; Comment [email protected] Subject: Re: [bapatel1/node-html-pdf-sample] Using bootstrap (#1)

Thanks. I am having trouble referencing bootstrap locally . I can reference it from a cdn and it works. I also can't reference a local app.css. I have to put my css in the same file as html.

— You are receiving this because you commented. Reply to this email directly or view it on GitHubhttps://github.com/bapatel1/node-html-pdf-sample/issues/1#issuecomment-219728556

itsmebhavin avatar May 17 '16 14:05 itsmebhavin

I downloaded your sample code cut the css and pasted it into another file(style.css). I also installed bootstrap with bower then referenced it. None of the styles were applied when used in code.

<link rel="stylesheet" href=bower_components/bootstrap/dist/css/bootstrap.css /> <link rel="stylesheet" href=style.css />

jmorrisIII avatar May 17 '16 14:05 jmorrisIII

Ok I have to check because, most of the time, we used this library / component for report generator and so each report html has it’s own css embedded into it and not into separate file so I never tested it like that way.

From: jmorrisIII [mailto:[email protected]] Sent: Tuesday, May 17, 2016 9:24 AM To: bapatel1/node-html-pdf-sample [email protected] Cc: Patel, Bhavin [email protected]; Comment [email protected] Subject: Re: [bapatel1/node-html-pdf-sample] Using bootstrap (#1)

I downloaded your sample code cut the css and pasted it into another file(style.css). I also installed bootstrap with bower then referenced it. None of the styles were applied when used in code.

— You are receiving this because you commented. Reply to this email directly or view it on GitHubhttps://github.com/bapatel1/node-html-pdf-sample/issues/1#issuecomment-219733789

itsmebhavin avatar May 17 '16 14:05 itsmebhavin