Save Plain text to PDF/TIFF

Hi

Regarding Bullets and Numbering formats I have used bulletCharacter to identify the symbol bullets. I got what I want.,...So please dont spare time on this issue.Only issue is I dont have any option to assign Hollow square format. Rest of the formats are working fine

Sample Code:

if (para.BulletCharacter == '216')

builder.ListFormat.List = builder.Document.Lists.Add(ListTemplate.BulletDiamonds);

Kinldy let me know is this correct way to do or we have any simplest method.

Hi Ponraj,


Thanks for your inquiry. In this case, you need to use ListCollection.Add Method (Style). This method creates a new list that references a list style and adds it to the collection of lists in the document. Please see the following code snippet for your kind reference.


<span style=“font-size:
10.0pt;font-family:“Courier New”;color:blue;mso-no-proof:yes”>if<span style=“font-size:10.0pt;font-family:“Courier New”;mso-no-proof:yes”>
(para.ParagraphFormat.BulletChar == ‘q’)<o:p></o:p>

{

Style listStyle = builder.Document.Styles.Add(StyleType.List, "HollowSquare");

Aspose.Words.Lists.List list = builder.Document.Lists.Add(listStyle);

ListLevel level = list.ListLevels[0];

level.NumberStyle = NumberStyle.Bullet;

level.Font.Name = "Wingdings";

level.NumberFormat = "\x0071";

builder.ListFormat.List = list;

}

The above code is working fine.

Here my another doubt below:

Hi ,

PPT ==> In bullets and Numbering format, I am not getting the numbers in sequence.

Input:

A. This is letter A

B. This is letter B

Output:

A. This is leter A

A. This is letter B

Same issue I'm facing for numbers also. Kindly help to resolve thi issue.

Hi Ponraj,


Thanks for your inquiry. Could you please attach your input PPT/PPTX here for testing? I will investigate the issue on my side and provide you more information.

Attached sample file.

Any file with bullent numbering.....

Hi Ponraj,

Thanks for sharing the PPT file. I have done some modification in the code, please see the highlighted section in the following code snippet. Please find the complete code in attachment.

Moreover, I suggest you please read Aspose.Words ListTemplate Enumeration from here:

Please also read the NumberedBulletStyle Enumeration from Aspose.Slides for PPT from here:

NumberedBulletStyle Enumeration

if (para.HasBullet && builder.ListFormat.List == null)

{

if (para.NumberedBulletStyle == Aspose.Slides.NumberedBulletStyle.BulletRomanLCPeriod)

builder.ListFormat.List = builder.Document.Lists.Add(ListTemplate.NumberLowercaseRomanDot);

else if (para.NumberedBulletStyle == Aspose.Slides.NumberedBulletStyle.BulletArabicPeriod)

builder.ListFormat.List = builder.Document.Lists.Add(ListTemplate.BulletSquare);

else if (para.NumberedBulletStyle == Aspose.Slides.NumberedBulletStyle.BulletAlphaUCPeriod)

builder.ListFormat.List = builder.Document.Lists.Add(ListTemplate.NumberUppercaseLetterDot);

}

I'm using the below code and facing this issue..kindly correct me if I'm wrong

if (para.BulletType == BulletType.Numbered) //Numbers Formatting

