Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
iText XML Samples
<itext creationdate="@DateTime.Now.ToString()" producer="RazorPDF">
<paragraph style="font-family:Helvetica;font-size:18;font-weight:bold;font-style:italic;">
<chunk red="255" green="0" blue="0">@ViewBag.Title</chunk>
</paragraph>
<table width="100%" cellpadding="1.0" cellspacing="1.0" widths="5;5">
<row>
<cell borderwidth="0.5" left="false" right="false" top="false" bottom="true">User Name</cell>
<cell borderwidth="0.5" left="false" right="false" top="false" bottom="true" horizontalalign="right">Lucky Number</cell>
</row>
</table>
<image url="@Context.Server.MapPath("~/Content/sample.png")"/>
<newline />
<list numbered="true" symbolindent="15" font="unknown">
<listitem leading="18.0" font="Times" size="12.0" align="Default" indentationleft="15.0">
<chunk font="Times" size="12.0">List item</chunk>
</listitem>
</list>
<anchor fontstyle="normal, underline" red="0" green="0" blue="255" reference="http://nyveldt.com/blog/">
My blog
</anchor>
</itext>
@catherine85
Copy link

catherine85 commented Dec 26, 2014

Hello , where I can find something else about these syntax.

@shahirm
Copy link

shahirm commented Jan 27, 2016

Hello, How can I put text over an image in Razor pdf?

My requirement is to just put some dynamic text at the center of an image at the center of the page , I tried everything but the text is always outside the image. Please help.

@sujaychak
Copy link

sujaychak commented Feb 4, 2016

How to render Chinese text in PDF? text shall be fetched from Resource string.
any help please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment