latex如何对.pdf格式的图片实现裁剪

目录

问题描述:

问题解决:


问题描述:

在使用draw.io进行绘图,导出的时候不知道为什么周围会有留白,比如下图:

在导入latex的时候,会因为两侧的留白导致整张图片缩小。 如果直接进行裁剪.pdf,可能需要开通会员

问题解决:

不得不感慨latex的强大,可以直接使用命令进行裁剪。

下面是原始的命令:

python 复制代码
\centering
\includegraphics[width=1\textwidth]{figures/learning.pdf}
\caption{An overview of our dual-channel model framework.}
\label{fig:framework}
\end{figure*}

裁剪的命令:

python 复制代码
\begin{figure*}[t]
\centering
\includegraphics[width=1\textwidth, trim=1cm 0cm 1cm 0cm, clip]{figures/learning.pdf} 
%  left, botton, right,top
\caption{An overview of our dual-channel model framework.}
\label{fig:framework}
\end{figure*}

注意在裁剪的时候,不建议把width=1\textwidth,这个去掉,这个去掉可能会影响图片的居中摆放效果,可能会出现左倾或者右斜。

即下面的方式不可取!!!

python 复制代码
\begin{figure*}[t]
\centering
\includegraphics[trim=1cm 0cm 1cm 0cm, clip]{figures/learning.pdf} 
%  left, botton, right,top
\caption{An overview of our dual-channel model framework.}
\label{fig:framework}
\end{figure*}
相关推荐
爱码猿1 天前
Springboot结合thymeleaf模板生成pdf文件
spring boot·后端·pdf
南风微微吹1 天前
2025年12月英语四级真题及答案解析完整版(第一、二、三套全PDF)
pdf·英语四级真题
我叫汪枫1 天前
Python 实战:把 PDF 表格完整转换成 Excel(小白教程)
python·pdf·excel
海上Bruce1 天前
长图PDF转多页PDF文件
pdf
南风微微吹1 天前
2025年12月英语六级真题及答案解析完整版(第一、二、三套全PDF)
pdf·英语六级
奋斗的袍子0071 天前
Spring Boot 项目实现Word转PDF
spring boot·pdf·word
开开心心_Every2 天前
强制打字练习工具:打够百字才可退出
java·游戏·微信·eclipse·pdf·excel·语音识别
开开心心_Every2 天前
多端免费远程控制工具:4K流畅同账号直连
游戏·macos·微信·pdf·excel·语音识别·phpstorm
心语星光2 天前
用LibreOffice实现批量将pptx文件转换为pdf文件
开发语言·pdf·ppt
夏日白云2 天前
《PDF解析工程实录》第 17 章|内容流里“看得见却看不见”的字符:那些幽灵文字从哪来?
pdf·llm·大语言模型·rag·文档解析