我正在使用 Blurb 发布手稿,他们需要 PDF/X-3:2002 格式的 pdf。如何让 pdfLaTeX 输出符合该规范的 pdf?我使用的是 MiKTeX 2.9。
答案1
答案2
我一直在努力blurb.comPDF/X-3:2002 要求及其无用的自动检查功能并未告诉您文件未通过预检测试的原因...
下面这个最小示例完全通过了 blurb.com 的测试。我使用 进行编译lualatex
。如果要使用pdflatex
,则必须在不使用 的情况下设置字体fontspec
。
\documentclass[10pt,twoside]{memoir}
\usepackage{fontspec}
\setmainfont[Ligatures=TeX]{TeX Gyre Pagella}
\usepackage[cmyk]{xcolor}
%% On the front page, blurb.com displays rounded values of the page sizes. For example, it would say that pocket size is 5x8 in. However, during the upload process it will display accurate values
%% blurb.com pocket size:
%% 5.125 x 8.25 in
%% 369 x 594 pts
%% Use inches! Using pt somehow produces a pdf that blurb.com recognizes as different size.
\usepackage{geometry}
\geometry{
paperwidth=5.125in,
paperheight=8.25in,
inner=15mm
}
%% http://tex.stackexchange.com/a/248911/831
\makeatletter
\edef\pwpt{\strip@pt\dimexpr0.996264009963\paperwidth\relax} %paper width in PS points
\edef\phpt{\strip@pt\dimexpr0.996264009963\paperheight\relax} %paper height in PS points
\makeatother
%% microtype, for better justification, etc.
\usepackage{microtype}
\microtypesetup{
% babel=true,
final
}
\usepackage{lipsum}
%% PDF/X-3:2002 info
%% Replace the title, author, etc. information accordingly to your book.
%% The \pageattr values have to be in pt, compare with the page size settings above.
\pdfobjcompresslevel=0%
\pdfminorversion=3%
\pdfinfo{
/Title (My Book Title)
/Author (Mr Author)
/Subject (biography)
/Keywords (humans)
/GTS_PDFXVersion (PDF/X-3:2002)
}%
\pdfcatalog{
/PageMode /UseNone
/OutputIntents [ <<
/Info (none)
/Type /OutputIntent
/S /GTS_PDFX
/OutputConditionIdentifier (Blurb.com)
/RegistryName (http://www.color.org/)
>> ]
}%
\begin{document}
\chapter{Lorem Ipsum}
\lipsum[1-150]
% an extra page to make it an even number
\newpage\mbox{}
\edef\mypdfpageattr{
/MediaBox [0 0 \pwpt\space\phpt]^^J
/BleedBox [0.00000 0.00000 \pwpt\space\phpt]^^J
/CropBox [0 0 \pwpt\space\phpt]^^J
/TrimBox [0.00000 0.00000 \pwpt\space\phpt]
}
\expandafter\pdfpageattr\expandafter{\mypdfpageattr}
\end{document}
答案3
答案4
我最近在这个网站上发布了一个新包“xcomply”的链接(搜索它)。它可能对你有用。提供的选项之一是 PDF/X-3:2002。