티스토리 뷰

참고 사이트: https://sites.google.com/site/xyzliwen/resource/embed_font_ieee_pdf_explore


IEEE에서는 논문을 낸 다음에 IEEE PDF eXplore를 통해서 논문 파일에 에러가 없는지 검사를 하고 업로드를 진행하게 된다. 그런데 가끔 아래와 같이 폰트가 없다라고 메세지가 뜨는데...


Font Helvetica is not embedded(117x)


알아보니, MATLAB에서 만든 figure 들이 논문에 포함되어 있을 때, 폰트가 없어서 문제가 발생하게 되는데, 이를 위해서 figure를 새로 만들고 폰트를 바꿔주는 방법이 있겠으나, 위 참고사이트의 분이 친절하게 MATLAB 코드를 사용하여 파일을 만들어주셨다.


코드는 매우 간단한데, 아래와 같다.(m 파일 다운로드 등은 위의 사이트에서 가능)


clear; clc;

D = dir('orig/*.eps');  // orig라는 폴더에서 eps 파일 리스트를 받음.

if(length(D) == 0)

    fprintf('No eps files exists in "./orig"!\n')

    return;

end


mkdir('temp'); 

mkdir('res');

system('copy orig temp');

for d=1:length(D)

    fprintf(1, 'processing %d/%d figure...\n', d, length(D));

    name    = D(d).name(1:end-4);

    str = ['epstopdf ./temp/', D(d).name];  // 먼저 eps 파일을 pdf로 변환함.

    system(str);

    str = ['gswin32 -dSAFER -dNOPLATFONTS -dNOPAUSE -dBATCH -sDEVICE=pdfwrite ', ...

        '-sPAPERSIZE=letter -dCompatibilityLevel=1.4 -dPDFSETTINGS=/printer -dCompatibilityLevel=1.4 ', ...

        '-dMaxSubsetPct=100 -dSubsetFonts=true -dEmbedAllFonts=true -sOutputFile=temp/', name, '_new.pdf -f temp/', name, '.pdf']; // GPL Ghostscript 파일을 실행시켜서 몇 가지 변환을 하는 듯함.

    system(str);

    str = ['pdftops -eps -level2 temp/', name, '_new.pdf res/', name, '.eps']; // 다시 pdf 파일을 eps로 변환함.

    system(str);

end


그래서 결국 epstopdf.exe / pdftops.exe / gswin32.exe 파일이 필요한데, 앞의 두 파일은 위 홈페이지 링크에서 받을 수 있고, gswin32.exe 는 아래 링크에서 받아서 설치할 수 있다.


http://gpl-ghostscript.software.informer.com/9.0/


최종적으로, 다운받은 폴더 안에 저 exe 파일을 아래처럼 집어넣고, 




MATLAB으로 m 파일을 실행시키면, res 폴더에 새로운 eps 파일이 생성된다. Temp 파일에는 폰트가 추가된 pdf 파일도 생성되므로 활용하면 된다.이렇게 새로 얻은 eps 파일을 다시 Latex로 컴파일한 논문을 다시 IEEE PDF eXplore에 올리면 문제 없이 해결.


공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
글 보관함