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

Free Support Forum - aspose.com

I cannot get any text or pictures from this PDF

I want to remove the watermark,but I cannot get any text or pictures from this PDF

test.pdf (280.4 KB)

@dayerqq

Can you please share the sample code snippet with which you are trying to remove the watermark? We will test the scenario in our environment and address it accordingly.

@asad.ali

var doc = new Aspose.Pdf.Document(“test.pdf”);
var absorber = new Aspose.Pdf.Text.ParagraphAbsorber();
absorber.Visit(doc);
foreach (var markup in absorber.PageMarkups)
{
foreach (var section in markup.Sections)
{
//markup.Sections.Count
}
}
var textFragmentAbsorber = new Aspose.Pdf.Text.TextFragmentAbsorber();
var page = doc.Pages[1];
page.Accept(textFragmentAbsorber);
foreach (var textFragment in textFragmentAbsorber.TextFragments)
{
//textFragmentAbsorber.TextFragments.Count
}
var extractor = new Aspose.Pdf.Facades.PdfExtractor();
extractor.BindPdf(“test.pdf”);
extractor.ExtractImage();
while (extractor.HasNextImage())
{
System.IO.MemoryStream pageStream = new System.IO.MemoryStream();
extractor.GetNextImage(pageStream, System.Drawing.Imaging.ImageFormat.Png);
}

I have used various methods, but I can’t get any text or pictures
https://textfragmentabsorber.textfragments.count/
Sorry, we were unable to generate a preview for this web page, because the server ‘textfragmentabsorber.textfragments.count’ could not be found. Instead of a preview, only a link will appear in your post. cry

https://markup.sections.count/
Sorry, we were unable to generate a preview for this web page, because the server ‘markup.sections.count’ could not be found. Instead of a preview, only a link will appear in your post. cry

//page.Annotations.Count;
//page.Artifacts.Count;
//page.Paragraphs.Count;
//page.Resources.Images.Count;
Always equal to 0

@dayerqq

We have checked the PDF document that you have shared and also tested the shared code snippet with 21.6 version of the API. The code is not extracting any content from PDF because your document does not contain any text or images. The content is actually drawn in the PDF. If you open the PDF in Adobe Reader and search for any text, it is also unable to find it.

We have already logged an investigation ticket to extract drawn objects from PDF documents. The ticket has been logged under the ID PDFNET-49585 which has been linked to this post as well so that you will receive notification as soon as it is resolved. Please be patient and spare us some time.