{

switch (para.NumberedBulletStyle)

{

case NumberedBulletStyle.BulletArabicPeriod:

builder.ListFormat.List = builder.Document.Lists.Add(ListTemplate.NumberArabicDot);

break;

case NumberedBulletStyle.BulletArabicParenRight:

builder.ListFormat.List = builder.Document.Lists.Add(ListTemplate.NumberArabicParenthesis);

break;

case NumberedBulletStyle.BulletAlphaLCParenRight:

builder.ListFormat.List = builder.Document.Lists.Add(ListTemplate.NumberLowercaseLetterParenthesis);

break;

case NumberedBulletStyle.BulletRomanUCPeriod:

builder.ListFormat.List = builder.Document.Lists.Add(ListTemplate.NumberUppercaseRomanDot);

break;

case NumberedBulletStyle.BulletRomanLCPeriod:

builder.ListFormat.List = builder.Document.Lists.Add(ListTemplate.NumberLowercaseRomanDot);

break;

case NumberedBulletStyle.BulletAlphaUCPeriod:

builder.ListFormat.List = builder.Document.Lists.Add(ListTemplate.NumberUppercaseLetterDot);

break;

case NumberedBulletStyle.BulletAlphaLCPeriod:

builder.ListFormat.List = builder.Document.Lists.Add(ListTemplate.NumberLowercaseLetterDot);

break;

}

Hi Ponraj,


Thanks for your inquiry. I have modified the If condition, please see the highlighted section in following code snippet.

After iterating through each slide, ParagraphFormat.ClearFormatting method is called which resets paragraph formatting to default. Default paragraph formatting is Normal style, left aligned, no indentation, no spacing, no borders and no shading. Hope this answers your query. Please let us know if you have any more queries.



<span style=“font-size:
10.0pt;font-family:“Courier New”;color:blue;mso-no-proof:yes”>if<span style=“font-size:10.0pt;font-family:“Courier New”;mso-no-proof:yes”>
(para.BulletType == Aspose.Slides.BulletType.Numbered
&& builder.ListFormat.List
== null
) //Numbers
Formatting<o:p></o:p>

{

switch (para.NumberedBulletStyle)

{

// Your code....

}

}

ParagraphFormat.ClearFormatting set the builder.ListFormat.List to null.

}//End if

builder.ParagraphFormat.ClearFormatting();

}//End for


HI,

I tried with the above code. It is not working as expected. My issue below:

Input:

A. This is capital A

B.This is Capital B

Expected Output:

A. This is capital A

B.This is Capital B

Actual Output:

A. This is capital A

A.This is Capital B

Hi Ponraj,


Thanks for your inquiry. I have tested the scenario and have not found the shared issue. I have modified the code with switch statement as you have shared. Please find the complete code in attachment. I have attached the PPT file and output Pdf file with this post for your kind reference.

I have tested your sample attached code with the attached file. Please find the the attached output too. The output is not same as Input. Please dont consider the BulletType.Symbol in input file,since the code is not there. Please consider only BulletType.Numbered. The output is not same.

It is not working for sub child. For example

Input:

A. This is first para

B. This is Second para

1. This sub para for B

2.This is sub para for 2 for B

C.This is third para.

Actual Output:

A. This is first para

B. This is Second para

1. This sub para for B

2.This is sub para for 2 for B

A.This is third para.

Instead of C again it is taking first value A. I want the NumberBullent in sequence.Please provide me sample code for the above scenario.

Hi Ponraj,


Thanks for your inquiry. Please check the following code snippet. I have modified the switch statement. Please do not add same list multiple times in the Document by using DocumentBuilder.Document.Lists.Add method. I have attached the complete code with this post.

Hope this helps you. Please let us know if you have any more queries.

if (para.BulletType == Aspose.Slides.BulletType.Numbered)// && builder.ListFormat.List == null)

{

switch (para.NumberedBulletStyle)

{

case Aspose.Slides.NumberedBulletStyle.BulletArabicPeriod:

if (bullet == "" || bullet != "BulletArabicPeriod")

{

builder.ParagraphFormat.ClearFormatting();

builder.ListFormat.List = builder.Document.Lists.Add(ListTemplate.NumberArabicDot);

bullet = "BulletArabicPeriod";

}

break;

case Aspose.Slides.NumberedBulletStyle.BulletArabicParenRight:

if (bullet == "" || bullet != "BulletArabicParenRight")

{

builder.ParagraphFormat.ClearFormatting();

builder.ListFormat.List = builder.Document.Lists.Add(ListTemplate.NumberArabicParenthesis);

bullet = "BulletArabicParenRight";

}

break;

case Aspose.Slides.NumberedBulletStyle.BulletAlphaLCParenRight:

if (bullet == "" || bullet != "BulletAlphaLCParenRight")

{

builder.ParagraphFormat.ClearFormatting();

builder.ListFormat.List = builder.Document.Lists.Add(ListTemplate.NumberLowercaseLetterParenthesis);

bullet = "BulletAlphaLCParenRight";

}

break;

case Aspose.Slides.NumberedBulletStyle.BulletRomanUCPeriod:

if (bullet == "" || bullet != "BulletRomanUCPeriod")

{

builder.ParagraphFormat.ClearFormatting();

builder.ListFormat.List = builder.Document.Lists.Add(ListTemplate.NumberUppercaseRomanDot);

bullet = "BulletRomanUCPeriod";

}

break;

case Aspose.Slides.NumberedBulletStyle.BulletRomanLCPeriod:

if (bullet == "" || bullet != "BulletRomanLCPeriod")

{

builder.ParagraphFormat.ClearFormatting();

builder.ListFormat.List = builder.Document.Lists.Add(ListTemplate.NumberLowercaseRomanDot);

bullet = "BulletRomanLCPeriod";

}

break;

case Aspose.Slides.NumberedBulletStyle.BulletAlphaUCPeriod:

if (bullet == "" || bullet != "BulletAlphaUCPeriod")

{

builder.ParagraphFormat.ClearFormatting();

builder.ListFormat.List = builder.Document.Lists.Add(ListTemplate.NumberUppercaseLetterDot);

bullet = "BulletAlphaUCPeriod";

}

break;

case Aspose.Slides.NumberedBulletStyle.BulletAlphaLCPeriod:

if (bullet == "" || bullet != "BulletAlphaLCPeriod")

{

builder.ParagraphFormat.ClearFormatting();

builder.ListFormat.List = builder.Document.Lists.Add(ListTemplate.NumberLowercaseLetterDot);

bullet = "BulletAlphaLCPeriod";

}

break;

}

}


