WordPress.org

Ready to get started?Download WordPress

Forums

Print-O-Matic
[resolved] Printing External HTML and Using External CSS (4 posts)

  1. kingcodefish
    Member
    Posted 8 months ago #

    We are using your Print-O-Matic plugin and it is great! I have some suggestions on what it can print and how. I would like to print an external html or image through a url in the shortcode. Just so you understand, here are two examples for what we would use it for:

    1. We have a crossword on our website that a piece of software makes for us. From the program we also have exported a print-ready html file. We would like your plugin to link to our html file and show a preview of it through a pop-up, allowing the user to print it.

    2. We have an Adobe Illustrator image that we would like to print. We would like to use your plugin to link to our image and show a preview of it through a pop-up, allowing the user to print it.

    I have been able to create some of this functionality via JavaScript but would like it to be in this plugin. Here is the code for the first example:

    <script type="text/javascript">
       function print() {
         window.open('http://yoursite.com/yourfile.html', 'name', 'width=800, height=1000');
       }
    </script>

    And then I call it like this:
    <a href="javascript:print()">Print Me</a>

    I am also thinking that the plugin should allow for an external css that has been created separately. Allowing the user to link to it through the shortcode for that specific print. This would allow the user to have multiple prints on their site with different styling for each one rather than one universal css.

    Can these ideas be done in the plugin?

    http://wordpress.org/plugins/print-o-matic/

  2. Baden
    Member
    Plugin Author

    Posted 8 months ago #

    Hello,

    We have just updated the Print-Pro-Matic to include two new attributes that address both of these issues.

    Print-Pro-Matic v0.2 includes the following new attributes
    url attribute allows printing content from an external url
    new css_url attribute allows linking an external css file to the print page

    We will be setting up some examples in the documentation in the next hour.

  3. kingcodefish
    Member
    Posted 8 months ago #

    Will this ever be included in Print-O-Matic or just in the Pro version?

  4. Baden
    Member
    Plugin Author

    Posted 7 months ago #

    Pro only. But since it was your feedback and code snippet that inspired this feature, send us a line at info [at] twinpictures [dot] de along with a link to this thread and we'll hook you up.

Reply

You must log in to post.

About this Plugin

About this Topic