GeneralTeXnicCenter and MiKTeX: got blank PDF file

LaTeX specific issues not fitting into one of the other forums of this category.
Jay_N
Posts: 4
Joined: Mon Nov 08, 2010 11:31 pm

TeXnicCenter and MiKTeX: got blank PDF file

Post by Jay_N »

Greetings All,

I am trying to go through a tutorial sheet on LaTeX by using TeXnicCenter but i keep getting a blank PDF file even though there are no errors found...on the bottom message window it says
LaTeX-Result: 0 Error(s), 0 Warning(s), 0 Bad Box(es), 0 Page(s)
I am supposed to get
LaTeX-Result: 0 Error(s), 0 Warning(s), 0 Bad Box(es), 1 Page(s)
The following is my input.....please help me

Code: Select all

%hello.tex - Our first Latex example!
\documentclass[12pt]{article}
\usepackage{a4}

\begin{document}
Hello World!
\end{document}
Thank You


Regards
Jay
Last edited by Jay_N on Fri Nov 12, 2010 9:49 pm, edited 2 times in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Re: Blank PDF file

Post by frabjous »

I get a non-blank page when I compile that very simple code, as you should. Is a .log file produced when you compile that? If so, could you upload it as an attachment here?
Jay_N
Posts: 4
Joined: Mon Nov 08, 2010 11:31 pm

Re: Blank PDF file

Post by Jay_N »

....i have tried to run it so many times at first there was no pdf file because an error message was coming up....i had to create the LaTeX => PS => PDF profile and now i am getting blank pages. I would like to mention the fact that on the 'PostProcessor' tab i could not find the file starting with 'gswi...' for the 'Executable:' part instead i have put C:\Program Files\MiKTeX 2.9\miktex\bin\ps2pdf.exe
Thank You in advance
Attachments
LaTeX1.tex
(145 Bytes) Downloaded 413 times
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

TeXnicCenter and MiKTeX: got blank PDF file

Post by frabjous »

I wanted to see the .log file, not the .tex file. (You already posted the .tex file above.)

For this file, you should be able to use the direct LaTeX => PDF routine, and do not need to use the LaTeX => PS => PDF. (In fact, it's hard to see why a beginner would need LaTeX => PS => PDF at all.)

I couldn't full interpret what you were saying about not finding 'gswi...'-- but do you have ghostscript installed? If not, you should install it. It's a pretty integral part of any LaTeXer's toolkit.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10340
Joined: Mon Mar 10, 2008 9:44 pm

TeXnicCenter and MiKTeX: got blank PDF file

Post by Stefan Kottwitz »

Hi Jay!

Like frabjous, I suggest posting the .log file.
Btw. the a4 package is obsolete. You can read about it in l2tabu.

Stefan
LaTeX.org admin
Jay_N
Posts: 4
Joined: Mon Nov 08, 2010 11:31 pm

Re: Blank PDF file

Post by Jay_N »

I am not able to create a file that ends with .log .....the assignment i have been given requires me to do my own investigation on how to use LaTeX i have a week to create a mathematical document but i have to go through the tutorial sheets to get an insight of how LaTeX works.....i thought i was going to be able to do it at home but i guess i am going to have to take my laptop to uni and see the reason why TeXnicCenter is not co-operating well with MiKTeX2.9...i tried to follow an example of adding another profile(LaTex=>pst-pdf->PDF) which uses a ghostscript but it is producing the same result (blank page)
Thank You Both for your time
Ragards
Jay
User avatar
Stefan Kottwitz
Site Admin
Posts: 10340
Joined: Mon Mar 10, 2008 9:44 pm

Re: Blank PDF file

Post by Stefan Kottwitz »

Hi Jay,

I guess MiKTeX 2.9 installed the TeXworks editor. You could try that instead of TeXnicCenter.

Stefan
LaTeX.org admin
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

TeXnicCenter and MiKTeX: got blank PDF file

Post by frabjous »

Jay_N wrote:I am not able to create a file that ends with .log
A log file is automatically created whenever latex (or pdflatex) is run on a source document, whether or not the run was successful. Even if you're getting a "blank PDF", a log file should be created along with it.

On Windows, of course, file extensions are often hidden, but it should have the same name as your .tex file and exist in the same folder as it and the resulting .pdf, and probably under "File Type" or something similar in Details view in Windows Explorer/My Computer, it should show that it's a log. (It's been awhile since I've used Windows, so I can't remember all the details.)

If no log file is being created, then either you've got TeXnicCenter set up to automatically delete the log files (which may be possible), or else it's not even running LaTeX on the file at all. Try TeXworks if you can, and double check your set up.

There are also online LaTeX editors you could try, like LaTeX lab.
Jay_N
Posts: 4
Joined: Mon Nov 08, 2010 11:31 pm

Re: Blank PDF file

Post by Jay_N »

Thank you for the information...i have managed to get the hang of latex it is working now :D
lapool
Posts: 1
Joined: Tue Nov 29, 2011 7:42 pm

Re: Blank PDF file

Post by lapool »

I met the same question, it really drived me crazy, finally i found out:
this happens if the MikTex has missing packages.

the solution is here:
To resolve this, go to
for e.g. MikTex2.9 -> maintainance (admin) - > Settings (admin) -> General
and choose either Yes or No (but not "Ask me first") for the option "Install missing packages on-the-fly".
Post Reply