TransWikia.com

How to remove report blind text from a generated pdf

TeX - LaTeX Asked on October 6, 2021

I have manages to generate a pdf using latex and faced a problem of getting unnecessary text in my pdf as attached below. Can anyone help me to solve this issue?
enter image description here

My tex file starts as below

documentclass{report} 
usepackage{blindtext} 
usepackage[export]{adjustbox} 
usepackage{graphicx} 
usepackage{heuristica} 
usepackage[heuristica,vvarbb,bigdelims]{newtxmath} 
usepackage[T1]{fontenc} 
renewcommand*oldstylenums[1]{textosf{#1}} 
usepackage[utf8]{inputenc} 
usepackage[english]{babel} 
renewcommand{baselinestretch}{1.3} 
usepackage[a4paper,% 
left=0.7in,right=0.7in,top=0.9in,bottom=0.9in,% 
footskip=.25in]{geometry} 


begin{document} 

My code is as below

from pylatex import Document, Section, Subsection, Command, Figure, SubFigure, Package
from pylatex.utils import italic, NoEscape

latex_document = '120.tex'
with open(latex_document) as file:
    tex= file.read()

doc = Document('basic')
doc.append(NoEscape(tex))
doc.packages.append(Package('graphicx'))
doc.generate_pdf(clean_tex=False)

Can anyone help me to solve this issue?
Thanks..!

One Answer

we do not want to use

begin{document} 

in the .tex file, since it will be automatically append when the .tex file is appending to the doc file. after removing begin{document} and its closing line, the issue got fixed

Correct answer by Charuka Herath on October 6, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP