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

Free Support Forum - aspose.com

AutoSequence dose Not work

Hi

I am using 6.4.0. It seams, that the "IsAutoSequence" not work. Here my Excample Code

			//Instntiate the Pdf object by calling its empty constructor
			Aspose.Pdf.Generator.Pdf pdf1 = new Aspose.Pdf.Generator.Pdf();
		<span style="color: green;">//Create the section in the Pdf object</span>
		Aspose.Pdf.Generator.<span style="color: rgb(43, 145, 175);">Section</span> sec1 = pdf1.Sections.Add();



		<span style="color: green;">/*</span>

* Create 1st heading in the Pdf object’s section with level=1. Then create
* a text segment and add it in the heading. Set its StartNumber=6 to start
* the numbering from 6 and onwards. And don’t forget to set IsAutoSequence=true.
* If IsAutoSeguence property is set to true then the heading’s sequence is
* controlled automatically by Aspose.Pdf for .NET. After setting all properties, add
* heading into the paragraphs collection of the section
*/

		Aspose.Pdf.Generator.<span style="color: rgb(43, 145, 175);">Heading</span> heading1 = <span style="color: blue;">new</span> Aspose.Pdf.Generator.<span style="color: rgb(43, 145, 175);">Heading</span>(pdf1, sec1, 1);
		Aspose.Pdf.Generator.<span style="color: rgb(43, 145, 175);">Segment</span> segment1 = <span style="color: blue;">new</span> Aspose.Pdf.Generator.<span style="color: rgb(43, 145, 175);">Segment</span>(heading1);
		heading1.Segments.Add(segment1);

		segment1.Content = <span style="color: rgb(163, 21, 21);">"Level 1"</span>;
		heading1.IsAutoSequence = <span style="color: blue;">true</span>;
		heading1.StartNumber = 6;
		sec1.Paragraphs.Add(heading1);



		<span style="color: green;">/*</span>

* Create 2nd heading in the Pdf object’s section with level=2. Then create
* a text segment and add it in the heading. And don’t forget to set
* IsAutoSequence=true.If IsAutoSeguence property is set to true then the
* heading’s sequence is controlled automatically by Aspose.Pdf for .NET. After setting
* all properties, add heading into the paragraphs collection of the section
*/

		Aspose.Pdf.Generator.<span style="color: rgb(43, 145, 175);">Heading</span> heading2 = <span style="color: blue;">new</span> Aspose.Pdf.Generator.<span style="color: rgb(43, 145, 175);">Heading</span>(pdf1, sec1, 2);
		Aspose.Pdf.Generator.<span style="color: rgb(43, 145, 175);">Segment</span> segment2 = <span style="color: blue;">new</span> Aspose.Pdf.Generator.<span style="color: rgb(43, 145, 175);">Segment</span>(heading2);
		heading2.Segments.Add(segment2);
		segment2.Content = <span style="color: rgb(163, 21, 21);">"Level 2"</span>;
		heading2.IsAutoSequence = <span style="color: blue;">true</span>;
		sec1.Paragraphs.Add(heading2);



		<span style="color: green;">/*</span>

* Create 3rd heading in the Pdf object’s section with level=3. Then create
* a text segment and add it in the heading. And don’t forget to set
* IsAutoSequence=true.If IsAutoSeguence property is set to true then the
* heading’s sequence is controlled automatically by Aspose.Pdf for .NET. After setting
* all properties, add heading into the paragraphs collection of the section
*/

		Aspose.Pdf.Generator.<span style="color: rgb(43, 145, 175);">Heading</span> heading3 = <span style="color: blue;">new</span> Aspose.Pdf.Generator.<span style="color: rgb(43, 145, 175);">Heading</span>(pdf1, sec1, 3);
		Aspose.Pdf.Generator.<span style="color: rgb(43, 145, 175);">Segment</span> segment3 = <span style="color: blue;">new</span> Aspose.Pdf.Generator.<span style="color: rgb(43, 145, 175);">Segment</span>(heading3);
		heading3.Segments.Add(segment3);
		segment3.Content = <span style="color: rgb(163, 21, 21);">"Level 3"</span>;
		heading3.IsAutoSequence = <span style="color: blue;">true</span>;
		sec1.Paragraphs.Add(heading3);


		<span style="color: green;">//pdf.Save("TestTocXml.pdf");</span>
		<span style="color: green;">// Save the resultant PDF document</span>
		pdf1.Save(<span style="color: rgb(163, 21, 21);">@"c:/temp/headings.pdf"</span>);
		System.Diagnostics.<span style="color: rgb(43, 145, 175);">Process</span>.Start(<span style="color: rgb(163, 21, 21);">@"c:/temp/headings.pdf"</span>);
			//Instntiate the Pdf object by calling its empty constructor
			Aspose.Pdf.Generator.Pdf pdf1 = new Aspose.Pdf.Generator.Pdf();
 
			//Create the section in the Pdf object
			Aspose.Pdf.Generator.Section sec1 = pdf1.Sections.Add();
 
 
 
			/*
			 * Create 1st heading in the Pdf object's section with level=1. Then create
			 * a text segment and add it in the heading. Set its StartNumber=6 to start 
			 * the numbering from 6 and onwards. And don't forget to set IsAutoSequence=true.
			 * If IsAutoSeguence property is set to true then the heading's sequence is 
			 * controlled automatically by Aspose.Pdf for .NET. After setting all properties, add 
			 * heading into the paragraphs collection of the section
			 */
 
			Aspose.Pdf.Generator.Heading heading1 = new Aspose.Pdf.Generator.Heading(pdf1, sec1, 1);
			Aspose.Pdf.Generator.Segment segment1 = new Aspose.Pdf.Generator.Segment(heading1);
			heading1.Segments.Add(segment1);
 
			segment1.Content = "Level 1";
			heading1.IsAutoSequence = true;
			heading1.StartNumber = 6;
			sec1.Paragraphs.Add(heading1);
 
 
 
			/*
			 * Create 2nd heading in the Pdf object's section with level=2. Then create
			 * a text segment and add it in the heading. And don't forget to set 
			 * IsAutoSequence=true.If IsAutoSeguence property is set to true then the 
			 * heading's sequence is controlled automatically by Aspose.Pdf for .NET. After setting
			 * all properties, add heading into the paragraphs collection of the section
			 */
 
			Aspose.Pdf.Generator.Heading heading2 = new Aspose.Pdf.Generator.Heading(pdf1, sec1, 2);
			Aspose.Pdf.Generator.Segment segment2 = new Aspose.Pdf.Generator.Segment(heading2);
			heading2.Segments.Add(segment2);
			segment2.Content = "Level 2";
			heading2.IsAutoSequence = true;
			sec1.Paragraphs.Add(heading2);
 
 
 
			/*
			 * Create 3rd heading in the Pdf object's section with level=3. Then create
			 * a text segment and add it in the heading. And don't forget to set 
			 * IsAutoSequence=true.If IsAutoSeguence property is set to true then the 
			 * heading's sequence is controlled automatically by Aspose.Pdf for .NET. After setting
			 * all properties, add heading into the paragraphs collection of the section
			 */
 
			Aspose.Pdf.Generator.Heading heading3 = new Aspose.Pdf.Generator.Heading(pdf1, sec1, 3);
			Aspose.Pdf.Generator.Segment segment3 = new Aspose.Pdf.Generator.Segment(heading3);
			heading3.Segments.Add(segment3);
			segment3.Content = "Level 3";
			heading3.IsAutoSequence = true;
			sec1.Paragraphs.Add(heading3);
 
 
			//pdf.Save("TestTocXml.pdf");
			// Save the resultant PDF document
			pdf1.Save(@"c:/temp/headings.pdf");
			System.Diagnostics.Process.Start(@"c:/temp/headings.pdf");
 
Regards Markus

Hi Markus,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for sharing the sample code.

We have found your mentioned issue after an initial test. Your issue has been registered in our issue tracking system with issue id: PDFNEWNET-31837. We will notify you via this forum thread against any update regarding your issue.

Sorry for the inconvenience,

The issues you have found earlier (filed as 31837) have been fixed in this update.


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