General ⇒ Texnic generates blank PDF
Texnic generates blank PDF
Dear all,
I'm trying to use Texnic along with Miktek 2.7 to write my thesis. When it's set to "Latex=>PDF" and I click on "Build Current File" (I don't know why but "Build Output" is disabled) it says that it found no errors, some "bad boxes" and some warnings. It generates a PDF file with 78 pages but they are all blank and as I scroll down a message saying "An error was found in this file" is displayed. After I click OK on this message box, another one pops up saying "Wrong operand type".
If I change the setting to "Latex=>DVI", the file is correctly generated.
Any suggestions?
Thanks a lot in advance!
I'm trying to use Texnic along with Miktek 2.7 to write my thesis. When it's set to "Latex=>PDF" and I click on "Build Current File" (I don't know why but "Build Output" is disabled) it says that it found no errors, some "bad boxes" and some warnings. It generates a PDF file with 78 pages but they are all blank and as I scroll down a message saying "An error was found in this file" is displayed. After I click OK on this message box, another one pops up saying "Wrong operand type".
If I change the setting to "Latex=>DVI", the file is correctly generated.
Any suggestions?
Thanks a lot in advance!
NEW: TikZ book now 40% off at Amazon.com for a short time.

- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Texnic generates blank PDF
The "Build Output" button (or pressing F7) is only active when working with a project. So you can make sure that always the main file of the project is processed. You must not neglect the warnings. In most cases they are very useful to explain why things are going wrong. I suggest to attach the log file here.bcfla wrote:[…] When it's set to "Latex=>PDF" and I click on "Build Current File" (I don't know why but "Build Output" is disabled) it says that it found no errors, some "bad boxes" and some warnings. […]
Choose the build profile "LaTeX => PS => PDF" and check the log file as well as the resulting PDF. If necessary, provide a minimal working example (MWE) that reproduces the undesired behaviour or attach the critical source file here. Alternatively you should post at least the preamble of your document. Sometimes that's enough to find causes of errors.bcfla wrote:[…] It generates a PDF file with 78 pages but they are all blank and as I scroll down a message saying "An error was found in this file" is displayed. After I click OK on this message box, another one pops up saying "Wrong operand type".
If I change the setting to "Latex=>DVI", the file is correctly generated. […]
Best regards and welcome to the board
Thorsten¹
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Texnic generates blank PDF
Dear Thorsten,
Thank you very much for your reply.
I'm a complete newbie to Texnic (actually, to Latex as a whole) and I'm not sure of what to look for in the log file. Nothing in the file caught my eye as something that might be the cause of the problem or that I would be capable of solving.
I tried setting up an example of my file that replicates the condition I described, which is attached along with the .cls file. If anyone is able to take a look at this I would greatly appreciate it.
Once again, thanks a lot for all the help!
Best regards
Thank you very much for your reply.
I'm a complete newbie to Texnic (actually, to Latex as a whole) and I'm not sure of what to look for in the log file. Nothing in the file caught my eye as something that might be the cause of the problem or that I would be capable of solving.
I tried setting up an example of my file that replicates the condition I described, which is attached along with the .cls file. If anyone is able to take a look at this I would greatly appreciate it.
Once again, thanks a lot for all the help!
Best regards
- Attachments
-
- Dissertation.zip
- (8.63 KiB) Downloaded 152 times
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Texnic generates blank PDF
The posted files are useless, because I don't have the file brhyphen.tex and I don't know where to get it from. A was able to acquire atbeginend.sty from the web. I only need the log file the compiler produced when processing the source file on your machine. So, please attach this file as I already requested.
Supplement:
I'm not sure but I probably found the cause. The custom class file requires the graphicx package.
This package should always be loaded without any driver option. So modify the code as follows.
Perhaps this solves the problem, but we will know better after a new run with the modified class file.
Supplement:
I'm not sure but I probably found the cause. The custom class file requires the graphicx package.
Code: Select all
\RequirePackage[dvipdfm]{graphicx}
Code: Select all
\RequirePackage{graphicx}
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Texnic generates blank PDF
Sorry for not getting your message correctly.
I have tried the piece of code you posted but got an error saying "Unknown graphics extension: .ps".
I am now attaching the log file for both cases (with and without the modification of the .cls file) and also the brhyphen.tex just in case.
Hope I have done things right this time
Best regards!
I have tried the piece of code you posted but got an error saying "Unknown graphics extension: .ps".
I am now attaching the log file for both cases (with and without the modification of the .cls file) and also the brhyphen.tex just in case.
Hope I have done things right this time

Best regards!
- Attachments
-
- Files.zip
- (10.92 KiB) Downloaded 137 times
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Texnic generates blank PDF
I'm sorry, but I'm afraid my help ends here. I still got an error message caused by the \setpage command and I have not been able to eliminate it.
The modification doesn't seem to work and I can't find any irregularities in the log files. Sorry, but I'm out of the race.
Code: Select all
! Undefined control sequence.
\puc@setmargins@front ->\setpage
{\csname puc@textheight@front\endcsname }{\...
l.63 \begin{document}
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Texnic generates blank PDF
Thank you very much for investing your time into this!
I have absolutely no idea of what to do but if I get an answer to this I'll post here.
Best regards.
I have absolutely no idea of what to do but if I get an answer to this I'll post here.
Best regards.
Texnic generates blank PDF
After a Google search, I've found Thomas Lewiner's homepage, the author of the ThesisPUC class. There one can download a zip file with the latest version of ThesisPUC.cls and some additional files.
The command which yielded the error reported by localghost is \setpage. I conjectured that it was related with fixing the page layout, so I took a look to one of the packages loaded by ThesisPUC.cls, specifically, to chngpage.sty. I opened this file located somewhere in my TeX-Live 2007 distribution. I found there a quite similar command, \changepage, which fitted with the usage and number of arguments that ThesisPUC.cls assigns to \setpage. When I downloaded the zip file from the above link, I understood the whole matter: Thomas Lewiner has adapted chngpage.sty, introducing \setpage and more commands, but unfortunately he did not change the file name. The package that he distributes together with ThesisPUC.cls is unproperly named chngpage.sty, leading to confusion.
ThesisPUC.cls also loads the graphic file puc.ps, with the logo of the university. Since it is a ps file, the class forces to follow the path LaTeX->PS->PDF. I've converted that file to PDF format and changed puc.ps by puc.pdf in ThesisPUC.cls, since I prefer the direct way from LaTeX to PDF. But then I found a new error: hyperref is loaded with an unexisting option pdflatex. After replacing pdflatex by pdftex, I managed to compile.
The command which yielded the error reported by localghost is \setpage. I conjectured that it was related with fixing the page layout, so I took a look to one of the packages loaded by ThesisPUC.cls, specifically, to chngpage.sty. I opened this file located somewhere in my TeX-Live 2007 distribution. I found there a quite similar command, \changepage, which fitted with the usage and number of arguments that ThesisPUC.cls assigns to \setpage. When I downloaded the zip file from the above link, I understood the whole matter: Thomas Lewiner has adapted chngpage.sty, introducing \setpage and more commands, but unfortunately he did not change the file name. The package that he distributes together with ThesisPUC.cls is unproperly named chngpage.sty, leading to confusion.
ThesisPUC.cls also loads the graphic file puc.ps, with the logo of the university. Since it is a ps file, the class forces to follow the path LaTeX->PS->PDF. I've converted that file to PDF format and changed puc.ps by puc.pdf in ThesisPUC.cls, since I prefer the direct way from LaTeX to PDF. But then I found a new error: hyperref is loaded with an unexisting option pdflatex. After replacing pdflatex by pdftex, I managed to compile.
The CTAN lion is an artwork by Duane Bibby. Courtesy of www.ctan.org.
Re: Texnic generates blank PDF
Sorry for the package confusion. I updated the class style for the standard chngpage style:
http://cuca.mat.puc-rio.br/~tomlew/thesis_puc.zip
Thank you for the comment!!
http://cuca.mat.puc-rio.br/~tomlew/thesis_puc.zip
Thank you for the comment!!
Re: Texnic generates blank PDF
Thank you all very much for the replies!
I'll try to make it work right now!
Best regards,
Bruno
I'll try to make it work right now!
Best regards,
Bruno