npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

meadco-scriptxjs

v1.10.1

Published

Wrapper library for working with MeadCo ScriptX add-on for Internet Explorer and ScriptX.Print Services

Downloads

65

Readme

MeadCoScriptXJS

MeadCoScriptXJS is a simple javascript wrapper library for use with MeadCo's ScriptX Add-on/Services to achieve consistent printed output using any browser on any device. This library has been used with our samples system for some time.

The aim of the library is to hide differences between versions of ScriptX and provide easy access to some common functionality. The library works with both free and licensed ScriptX. Some convenience wrappers require licensed ScriptX functionality.

As of version 1.2.0 this library facilitates being able to write the same code for both the ScriptX Add-on for Internet Explorer and MeadCo's ScriptX Services browser agnostic printing services in the cloud, on premise and on Windows PC. The dependency on the ScriptX Service Client Library is required for this to work.

v1.5 and later add support for ScriptX Services on Windows PC.

Packages

NuGet Gallery

MeadCo ScriptX JS Library

NPM Use

npm install meadco-scriptxjs --save

CDN Use

<script src="https://cdn.jsdelivr.net/npm/meadco-scriptxjs@1/dist/meadco-scriptx.min.js"></script>

Quick start for working with ScriptX Add-on only

  1. Link to meadco-scriptx.js <script src="https://cdn.jsdelivr.net/npm/meadco-scriptxjs@1/dist/meadco-scriptx.min.js"></script>
  2. Initialise the library in the document ready/window loaded event handler, and initialise printing parameters. For example, when using jQuery:
$(window).on('load', function () {
  if (MeadCo.ScriptX.Init()) {
    MeadCo.ScriptX.Printing.header = "MeadCo's ScriptX&b:&p of &P:&bBasic Printing Sample";
    MeadCo.ScriptX.Printing.footer = "The de facto standard for advanced web-based printing";
    MeadCo.ScriptX.Printing.orientation = "landscape";
            
    // link the ui ...
    $("#print_link").click(function (e) { 
      e.preventDefault(); MeadCo.ScriptX.PrintPage(false); 
    });                           
  }
});

Please note that the library is not dependent upon jQuery or any other libraries.

Quick start - ScriptX.Services for any browser

  1. Link to the required libraries with service connection details
  2. Initialise the library
  3. Initilise print parameters

The same code will work when the add-on is present, but the add-on will be used in preference.

A promise polyfill is required if the browser does not support promises (for example Internet Explorer). We recommend (and test with) Promise Polyfill

<script src="https://cdn.jsdelivr.net/npm/meadco-scriptxjs@1/dist/meadco-scriptx.min.js"></script>

<!-- ScriptX Services client emulation libraries - depend on jQuery -->
<script src="/scripts/jquery-3.1.1.js"></script>

<!-- A promise library will be required if also targetting IE 11. -->
<script src="https://cdn.jsdelivr.net/npm/promise-polyfill@8/dist/polyfill.min.js"></script>

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/meadco-scriptxservices.min.js"
        data-meadco-server="https://scriptxservices.meadroid.com" 
        data-meadco-license="xxx-xxx-xxxxxxx-xxx"></script>

<script type="text/javascript">
   $(window).on('load', function () {
     MeadCo.ScriptX.InitAsync().then(function {
       MeadCo.ScriptX.Printing.header = 
          "MeadCo's ScriptX&b:&p of &P:&bBasic Printing Sample";
       MeadCo.ScriptX.Printing.footer = 
          "The de facto standard for advanced web-based printing";
       MeadCo.ScriptX.Printing.orientation = "landscape";
       $("#btnprint").click(function() { 
            MeadCo.ScriptX.PrintPage(false);
       });
     })      
   });
</script>

Resources

Copyright

Copyright © 2013-2021 Mead & Co Ltd.

License

MeadCoScriptXJS is under MIT license - http://www.opensource.org/licenses/mit-license.php