Hi Christian,
TextFragment frag2 = new
TextFragment(“This
is invisible text.”);<o:p></o:p>
//Set text property - invisible
frag2.TextState.Invisible = true;
Please feel free to contact us for any further assistance.
Best Regards,
Hi Christophe,
//Create document with hidden text<o:p></o:p>
Aspose.Pdf.Document doc = new Aspose.Pdf.Document();
Page page = doc.Pages.Add();
TextFragment frag1 = new TextFragment("This is common text.");
TextFragment frag2 = new TextFragment("This is invisible text.");
//Set text property - invisible
frag2.TextState.Invisible = true;
page.Paragraphs.Add(frag1);
page.Paragraphs.Add(frag2);
doc.Save(myDir + "39400_out.pdf");
doc.Dispose();
//Search text in the document
doc = new Aspose.Pdf.Document(myDir + "39400_out.pdf");
TextFragmentAbsorber absorber = new TextFragmentAbsorber();
absorber.Visit(doc.Pages[1]);
foreach (TextFragment fragment in absorber.TextFragments)
{
//Do something with fragments
Console.WriteLine("Text '{0}' on pos {1} invisibility: {2} ",
fragment.Text, fragment.Position.ToString(), fragment.TextState.Invisible);
}
doc.Dispose();
Please feel free to contact us for any further assistance.
Best Regards,
Hi Tilal,
Hi Christophe,
The issues you have found earlier (filed as PDFNEWNET-39400) have been fixed in Aspose.Pdf for .NET 11.4.0.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.