mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-05 14:47:15 +08:00
45 lines
2.0 KiB
Diff
45 lines
2.0 KiB
Diff
--- luatex-beta-0.50.0/source/texk/web2c/luatexdir/image/pdftoepdf.cc.orig 2009-12-24 19:50:48.000000000 +0100
|
|
+++ luatex-beta-0.50.0/source/texk/web2c/luatexdir/image/pdftoepdf.cc 2010-01-14 08:53:58.086685489 +0100
|
|
@@ -560,7 +560,12 @@
|
|
int rotate;
|
|
char *checksum;
|
|
PDFRectangle *pagebox;
|
|
+#ifdef POPPLER_VERSION
|
|
+ int pdf_major_version_found, pdf_minor_version_found;
|
|
+ float xsize, ysize, xorig, yorig;
|
|
+#else
|
|
float pdf_version_found, pdf_version_wanted, xsize, ysize, xorig, yorig;
|
|
+#endif
|
|
assert(idict != NULL);
|
|
assert(img_type(idict) == IMG_TYPE_PDF);
|
|
assert(readtype == IMG_CLOSEINBETWEEN); // only this is implemented
|
|
@@ -583,6 +588,20 @@
|
|
// this works only for PDF 1.x -- but since any versions of PDF newer
|
|
// than 1.x will not be backwards compatible to PDF 1.x, pdfTeX will
|
|
// then have to changed drastically anyway.
|
|
+#ifdef POPPLER_VERSION
|
|
+ pdf_major_version_found = pdf_doc->doc->getPDFMajorVersion();
|
|
+ pdf_minor_version_found = pdf_doc->doc->getPDFMinorVersion();
|
|
+ if ((pdf_major_version_found > 1)
|
|
+ || (pdf_minor_version_found > minor_pdf_version_wanted)) {
|
|
+ const char *msg =
|
|
+ "PDF inclusion: found PDF version <%d.%d>, but at most version <1.%d> allowed";
|
|
+ if (pdf_inclusion_errorlevel > 0) {
|
|
+ pdftex_fail(msg, pdf_major_version_found, pdf_minor_version_found, minor_pdf_version_wanted);
|
|
+ } else {
|
|
+ pdftex_warn(msg, pdf_major_version_found, pdf_minor_version_found, minor_pdf_version_wanted);
|
|
+ }
|
|
+ }
|
|
+#else
|
|
pdf_version_found = pdf_doc->doc->getPDFVersion();
|
|
pdf_version_wanted = 1 + (minor_pdf_version_wanted * 0.1);
|
|
if (pdf_version_found > pdf_version_wanted + 0.01) {
|
|
@@ -594,6 +613,7 @@
|
|
pdftex_warn(msg, pdf_version_found, pdf_version_wanted);
|
|
}
|
|
}
|
|
+#endif
|
|
img_totalpages(idict) = pdf_doc->doc->getCatalog()->getNumPages();
|
|
if (img_pagename(idict)) {
|
|
// get page by name
|