[email protected] ~/latex/linux/itext/daniel $ cat asm.sh header_start=0 header_len=15 xref_start=$(strings -a -t d $1 | grep -e "\bxref\b" | awk ‘{print $1}‘) trailer_start=$(strings -a -t d $1 | grep -e "\btrailer\b" | awk ‘{print $1}‘) #echo $xref_start #echo $trailer_start xref_len=$(echo "$trailer_start - $xref_start" | bc) #echo $xref_len header_dump=$(echo "$1" | sed -re ‘s/^(.*)\.pdf/asm\_\1\_header\.bin/g‘) dd if=$1 of=$header_dump bs=1 skip=$header_start count=$header_len xref_dump=$(echo "$1" | sed -re ‘s/^(.*)\.pdf/asm\_\1\_xref\.bin/g‘) dd if=$1 of=$xref_dump bs=1 skip=$xref_start count=$xref_len
linux shell assemble PDF文件
时间: 2024-10-15 18:52:33