How to set PDF format to PDF/X-1a:2001 when using pdflatex?
By Tri Nguyen onIntro
Last week I ordered a print copy of the ebook “Machine Learning Cơ Bản” of tiepvupsu https://github.com/tiepvupsu/ebookMLCB. I thought it should be simple because I already had a PDF copy. It just needs to be printed. However, the printing house has asked me for a PDF format of PDF/X-1a:2001. In this article, I will show you how to compile a PDF/X-1a:2001 file from a .tex file. The generated PDF file will have no bookmark, no image transparency.
Steps
- Check out the code from GIT repository.
- Locate book_ML.tex. Open it.
- Find documentclass, add the following line before it. The line will set PDF version to 3 (or PDF 13)
\pdfminorversion=3
- Find begin{document}, add the following line before it. The line will set the format to PDF/X-1a:2001.
\usepackage[x-1a1]{pdfx}
- Install mactex. It will take a while to get through the installation.
brew install mactex
- Run pdflatex (1st time) to build the content of the PDF file.
pdflatex book_ML.tex
- After running the command, you will receive some newly generated files
- book_ML.log
- book_ML.pdf
- book_ML.toc
- book_ML.idx
- book_ML.aux
- Open book_ML.pdf, you’ll see there are about 398 pages. Bibliography and Index are still missing.
- Run bibtex to create the bibliography.
bibtex book_ML
- After running the command, some new files will be generated
- book_ML.blg
- book_ML.bbl
- Run pdflatex (2nd time) to build the bibliography.
pdflatex book_ML.tex
-
After running the command, open book_ML.pdf. The bibliography will be generated and appended to the end of the file but the anchors/refs (in front of each ref) are still missing.
-
Run pdflatex (3rd time) to build the bibliography references.
pdflatex book_ML.tex
- After running the command, open book_ML.pdf. The bibliography is now compiled with correct references.
- Run makeindex to create the printindex.
makeindex book_ML.idx
- After running the command, some new files will be generated
- book_ML.ilg
- book_ML.ind
- Run pdflatex (4th time) to build the printindex.
pdflatex book_ML.tex
- After running the command, open book_ML.pdf. The file is now fully generated with the format PDF/X-1a:2001.
- You can check the conformance with Adobe PDF Reader.
- To clear all problems with embedded fonts, I have to execute these commands against the newly created book_ML.pdf.
pdf2ps book_ML.pdf
ps2pdf13 -dPDFSETTINGS=/prepress book_ML.ps book_ML_2.pdf
Comments
If you have any question, you can start a new discussion.