We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Add watermark when converting pdf to html

Hello,I want to convert pdf to html ,and add watermark to html.
My solution is,
1、add watermark to pdf first;
2、then,convert pdf to html 。
But there isn’t watermark in html.
My example code as follows:
public static void WaterMarkPdf(Aspose.Pdf.Document pdf, string fileNameOut)
Aspose.Pdf.TextStamp textStamp = new Aspose.Pdf.TextStamp(“waterMark”);
// Set whether stamp is background
textStamp.Background = true;
// Set origin
textStamp.XIndent = 200;
textStamp.YIndent = 500;
// Rotate stamp
textStamp.Rotate = Aspose.Pdf.Rotation.on90;
// Set text properties
textStamp.TextState.Font = Aspose.Pdf.Text.FontRepository.FindFont(“Arial”);
textStamp.TextState.FontSize = 14.0F;
textStamp.TextState.FontStyle = Aspose.Pdf.Text.FontStyles.Bold;
textStamp.TextState.FontStyle = Aspose.Pdf.Text.FontStyles.Italic;
textStamp.TextState.ForegroundColor = Aspose.Pdf.Color.FromRgb(System.Drawing.Color.Red);
// Add stamp to particular page
for (int i = 1; i < pdf.Pages.Count + 1; i++)
pdf.Save(fileNameOut, Aspose.Pdf.SaveFormat.Html);


Thank you for contacting support.

Would you please share generated PDF document with us which you want to convert to HTML so that we may investigate further to help you out.