# \setlength{pdfpagewidth}{8.5in} not working in sharelatex

I am writing a paper for AAAI-18, which requires the following commands to be pasted near the top of the document:

\setlength{pdfpagewidth}{8.5in}
\setlength{pdfpageheight}{11in}\\


Neither of these commands seem to work in sharelatex. Is there something I can do in sharelatex (maybe add a .sty file?) to fix this issue? Thanks.

• Use the geometry package, and it's options, much safer – daleif Aug 2 '17 at 19:18
• Perhaps you're using a \documentclass that changes your settings. It would be helpful if you can provide code that replicates your results. – Werner Aug 2 '17 at 19:21
• ? Aren't lengths named by something beginning with a backslash? Maybe that's the problem, but then it would have nothing to do with ShareLaTeX. pdfpagewidth\pdfpagewidth and pdfpageheight\pdfpageheight? – Alice M. Aug 2 '17 at 19:21
• this is unrelated to sharelatex, it is simply a syntax error you are missing a \  before the lengths and conversely the \\  at the end should be removed. – David Carlisle Aug 2 '17 at 19:24
• @cfr Yeah, I know, I just didn't know what word to use. I kinda meant “a paragraph of lines of code” or something xD – Alice M. Aug 3 '17 at 11:18

Add a backslash before pdfpagewidth and pdfpageheight and remove the two backshlash in the end:
\setlength{\pdfpagewidth}{8.5in}