LaTeX对插入pdf页进行编辑

\documentclass[a4paper,12pt]{book}
\usepackage{mdframed}
\usepackage{pdfpages}
\usepackage[left=0cm,right=0cm,top=0cm,bottom=0cm]{geometry}
\setlength\parindent{0pt}
\definecolor{Green}{rgb}{0.465,0.725,0}
\pagestyle{empty}
\begin{document}
\vbox{\includepdfmerge{hello.pdf,1}}%
\setlength{\unitlength}{1mm}%
\vfill
\begin{picture}(200,200)(0,0)%
\put(100,100){\fcolorbox{Green}{Green}{\textcolor{black}{hello}}}%
\end{picture}%
\end{document}

这个是我在StackExchange里问到的,对方给了如下回复

This MWE sets the page geometry and removes \parindent to get enough space for a A4 page to be included from the external pdf file. Also \pagestyle is set to empty to prevent typesetting of the page number. Command \includepdfmerge from the pdfpages package extracts the first page from hello.pdf (any A4 pdf file, not included in the MWE) and puts if into a vertical box by \vbox command. \unitlength defines the coordinate units (mm) to be used by the picture environment (default is 1pt). \vfill pushes the following picture to the bottom of the page, to be able to use the bottom left corner of the page as a reference point (0,0). The picture environment reserves space (200x200) for the picture drawing area and applies the command from the question to put a text box on a green background at the location (100,100) on top of the included pdf page.


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值