Sign In
Sign Up
Products
Purchase
Downloads
Demos
Forums
Blogs
Documentation
Corporate
Aspose.com
»
Public Forums for Customers an...
»
Aspose.Pdf for .NET, Java and ...
»
Re: Replaceable symbol $Sp evaluates to zero on every page
Replaceable symbol $Sp evaluates to zero on every page
Last post 08-04-2007, 11:11 PM by
WillDyson
. 7 replies.
Sort Posts:
Oldest to newest
Newest to oldest
Previous
Next
08-02-2007, 4:44 PM
89104
WillDyson
Joined on 05-10-2007
Posts 4
Replaceable symbol $Sp evaluates to zero on every page
I am trying to use the replacable symbols for section page number ($Sp) and section page count ($SP). However, the $Sp symbol always evaluates to zero. The page count symbol appears to work correctly.
http://www.aspose.com/Wiki/default.aspx/Aspose.Pdf/SymbolsListAndPurpose.html
This is using Aspose.PDF 3.5.6.
Thanks!
08-02-2007, 7:25 PM
89120
in reply to
89104
forever
Joined on 05-27-2003
Posts 7,168
Re: Replaceable symbol $Sp evaluates to zero on every page
I can't reproduce this error. Can you please provide the code?
Tommy Wang
Lead Developer
Aspose Changsha Team
About Us
Contact Us
08-02-2007, 8:35 PM
89128
in reply to
89120
WillDyson
Joined on 05-10-2007
Posts 4
Re: Replaceable symbol $Sp evaluates to zero on every page
Attachment:
Present (inaccessible)
A program to demonstrate the error follows (and is attached as well). What am I doing wrong here?
using System;
using System.Collections.Generic;
using System.Text;
using Aspose.Pdf;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
Pdf test = new Pdf();
Section sec = new Section(test);
HeaderFooter header = new HeaderFooter(sec);
sec.EvenHeader = header;
sec.OddHeader = header;
header.Margin.Top = 120;
Text pageIfo = new Text(header,"SectionPage $Sp/$SP\nPage $p/$P");
header.Paragraphs.Add(pageIfo);
for (int i = 0; i < 2; i++)
{
Text pageBreak = new Text("");
pageBreak.IsFirstParagraph = true;
sec.Paragraphs.Add(pageBreak);
Text pageStuff = new Text("hi there");
sec.Paragraphs.Add(pageStuff);
}
test.Sections.Add(sec);
test.Save(@"C:\Documents and Settings\Will\My Documents\test.pdf");
}
}
}
08-02-2007, 8:55 PM
89129
in reply to
89128
forever
Joined on 05-27-2003
Posts 7,168
Re: Replaceable symbol $Sp evaluates to zero on every page
I have reproduced this error and logged this issue as
PDFNET-3511
. We will try to fix it soon.
Tommy Wang
Lead Developer
Aspose Changsha Team
About Us
Contact Us
08-03-2007, 1:21 PM
89277
in reply to
89129
WillDyson
Joined on 05-10-2007
Posts 4
Re: Replaceable symbol $Sp evaluates to zero on every page
Thanks Tommy!
In the mean time, is there any workaround for this?
08-03-2007, 8:38 PM
89304
in reply to
89277
forever
Joined on 05-27-2003
Posts 7,168
Re: Replaceable symbol $Sp evaluates to zero on every page
Currently you can't make both $p and $Sp work well. If you want to display page number in section only, as a workaround, you can use $p and set the Section.
IsPageNumberRestarted
and Section.
StartingPageNumber
.
Tommy Wang
Lead Developer
Aspose Changsha Team
About Us
Contact Us
08-04-2007, 10:21 PM
89339
in reply to
89304
forever
Joined on 05-27-2003
Posts 7,168
Re: Replaceable symbol $Sp evaluates to zero on every page
Attachment:
Present (inaccessible)
This bug has been fixed. You can try the attachment before we publishing the hotfix.
Tommy Wang
Lead Developer
Aspose Changsha Team
About Us
Contact Us
08-04-2007, 11:11 PM
89342
in reply to
89339
WillDyson
Joined on 05-10-2007
Posts 4
Re: Replaceable symbol $Sp evaluates to zero on every page
I've tested, and can confirm this works on my production code.
Thanks!
Contact Us
.
Privacy Policy
.
Terms of Use
.
Site Feedback
© Aspose 2002-2008. All Rights Reserved.
Language:
Arabic (العربية)
Chinese Simplified (中文(简体)
Chinese Traditional (中文(繁體)
Dutch (Nederlands)
English
French (français)
German (Deutsch)
Italian (italiano)
Japanese (日本語)
Korean (한국어)
Portuguese (Português)
Russian (русский)
Spanish (español)