Apply style to ng2-pdf-viewer document in browser

Discussão em 'Angular' iniciado por Johnny Metz, Fevereiro 27, 2025.

  1. Johnny Metz

    Johnny Metz Guest

    I'm trying to apply some basic styling to my rendered pdf. I'm using ng2-pdf-viewer to show my pdf in the browser:

    <pdf-viewer src="https://vadimdez.github.io/ng2-pdf-viewer/assets/pdf-test.pdf"></pdf-viewer>


    Which generates the following DOM:

    [​IMG]

    I would imagine the following css would do the trick, especially using !important:

    .canvasWrapper {
    margin-top: 5px !important;
    border: 1px solid #ccc !important;
    }

    Continue reading...

Compartilhe esta Página