我尝试了很多方法来隐藏页码,但无论我怎么做,它们都不起作用,即使隐藏了,我的徽标标题也会消失。有人有什么建议吗?
import pylatex as pyl
from pylatex import Document, Section, Subsection, Command,Enumerate,Package,Head, Foot, MiniPage,PageStyle,StandAloneGraphic,Figure,LineBreak,FlushLeft,Command
from pylatex.utils import italic, NoEscape
from pylatex.basic import NewLine
import pylatex.config as cf
import os
from pylatex.base_classes import Environment
cf.active = cf.Version1(indent=False)
doc = pyl.Document()
doc.packages.append(pyl.Package('graphicx'))
doc.packages.append(pyl.Package('fancyhdr'))
doc.preamble.append(pyl.Command('pagestyle', 'fancy'))
doc.preamble.append(pyl.Command('lhead',arguments=pyl.NoEscape(r'\begin{picture}(0,0) \put(0,0){\includegraphics[width=4cm]{Yourlogo.png}} \fancyfoot{} \end{picture}')))
doc.append ("""FULLNAME
CUSTADDRESS
CUSTCITYSTATEZIP
Regarding: Service Request Number: [REQUESTID]
Affected Address: [PROBFULLADDRESS]
Dear [FULLNAME]
""")
doc.append("""Paragraph1""")
with doc.create(Enumerate(enumeration_symbol=r"\alph*)")) as enum:
enum.add_item("item 1")
enum.add_item("item 2")
enum.add_item("item 3")
enum.add_item(NoEscape("item 4"))
doc.append("paragraph 2")
doc.append("paragraph 3")
with doc.create(Enumerate(enumeration_symbol=r"\arabic*)")) as enum:
enum.add_item("item 1")
enum.add_item("item 2")
enum.add_item("item 3")
enum.add_item("item 4")
enum.add_item(NoEscape("item 5"))
doc.append("Paragraph 4")
doc.append(NewLine())
doc.append(NewLine())
doc.append("If you have any question")
doc.append(NewLine())
doc.append(NewLine())
doc.append("Sincerely,")
doc.append(NewLine())
doc.append(NewLine())
doc.append("Customer Service")
doc.append(NewLine())
doc.append("DNP")
doc.generate_pdf('lettertest1', clean_tex=False,compiler='LuaLaTeX')
提前致谢,马特