Skip to content

Looking to center the PDF in the PDF viewer #1468

Answered by stephanrauh
wjmack asked this question in Q&A
Discussion options

You must be logged in to vote

They're only left-aligned in single-page mode. This is a bug, but I'm not sure I want to fix it because it'd break compatibility. Maybe you're right, I should add an attribute. In the meantime, you can use a global CSS rule in your styles.css to fix the bug:

ngx-extended-pdf-viewer .pdfViewer.singlePageView .page {
  margin-right: auto;
  margin-left: auto;

Maybe you'll have to add !important, but I don't think so.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@wjmack
Comment options

Answer selected by wjmack
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
Solved user support You've got a question, or a misconfiguration, or simply need a hint how to get things up and running
2 participants