Skip to content

Commit

Permalink
Fix #10692 print bug when trying to print (#10706)
Browse files Browse the repository at this point in the history
  • Loading branch information
MV88 authored Dec 6, 2024
1 parent 80b7ceb commit 9e07128
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
8 changes: 7 additions & 1 deletion web/client/components/print/PrintPreview.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,15 @@ import React from 'react';
import PropTypes from 'prop-types';

import { Glyphicon } from 'react-bootstrap';
import { Document, Page } from 'react-pdf';
import { pdfjs, Document, Page } from 'react-pdf';
import Button from '../misc/Button';
import 'react-pdf/dist/Page/TextLayer.css';
import 'react-pdf/dist/Page/AnnotationLayer.css';

pdfjs.GlobalWorkerOptions.workerSrc = new URL(
'pdfjs-dist/build/pdf.worker.min.js',
import.meta.url
).toString();

class PrintPreview extends React.Component {
static propTypes = {
Expand Down
3 changes: 3 additions & 0 deletions web/client/themes/default/less/print.less
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@
border-width: 1px;
border-style: solid;
}
.react-pdf__Page {
background-color: unset !important;
}
#print_preview {
.ol-rotate {
background-color: transparent;
Expand Down

0 comments on commit 9e07128

Please sign in to comment.