代码改变世界

A3转A4笔记

2023-05-13 11:48  狼人:-)  阅读(17)  评论(0编辑  收藏  举报

先将PDF中所有图片导出来,然后转到HTML中,再用JS调高宽和边距

关键代码:

<script>
$('img').each(function(i){
    $(this).css('height','1750px');
    $(this).css('margin-top','-80px');
    var index = (i+1)%4;
    if (index == 1) {
        $(this).css('margin-left','-150px');
    } else if (index == 2) {
        $(this).css('margin-left','-1350px');
    } else if (index == 3) {
        $(this).css('margin-left','-70px');
    } else {
        $(this).css('margin-left','-1200px');
    }
});
</script>

再打开HTML文件打印