diff --git a/coders/pdf.c b/coders/pdf.c
index 2e5f2fc..85e0fa1 100644
--- a/coders/pdf.c
+++ b/coders/pdf.c
@@ -602,8 +602,9 @@
*options='\0';
(void) FormatLocaleString(density,MaxTextExtent,"%gx%g",image->resolution.x,
image->resolution.y);
- (void) FormatLocaleString(options,MaxTextExtent,"-g%.20gx%.20g ",(double)
- page.width,(double) page.height);
+ if (image_info->page != (char *) NULL)
+ (void) FormatLocaleString(options,MaxTextExtent,"-g%.20gx%.20g ",(double)
+ page.width,(double) page.height);
if (cmyk != MagickFalse)
(void) ConcatenateMagickString(options,"-dUseCIEColor ",MaxTextExtent);
if (cropbox != MagickFalse)