%EB%A1%9C%20%EB%B0%B0%EA%B2%BD%20%EC%9D%B4%EB%AF%B8%EC%A7%80%20%EB%8D%AE%EC%96%B4%EC%93%B0%EA%B8%B0(%EB%B0%B0%EA%B2%BD%20%ED%8C%A8%ED%82%A4%EC%A7%80%20%EC%82%AC%EC%9A%A9).png)
PDF를 선명하게 보고 싶습니다. pdfpages 패키지를 사용하여 PDF로 배경 이미지(jpg 파일)를 덮어쓰는 방법이 있습니까? 아니면 PDF에 불투명도를 별도로 사용하는 방법이 있나요?
\documentclass{book}
\usepackage{graphicx}
\usepackage[paperwidth=11.7in, paperheight=8.3in]{geometry}
\usepackage{background}
\usepackage{pdfpages}
\backgroundsetup{
position={5.4125in,-3.5in},
scale=.9,
angle=-.5,
opacity=0.2,
contents={\includegraphics{ImageName}}
}
\begin{document}
\includepdf[pages=-]{filename}
\end{document}
답변1
이것은 당신에게 도움이 될 것입니다. 요구 사항에 따라 개선할 수 있도록 의견에 추가 쿼리를 추가하십시오.
\documentclass{article}
\usepackage[paperwidth=11.7in, paperheight=8.3in]{geometry}
\usepackage[pages=some]{background}
\usepackage{pdfpages}
\backgroundsetup{
scale=0.9,
opacity=0.2,
angle=-.5,
position={5.4125in,-3.5in},
contents={%
\includegraphics[width=\paperwidth,height=\paperheight]{Small-mario.png}
}%
}
\begin{document}
\BgThispage
\includepdf[pages=-]{Test2}
\clearpage
\end{document}
답변2
패키지 는 특히 명령을 background
기반으로 구축되고 tikz
구축 pdfpages
되므로 이 작업을 수행할 수 있습니다.graphicx
\includegraphics
환경에서는 환경 tikzpicture
을 사용하여 배경 레이어에 이미지를 배치합니다 pgfonlayer
. PDF는 코드에서 명시적으로 작성할 필요 없이 기본 레이어에 배치하여 배경 이미지 위에 놓을 수 있습니다. 상단에 놓인 PDF의 가시성에 영향을 주지 않고 배경 이미지의 불투명도를 원하는 대로 설정할 수 있습니다. 이는 opacity=0.9
, opacity=0.5
및 가 포함된 세 가지 배경 이미지에 대해 설명됩니다 opacity=0.1
.
\documentclass[a4paper,10pt]{article}
\usepackage[showframe,margin=2.5cm]{geometry}
\usepackage{graphicx}
\usepackage{MWE} % for example-image-a.png and example-image-a4.pdf
\usepackage{tikzpagenodes} % for (current page text area.north)
\usetikzlibrary{backgrounds} % for {pgfonlayer}{background}
\pgfdeclarelayer{background} % add the background layer
\pgfsetlayers{background,main} % specify the order of the layers
\begin{document}
\begin{tikzpicture}[remember picture, overlay]
% Put images in the background
\begin{pgfonlayer}{background}
\node[opacity=0.9,anchor=north] (A) at (current page text area.north) {\includegraphics[scale=0.5]{example-image-a}};
\node[opacity=0.5,below=3cm] (B) at (A.south) {\includegraphics[scale=0.5]{example-image-a}};
\node[opacity=0.1,below=3cm] (C) at (B.south) {\includegraphics[scale=0.5]{example-image-a}};
\end{pgfonlayer}
% Put an image in the main layer
\node at (current page text area.center) {\includegraphics{example-image-a4}};
\end{tikzpicture}
\end{document}