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]
solver
Jonathan Westhues 2009-12-15 06:51:21 -08:00
parent b974a4adeb
commit c225087ab5
1 changed files with 7 additions and 0 deletions

View File

@ -263,6 +263,13 @@ void EpsFileWriter::FinishAndCloseFile(void) {
// a correct xref table. // a correct xref table.
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void PdfFileWriter::StartFile(void) { 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, fprintf(f,
"%%PDF-1.1\r\n" "%%PDF-1.1\r\n"
"%%%c%c%c%c\r\n", "%%%c%c%c%c\r\n",