ProgressNS / code-samples

Find code samples and building blocks for your NativeScript app in the Marketplace
https://market.nativescript.org/?tab=samples&framework=core&category=all_samples
Apache License 2.0
36 stars 22 forks source link

added pdf generation sample using pdfMake, and jsPDF JavaScript libraries #110

Open kumarandena opened 5 years ago

kumarandena commented 5 years ago

Playground Link - https://play.nativescript.org/?template=play-ng&id=tZ5F9Y Detailed Writeup - https://link.medium.com/JOvUiyCdIU Github Repo - https://github.com/kumarandena/nativescript-pdf-generation

cla-bot[bot] commented 5 years ago

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Kumaran. This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email email@example.com
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails
rdlauer commented 5 years ago

@kumarandena Can you fill out the CLA form? You should have received details in an email. Thanks!

rdlauer commented 5 years ago

This sample is cool - but I wonder if it's possible to load the PDF in a browser or a WebView automatically?

cla-bot[bot] commented 5 years ago

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Kumaran. This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email email@example.com
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails
kumarandena commented 5 years ago

@rdlauer I tried the same but no luck! If I tried with the default browser, openUrl API from utilsModule will accept only the URL with a proper protocol or the pdf from a webserver. Of course, the Webview module also requires the same input. Don't find a way to load the base64 content of the pdf automatically.
If we will get any way to do this in the future then we can add that along with other frameworks support of this same sample! What do you think?

kumarandena commented 5 years ago

@cla-bot check

cla-bot[bot] commented 5 years ago

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Kumaran. This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email email@example.com
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails
cla-bot[bot] commented 5 years ago

The cla-bot has been summoned, and re-checked this pull request!

kumarandena commented 5 years ago

@rdlauer Can you please help me on this? I have already signed the CLA and also checked the local and global git config details. Both user name and email are correct only. Still, CLA status verification keeps failing...

Kumarans-MacBook-Pro:code-samples kumaran$ git config --list | grep email user.email=kumarandena@gmail.com

Kumarans-MacBook-Pro:code-samples kumaran$ git config user.name kumarandena

rdlauer commented 5 years ago

@etabakov Can you check on why this isn't working for @kumarandena? (see above)

rdlauer commented 5 years ago

Regarding the sample itself - yeah I think unless you can show a PDF in the app, there isn't as much value in copying and pasting. We can wait until a better solution appears :)