Is there a way to open few pdf files in the same window?

Which product are you using?
PDF.js Express Plus

Detailed description of issue
I have a list of pdfs, as soon as I click on link I open reader, so I wonder if there’s a chance to open few files in one window. Here’s my code:

Code snippet
List of pdfs:
import * as React from “react”;
import { generatePath } from “utils”;
import { routes } from “configs”;
import { Link } from “components”;

const EBook: React.FC = () => {
const booksList = [
{
title: “Book 1”,
file: “/files/travel-questions.pdf”,
},
{
title: “Book 2”,
file: “/files/childhood-questions.pdf”,
},
{
title: “Book 3”,
file: “/files/fam.pdf”,
},
];
return (


{booksList.map((v: any) => {
return (
<>
<Link
to={generatePath(routes.eBook, {
path: v.file,
})}
target=“_blank”
style={{ display: “block”, margin: “20px” }}
>
{v.title}

</>
);
})}

);
};

export default EBook;

Viewer:
import * as React from “react”;
import WebViewer from “@pdftron/pdfjs-express”;
import { useParams } from “hooks”;
import styles from “./FileReader.module.css”;

const FileReader: React.FC = () => {
const viewer = React.useRef(null);
const { path } = useParams<{ path: string }>();
const instance = React.useRef();

React.useEffect(() => {
WebViewer(
{
path: “/webviewer”,
initialDoc: decodeURIComponent(path),
},
viewer.current
).then((inst: any) => {
inst.UI.enableElements([“downloadButton”]);
instance.current = inst;
});
}, );
React.useEffect(() => {
if (instance.current) {
(instance.current as any).loadDocument(decodeURIComponent(path));
}
}, [path])
return (




);
};

export default FileReader;

Hello sergeylobsterr,

You can open multiple files using the MultiTab feature introduced in v8.4.
Does this work for you?

Best regards
Tyler Gordon
Web Development Support Engineer
PDFTron