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

Free Support Forum - aspose.com

Page Number format in pdf problem

I have some code that works correctly to produce page numbers from an original rtf file when output to a word doc. However when output to a pdf I can get either all roman lowercase, or all arabic numerals, but not roman lowercase for the table of contents, and arabic for the actual document. I have tried various incantations of this code but here is the basic flow.

Document doc = new Document(filename);

doc.UpdateFields();
doc.UpdatePageLayout();
doc.LastSection.PageSetup.PageNumberStyle = NumberStyle.Arabic;
Section lastSection = null;
int counter = 1;
foreach (Section sec in doc.Sections) //three sections, header, TOC and body
{

sec.PageSetup.PageStartingNumber = 1;
sec.PageSetup.PageNumberStyle = counter == 2 ? NumberStyle.LowercaseRoman : NumberStyle.Arabic;
sec.PageSetup.RestartPageNumbering = true;
counter++;
}

doc.Save(outputFileName);

Again this works correctly when outputing to a word document, but not to a pdf.

Ideas?

Hi

Thanks for your request. Could you please attach your source and output documents here for testing? We will check the issue and provide you more information.

Best regards,

Added to the original post, thanks

Hi

Thank you for reporting this problem to us. I managed to reproduce the problem on my side. Your request has been linked to the appropriate issue. You will be notified as soon as it is resolved.

Best regards,

Though I wasn’t notified of a fix to this, I did see some some updates in the release notes related to page numbers in the most recent release. This problem persists though. Any update on when this may be corrected?

Hi

Thanks for your request. Unfortunately, the recently released version of Aspose.Words does not include a fix for the issue you have reported. The issue is in the queue for analysis at the moment. Once our developers analyze the issue we will be able to provide you more information and estimate.

Best regards,

Has there been any updates to this bug? There have been some releases since then, so I am wondering if it has been resolved.

Hello

Thanks for your request. Unfortunately, currently, the issue is pending in queue for analysis. I apologize for inconvenience.

I will consult with responsible developer and provide you more information.

Best regards,

I see there is a release for aspose.word and some work on TOC and page numbering. Has this problem been fixed? Any updates?


Thanks

Hello

Thanks for your request. Unfortunately the issue is still unresolved, and currently this issue is in process of analysis. But, I cannot provide you any reliable estimate regarding this issue at the moment. Sorry for inconvenience.

Best regards,

Hi Philip,

Thank you for additional information. I just rechecked the issue with the latest version of Aspose.Words and it seems it is not reproducible anymore. Could you please try with the latest version and confirm that the issue does not occur. You can download the latest version from here:

http://www.aspose.com/community/files/51/.net-components/aspose.words-for-.net/category1188.aspx

Best regards,

The issues you have found earlier (filed as WORDSNET-5045) have been fixed in this .NET update and this Java update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.