Giter Site home page Giter Site logo

ngprint's People

Contributors

alimalik91 avatar gilf avatar mbmihura avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ngprint's Issues

Print Section Not Clearing After Print

I'm testing in Chrome. If I print or cancel the print window, window.onafterprint is never called.
I suggest modifying the code with some of these tips:
http://stackoverflow.com/questions/13598790/onbeforeprint-and-onafterprint-is-not-working-in-chrome-and-ie
Or here:
https://www.tjvantoll.com/2012/06/15/detecting-print-requests-with-javascript/

This can actually be solved easily by just clearing the innerHTML just before getting the element by id on line 18.

Bower version tag missing

Please could you add a Bower version tag to this repository so that we can specify it by version in our project's bower.json? There are currently no versions available :(

Directive printing all the page

I'm trying to use this directive but its printing all the entire page, even when I set an specific id. How to print only an specific div?

Printing Object Twice

Just installed your directive and while I am getting a print view, the div that it's supposed to print is being included twice (in a direct stack on top of each other).

Prints the whole document and not the just the print section

The code appends the printSection to the whole document Dom and hence it prints the whole document, just not the div section.
`
var printSection = document.getElementById('printSection');

    // if there is no printing section, create one
    if (!printSection) {
        printSection = document.createElement('div');
        printSection.id = 'printSection';
        document.body.appendChild(printSection);
    }

`

Element-id attribute doesn't work.

Hi,
i am using ngPrint directive in my case print-element-id="id-of-element" doesn't works.
its print whole view instead of element view.

Main content not loading after adding ngPrint as a dependency.

Hi

After loading the necessary .js and .css files, I added the dependency to the controller but the main content besides the bootstrap header does not load and shows no errors on the browser console when hitting the print button. Any idea why this might be?

I am using Angular 1.4.8 and all my code in the the form of
angular.module('clients', ['ngPrint']).etc..etc..

instead of var clientes = angular.module('clientes', ['ngPrint']).etc..

as instructed in your code. I although I have hundreds of instructions though.
Shouldn't it work the same way?

Thank you

ngDialog + ngPrint

Is there any example how to use ngPrint with ngDialog?
I have a weird behaviour. I open a dialog which exceeds the window size (have to scoll for full content) and implemented ngPrint
i attached an report and the screenshot where i click on the print button, to see, the first page is complete nonsense and i see the background where the dialog was opened?
As you see i refer to the correct div, which should be printed.

screen shot 2018-01-25 at 20 32 07

`




ngprint.pdf

Comparison Report

<span class="border border-primary"></span>
<div>
    <b>API:</b> {{selectedApi.name}}</br>
    <b>Version:</b> {{selectedVersion.number}}</br>
    <b>Revision:</b> {{selectedFile.timestamp}}</br>
</div>
<b><p class="p-3 mb-2 bg-primary text-white text-center">COMPARED TO</p></b>
<div>
    <b>API:</b> {{comparedTo(selectedComparisonReport).api}}</br>
    <b>Version:</b> {{comparedTo(selectedComparisonReport).version}}</br>
    <b>Revision:</b> {{comparedTo(selectedComparisonReport).revision}}</br>
</div>
</br>
<h2>Change Log:</h2>
<div>
    <h3 class="newEndpoints">New Endpoints: {{selectedComparisonReport.paths.new.length}}</h3>
    <h3 class="removedEndpoints">Removed Endpoints: {{selectedComparisonReport.paths.removed.length}}</h3>
    <h3 class="changedEndpoints">Changed Endpoints: {{selectedComparisonReport.paths.changed.length}}</h3>
</div>
</br>
<h2>Changes:</h2>
<div class="p-3 mb-2 bg-success text-dark"><b>What's new</b></div>
<ul>
    <div ng-repeat=" new in selectedComparisonReport.paths.new">
        <li><b>{{new.endpoint}}</b> // {{new.description}}</li>
    </div>
</ul>

<div class="p-3 mb-2 bg-danger text-dark"><h3><b>What's removed</b></h3></div>
<ul>
    <div ng-repeat=" removed in selectedComparisonReport.paths.removed">
        <li><b>{{removed.endpoint}}</b> // {{removed.description}}</li>
    </div>
</ul>

<div class="p-3 mb-2 bg-warning text-dark"><h3><b>What's changed</b></h3></div>
<div>
    <ul>
        <div ng-repeat="changed in selectedComparisonReport.paths.changed">
            <br>
            <li><b>{{changed.endpoint}}</b> // {{changed.description}}</li>
            <ul>
                <div ng-if = "changed.parameter != null">
                    <p class="text-info">Parameter</p>
                    <ul>
                        <div ng-repeat="parameter in changed.parameter">
                            <li><b>{{parameter.change}}</b> // {{parameter.description}}</li>
                        </div>
                    </ul>
                </div>
                <div ng-if = "changed.returntype != null">
                    <p class="text-info">Return Type</p>
                    <ul>
                        <div ng-repeat="returntype in changed.returntype">
                            <li><b>{{returntype.change}}</b> // {{returntype.description}}</li>
                        </div>
                    </ul>
                </div>
            </ul>
            <br>
            -------------------------------------------------------------------
        </div>
    </ul>
</div>
`

styling

Hi. My page is displaying as like this please help me
untitled

Print CSS Not Being Rendered

Print CSS is not being rendered. No matter what I do, whether using tables or divs my entire print layout is jumbled. I have added "medial='all'" to all my stylesheets and even used media queries but still... and yes I have included your css.

print bootstrap modal view only

Hello, i tried to only print bootstrap modal view, but it prints the whole site.
Is it possible to just print the modal view without the rest of the page ?

AngulaJS view with ngDialog

This is great directive. I am able to print the ngDialog however, it misses other styles. I need to print this with bootstrap and other css files that we are using in application.

Any ideal on how to integrate other style sheets with this directive?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.