From c225087ab50742df40e34e6ce24b942741d51de0 Mon Sep 17 00:00:00 2001 From: Jonathan Westhues Date: Tue, 15 Dec 2009 06:51:21 -0800 Subject: [PATCH] PDF has a page size limit of 200 inches for either axis; so warn if we exceed that, because the viewers will otherwise just silently display nothing. [git-p4: depot-paths = "//depot/solvespace/": change = 2088] --- exportvector.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/exportvector.cpp b/exportvector.cpp index 75245bf..61f8f6c 100644 --- a/exportvector.cpp +++ b/exportvector.cpp @@ -263,6 +263,13 @@ void EpsFileWriter::FinishAndCloseFile(void) { // a correct xref table. //----------------------------------------------------------------------------- void PdfFileWriter::StartFile(void) { + if((ptMax.x - ptMin.x) > 200*25.4 || + (ptMax.y - ptMin.y) > 200*25.4) + { + Message("PDF page size exceeds 200 by 200 inches; many viewers may " + "reject this file."); + } + fprintf(f, "%%PDF-1.1\r\n" "%%%c%c%c%c\r\n",