I can insert pdf pages with the pdfpages. There are options to select pages ...
But I found nothing to select specific layers. Is there a possibility?
Details
PDF to be included
The following code creates a document with layers:
\documentclass[english,ngerman,latin]{scrartcl}
\usepackage{babel}
\usepackage{blindtext}
\usepackage{ocgx2}
%%%%%%%%%%%%%%%
\begin{document}
\section{Main}
\blindtext
%Parameter: {ocg}{name}{id}{visibility}
\begin{ocg}{German}{german}{1}
\section{German}
\selectlanguage{ngerman}\blindtext
\end{ocg}
\begin{ocg}{English}{english}{1}
\section{English}
\selectlanguage{english}\blindtext
\end{ocg}
\section{Main - continue}
\ldots
\end{document}
In the viewer I can select, if I see the German/English layer.
File with pdfpages
Now I want to include my test document in another pdf.
It works with \includepdf{test_ocg_article} but I found no possibility to include it with invisible German text.
\documentclass{scrartcl}
\usepackage{pdfpages}
\begin{document}
\includepdf{test_ocg_article}%Works fine, everything is shown
%Option to exclude a layer does not exist:
% \includepdf[layer=german]{test_ocg_article}
% \includepdf[invisible=german]{test_ocg_article}
\end{document}
Remarks
- The pdf I want to include is not created with LaTeX. I'm looking for a solution for any pdf with layers.
- I don't expect to get the layers in my main document. See Include PDF with OCGs for this topic.
- I want to include the pdf multiple times. Everytimes with different layer visibilies. So it does not help, to set selected layers as invisible (I would need a pdf-file for each variant of layer settings).
