본문으로 건너뛰기

PDF 무해화

자바스크립트와 포함된 파일, 열 때 실행되는 동작을 제거해요.

기기에서 처리됨

이 도구는 브라우저 안에서만 실행돼요. 파일은 절대 업로드되지 않으며, 브라우저의 네트워크 탭에서 직접 확인할 수 있어요. 직접 확인해 보세요. 브라우저의 네트워크 탭을 열어 두고 지켜보면, 남은 작업이 있는지 묻는 작은 요청 하나만 보여요. 도구 이름과 해시뿐이고, 파일은 절대 포함되지 않아요.

이 도구가 하는 일

A PDF is not a static document. It can carry JavaScript, run an action the moment it is opened, hold other files inside itself, and send a reader out to a URL. Those features have legitimate uses, and they are also why PDFs are a common malware carrier. This tool rebuilds the document from its pages alone, which leaves every document-level hook behind.

Use it on anything that arrived unexpectedly and has to be read anyway: an invoice from an address you do not recognise, a CV from a job board, a form downloaded from a site you have no reason to trust. It is also worth running on files you distribute, so nobody has to wonder whether the attachment inside yours is meant to be there.

작동 방식

  1. Drop the PDF onto this page.
  2. Leave the three main switches on. JavaScript, embedded files and open actions are all served by one rebuild, and together they cover nearly everything active a PDF can carry.
  3. Turn on Remove external links if the file came from a source you do not trust, since a link is a phishing vector even when nothing else in the file is.
  4. Turn on Strip metadata under advanced options if you also want the author and timestamps gone.
  5. Press Sanitize. The result reports the page count and how many embedded files were removed.

The removal works by not copying rather than by deleting. The document is rebuilt into an empty file with only its pages carried over, so document-level JavaScript, the name tree of embedded files, the action that fires on open and the rest are never brought across at all. That is more reliable than hunting through a file for each hook: you cannot forget to remove something you never copied.

Because it is one rebuild, the first three switches are effectively one decision. Turning any of them on rebuilds the document, and the rebuild leaves all of them behind. They are separate controls because they name separate worries, not because you can keep the JavaScript and lose the attachments.

The rebuild is thorough enough to cost you things you may want. Document-level structure is exactly what is discarded, so the interactive form dictionary, the outline and anything else attached to the document rather than to a page does not survive. A fillable form comes out as pages that look right and no longer fill in. That is why you should sanitise files you receive rather than files you are still working on.

A file attached as a page annotation is not in the name tree, so the rebuild alone would leave it in place. Attachments are counted before the rebuild and removed by name afterwards, which catches both kinds. The number in the result is what was actually found, so a report of zero embedded files is information rather than a shrug.

This runs entirely in your browser on qpdf compiled to WebAssembly. For a file you already suspect, that is the right shape: the document is never handed to a third party, and it is never opened by a full PDF reader with scripting enabled - qpdf parses the structure without executing anything in it.

이 도구가 할 수 없는 일

  • This is not antivirus software. It removes the categories of active content a PDF can hold; it does not scan for or identify malware, and it cannot tell you whether a file was hostile.
  • The rebuild discards document-level structure, so a fillable form stops being fillable and the outline is not carried over.

자주 묻는 질문

PDF에서 능동적 콘텐츠란 무엇인가요?
뷰어가 자동으로 실행할 수 있는 문서 단위 자바스크립트, 파일을 여는 순간 발동하는 OpenAction과 페이지 이동이나 양식 이벤트에 걸린 같은 종류의 트리거, PDF 안에 포함된 파일, 그리고 URL로 나가는 링크나 동작이 여기에 해당해요. 모두 정당한 기능이지만, 동시에 PDF가 무언가를 실어 나르는 수단으로 쓰일 때의 표준 통로이기도 해요.
이걸로 PDF에서 바이러스가 제거되나요?
바이러스를 담고 실행할 수 있는 부분을 없애는 것이지, 악성코드를 검사하는 것과는 다르고 그렇게 여겨서도 안 돼요. 파일이 악의적이라고 볼 진짜 이유가 있다면 열지 말고, 백신 프로그램을 쓰거나 믿을 수 있는 경로로 보낸 사람에게 확인하세요. 무해화는 문서가 할 수 있는 일을 줄일 뿐, 문서에 대한 판정이 아니에요.
그 뒤에 무엇이 작동하지 않을 수 있나요?
페이지가 아니라 문서에 기대는 것들이에요. 입력형 양식은 입력을 받지 않게 되고, 책갈피 목차는 넘어오지 않으며, 포함된 첨부 파일은 사라지고, 자바스크립트로 합계를 계산하던 양식은 마지막으로 저장된 값만 보여줘요. 페이지 내용과 텍스트, 이미지는 그대로예요.
외부 링크도 지우는 게 좋을까요?
대부분의 문서에서 링크는 필요한 것이고, 직접 읽는 보고서에서 링크를 걷어내면 성가시기 때문에 기본값은 꺼짐이에요. 믿지 못할 출처에서 온 파일이라면 켜세요. 익숙한 은행처럼 보이면서 다른 곳을 가리키는 링크는 가장 오래된 수법이고, 링크를 전부 지우는 건 투박하지만 확실한 답이에요.
의심스러운 파일이 어딘가로 업로드되나요?
아니요. qpdf가 브라우저 안 웹 워커에서 WebAssembly로 실행되면서, 파일 안의 무엇도 실행하지 않고 구조만 해석해요. 이미 믿지 못하는 파일이 서버에 닿는 일도, 가는 길에 스크립트를 실행하는 뷰어에 넘겨지는 일도 없어요.

관련 도구