Alep
April 6, 2009, 2:32am
1
I am using Aspose.pdf.kit to add header and footer to an existing pdf but it only works for the first page only. MemoryStream outputStream = new MemoryStream(); PdfFileStamp pdfStamp = new PdfFileStamp(stream, outputStream); string headerFooterText = string.Format(“{0} - {1}”, “Heeloo”, “World”); FormattedText headerText = new FormattedText(headerFooterText, System.Drawing.Color.Gray, FontStyle.TimesRoman, EncodingType.Winansi, false, 8); FormattedText footerText = new FormattedText(headerFooterText, System.Drawing.Color.Gray, FontStyle.TimesRoman, EncodingType.Winansi, false, 8); pdfStamp.AddHeader(headerText, 20); pdfStamp.AddFooter(footerText, 30); pdfStamp.Close(); Is there any property that I should set to enable header and footer on all pages? cheers
This message was posted using Page2Forum from AddFooter Method - Aspose.Pdf.Kit for .NET and Java
tunca
April 6, 2009, 4:02am
2
I have a smilar problem, with the following method. It only adds stamp at the first page.
Do you use demo version? Maybe it is trial version restriction.
private void addImageWaterMark(string imageFile, int[] pageNums)
{
Stamp aStamp = new Stamp();
aStamp.BindImage(imageFile);
//specifies the Stamp object added as watermark
aStamp.IsBackground = false;
//specifies at which pages to add
aStamp.Pages = pageNums;
//specifies the watermark rotation
aStamp.Rotation = 30;
// Opacity
aStamp.Opacity = 0.3f;
//specifies the position of stamp
aStamp.SetOrigin(
m_pdfFileInfo.GetPageWidth(1) / 2,
m_pdfFileInfo.GetPageHeight(1) / 2 );
//set the size of the watermark
aStamp.SetImageSize(80, 80);
PdfFileStamp stamper = new PdfFileStamp(m_inFileName, m_outFileName);
stamper.AddStamp(aStamp);
stamper.Close();
}
Alep
April 6, 2009, 4:27am
3
yup I am using the trial version. I have also tried the demo for pdfFileStamp and it only adds the image/text on the first page.
tunca
April 6, 2009, 4:36am
4
This is not mentioned in the license infırmation, but apperantly this is a restriction of the trial version.
Hi,
Thank you very much for considering Aspose.
We're looking into the matter. Please spare us some time so could investigate the issue.
We appreciate your patience.
Regards,
Hi,
Thank you for reporting this.
It is not a license restriction but a bug. And we have resolved it in the attached beta version (3.4.1.3), please download the attachment and try it before we publish a new release or a hotfix.
Thanks,
Alep
April 7, 2009, 7:07am
7
Hi Felix. Thank you for the response. The header and footer are displayed on each page now. Another question, is it possible to add table to the footer instead of a single line text?
Hi,
I'm sorry to inform you that currently you can't add a table in the header footer of a PDF using Aspose.Pdf.Kit.
We're sorry for the inconvenience.
Regards,
When will this hotfix be offically released? The stamping on multiple pages does not work in the current version we have purchased, 3.4.
We could not find any link to this release- 3.4.1.3 on your download site.
Hi Jun,
Please download the latest hotfix 3.4.2.7 from this link .
I hope this helps. Should you have any more issues, please do let us know.
Regards,