본문으로 건너뛰기

텍스트를 PDF로

.txt, .log, .csv 파일을 PDF 문서로 조판해요.

기기에서 처리됨

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

이 도구가 하는 일

This sets a plain text file as a PDF, one line of the file to one line of the page. The defaults are those of a code listing rather than a letter - monospace, 10 pt, wrapping on - because almost nobody converts prose this way. People convert a log, a configuration file, a CSV or a source file, usually because something else insists on receiving it as an attachment or a printout.

Reach for it when a text file has to travel as a document: a log going onto a support ticket, a configuration file that has to sit in a change record, a CSV a colleague wants to read rather than open in a spreadsheet, or a source file heading for someone with nothing to open it in.

작동 방식

  1. Drop your .txt, .log, .csv or .md files onto this page. Up to 50 at a time, each up to 50 MB.
  2. Choose the typeface. Monospace is the default and is what keeps the columns of a log or a CSV lined up; sans and serif are there for the rare file that is actually prose.
  3. Set the type size and line spacing. 10 pt is the default; 8 pt fits noticeably more on a sheet and is worth it for a long log.
  4. Decide about long lines. Wrapping folds anything wider than the column so it stays visible; with wrapping off, an over-long line is clipped at the page edge instead, which is the honest rendering of a file whose lines are meant to be lines.
  5. Turn on line numbers if you expect to refer to a particular line, then press Convert.
  6. Each file downloads as its own PDF.

Wrapping is the one option that changes what the document means, which is why it is offered rather than decided for you. A folded long line stays readable but stops being one line, and anyone counting lines or diffing the output against the original will notice. An unwrapped line is truthful about the file and runs off the sheet. Both are right sometimes: wrap a log you want to read, leave it unwrapped for a file where line boundaries carry meaning.

When wrapping is on, the fold is done carefully. Tabs are expanded to four spaces before anything is measured, the continuation is indented to match the leading whitespace of the line it came from, and the break is preferred at a space so a long path or identifier is not cut in half mid-word. The number of characters that fit is worked out from the actual width of a monospace digit at your chosen size, not guessed.

Line numbers are padded to the width of the largest number in the file and followed by two spaces, so they form a straight column and the text stays aligned all the way down. They are drawn as part of the text rather than in a margin, which means they come with you when you copy a line out of the finished PDF. That is what you want when quoting a line to somebody, and not what you want if you are going to paste the listing back into an editor.

The file is decoded as UTF-8, and a byte-order mark at the start is stripped - a BOM is a mark, not a character, and left in place it renders as an invisible-width glyph at the top of the first page in some viewers. Bytes that are not valid UTF-8 become the replacement character rather than aborting the conversion, so a file saved in an older Windows or Japanese encoding will convert but will show damage where the accented characters were. Windows, Unix and classic Mac line endings are all recognised as breaks.

The embedded font is Noto Sans Mono or Noto Sans, subsetted to the characters your file actually uses, which is what keeps a converted log at tens of kilobytes rather than megabytes. It does not cover Chinese, Japanese, Korean, Arabic or Indic scripts. Turning embedding off falls back to Courier, Helvetica and Times, which are WinAnsi only, and there a replacement character comes out as a question mark.

이 도구가 할 수 없는 일

  • Chinese, Japanese, Korean, Arabic and Indic scripts are outside the embedded font's coverage, because the faces that would cover them are tens of megabytes each.

자주 묻는 질문

페이지보다 긴 줄은 어떻게 되나요?
줄 접기를 켜면 다음 줄로 접히는데, 원래 줄이 시작한 위치에 맞춰 들여쓰고 공백이 있으면 그 자리에서 끊어요. 끄면 페이지 가장자리에서 잘리기 때문에 파일의 한 줄이 페이지의 한 줄로 남고, 아주 긴 줄의 끝부분은 아예 보이지 않아요. 줄의 경계가 중요하면 끄고, 읽기 편한 쪽이 중요하면 켜세요.
왜 고정폭 글꼴이 기본인가요?
열을 나란히 유지하는 글꼴은 고정폭뿐이고, 여기서 변환하는 것 대부분이 열로 이뤄져 있기 때문이에요. 왼쪽에 시각이 붙은 로그, CSV, 설정 파일, 들여쓴 소스 코드 같은 것들이요. 가변폭 글꼴에서는 몇 줄만 지나도 그 열이 어긋나요. 정말 산문인 파일을 위해 산세리프와 세리프도 준비돼 있어요.
악센트가 붙은 글자가 이상한 기호로 나왔어요. 왜 그런가요?
파일을 UTF-8로 디코딩하기 때문이에요. Windows-1252 같은 예전의 1바이트 인코딩이나 일본어 인코딩으로 저장했다면 악센트 글자의 바이트가 올바른 UTF-8이 아니라서, 짐작하지 않고 대체 문자로 바꿔요. 편집기에서 UTF-8로 다시 저장한 뒤 변환하세요. 바이트 순서 표시가 있다면 자동으로 떼어내요.
파일 여러 개를 한 번에 변환할 수 있나요?
네, 한 번에 최대 50개까지 되고 각각 원본 파일 이름을 딴 별도의 PDF가 돼요. 페이지 설정과 글자 크기, 줄 접기, 줄 번호 설정은 전부에 똑같이 적용되기 때문에 로그가 든 폴더 하나가 일관된 모습으로 나와요. 파일 이름 칸은 파일 하나를 변환할 때만 쓰여요.
제 파일이 업로드되나요?
아니요. 바이트는 브라우저 안의 웹 워커에서 디코딩되고 배치되며, PDF도 거기서 만들어져요. 이 페이지가 보내는 요청은 이 사이트 자체 출처의 Noto 글꼴을 가져오는 것뿐이고, 그것도 유니코드 글꼴 삽입을 켰을 때만이에요. 말만 믿기보다 확인하고 싶다면 브라우저의 네트워크 탭을 열고 무언가를 변환해 보세요.

관련 도구