Hi,

Thanks for your updates. I have tried the attached code with the sample file . The output is not same as Input. Please find the attached input PPT and output PDF.

Please help me to resolve the issue. Attached sample code.

Thanks,

Hi Ponraj,


Thanks for your inquiry. In your shared PPT file, you have used the bullets list at differnet level that is the reason you are getting incorrect output. I am working over your query and will update you asap.

Hi

Any updates for me on this?

Thanks,

Hi Ponraj,

Thanks for your inquiry. I have modified the code according to the new requirements (bullets with different level/Numbered and Symbol). Please see the complete code for Numbered bullets in attachment.

Please note that Microsoft Word and Microsoft PowerPoint documents are completely different file formats. So, it is hard to achieve exact requirements with 100% fidelity. Aspose.Words do not provide the functionality to export PPT notes into Aspose.Words DOM. The code shared in this thread is an indirect way to render PPT notes into Pdf. Please go through the attached code and get an idea how to read bullet list from PPT file and render it to Pdf by using Aspose.Words and Aspose.Slides. You may modify the code according to your requirements. For Symbol bullet, please modify the method SetSymbolBullet method same as SetNumberedBullet2 method.

Please read following documentation links for your kind reference.

Hi,

Thanks for your code. It is working fine but not 100% as you said.

I have a query:

I have a PPT/PPTX file.Is it possible to copy/move the entire speaker notes of a specific slide into a new slide with the actual formatting like bullets,underline etc in the same file/new file.

If so, is it possible to find whether speaker notes exceeds the size of the slide and is it possible to place the exceeding content in the new slide.

Please clarify. Also please guide to achieve my requirement.

Hi Ponraj,


Yes, you can copy the slide notes from one slide to another using Aspose.Slides by keeping formatting preserved. With the discussion going on in this thread you, I feel you are well aware now that there are certain properties that are defined on paragraph level and some are defined on portion level for presentation text. You need to apply the same principle by traversing through each shape inside notes slide and then accessing the text frame in the shapes till paragraph and portion levels. I have already shared the mechanism with you over this post link in this thread. You can follow this link to see how to add the new slide notes for a slide. I have shared a complete article in the documentation for copying paragraphs and portions in case of PPTX. You can copy the source slide notes paragraph to destination slide notes paragraph. This way you will be able to achieve the goal. I hope this information will be helpful to you in achieving the goal specified.

Many Thanks,

Thanks for your update.

Can you clarify the below doubt:

is it possible to find whether speaker notes exceeds the size of the slide and is it possible to place the exceeding content in the new slide.

Hi Ponraj,


I regret to share that it is not possible to identify that whether the text has exceeded slide size using Aspose.Slides. One need to implement his own logic in this regard to identify whether the text has spilled over the slide size. It depends on number of factors and one of most important of it is the font height. Please share if I may help you further in this regard.

Many Thanks,