Skip to content

Commit

Permalink
feat: load textlayer.css file into pdf.css
Browse files Browse the repository at this point in the history
  • Loading branch information
allroundexperts committed Jun 19, 2023
1 parent 9346adf commit a70211c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions assets/css/pdf.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@import './AnnotationLayer.css';
@import './TextLayer.css';

.react-pdf__Page {
direction: ltr;
Expand Down
1 change: 1 addition & 0 deletions config/webpack/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ const webpackConfig = ({envFile = '.env', platform = 'web'}) => ({
{from: 'assets/css', to: 'css'},
{from: 'assets/fonts/web', to: 'fonts'},
{from: 'node_modules/react-pdf/dist/esm/Page/AnnotationLayer.css', to: 'css/AnnotationLayer.css'},
{from: 'node_modules/react-pdf/dist/esm/Page/TextLayer.css', to: 'css/TextLayer.css'},
{from: 'assets/images/shadow.png', to: 'images/shadow.png'},
{from: '.well-known/apple-app-site-association', to: '.well-known/apple-app-site-association', toType: 'file'},
{from: '.well-known/assetlinks.json', to: '.well-known/assetlinks.json'},
Expand Down
2 changes: 0 additions & 2 deletions src/components/PDFView/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ import React, {Component} from 'react';
import {View, Dimensions} from 'react-native';
import {Document, Page, pdfjs} from 'react-pdf/dist/esm/entry.webpack';
import pdfWorkerSource from 'pdfjs-dist/legacy/build/pdf.worker';
import 'react-pdf/dist/esm/Page/AnnotationLayer.css';
import 'react-pdf/dist/esm/Page/TextLayer.css';
import FullScreenLoadingIndicator from '../FullscreenLoadingIndicator';
import styles from '../../styles/styles';
import variables from '../../styles/variables';
Expand Down

0 comments on commit a70211c

Please sign in to comment.