I try extract graphic and text objects from PDF-File, which has layers.
how can I find out which layer an object belongs?
thanks in advance for your answer
During content scanning through ContentScanner you can move up till you reach the (possibly) containing MarkedContent, checking whether its header's tag equals to PdfName.OC (which means it belongs to a layer, whose name is returned by the Properties property of the header).
Thanks for your help. But I have second question for this thema.
In my source code get I value of current PdfName. Now can I say, that one or other object there is in first, second or third etc.. layer
org.PDFClown.documents.contents.objects.ContentObject content = level.Current;
if (content is org.PDFClown.documents.contents.objects.MarkedContent)
org.PDFClown.objects.PdfName pn = ((content as org.PDFClown.documents.contents.objects.MarkedContent).Header.Operands as org.PDFClown.objects.PdfName);
///My routine – here I extract geometrical and text objects
Object of type org.PDFClown.documents.Document has Property Layer which contain layers. How can I find out which layer an _currentPdfName belongs?
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.