Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - Get Text only from specyfic Layer/ContentStream
  FAQ FAQ  Forum Search   Register Register  Login Login

Get Text only from specyfic Layer/ContentStream

 Post Reply Post Reply
Author
Message
mLipok View Drop Down
Senior Member
Senior Member
Avatar

Joined: 23 Apr 14
Location: Poland, Zabrze
Status: Offline
Points: 449
Post Options Post Options   Thanks (0) Thanks(0)   Quote mLipok Quote  Post ReplyReply Direct Link To This Post Topic: Get Text only from specyfic Layer/ContentStream
    Posted: 05 Oct 17 at 8:31PM
Normaly I'm using this :
$oQP.GetPageText($iExtractOptions)

to get Page Text.

But in some solutions I have PDF's with few ContentStream's / Layers

I know how to enumerate them, I use this functions:

Func _QPDF_GetOptionalContentGroupInformation(ByRef $oQP)
Local $iContentGorupCount = $oQP.OptionalContentGroupCount()
Local $aResult[$iContentGorupCount][4]
For $iGroup_idx = 1 To $iContentGorupCount
$aResult[$iGroup_idx - 1][0] = $oQP.GetOptionalContentGroupID($iGroup_idx)
$aResult[$iGroup_idx - 1][1] = $oQP.GetOptionalContentGroupName($aResult[$iGroup_idx - 1][0])
$aResult[$iGroup_idx - 1][2] = $oQP.GetOptionalContentGroupPrintable($aResult[$iGroup_idx - 1][0])
$aResult[$iGroup_idx - 1][3] = $oQP.GetOptionalContentGroupVisible($aResult[$iGroup_idx - 1][0])
Next
Return SetExtended($iContentGorupCount, $aResult)
EndFunc   ;==>_QPDF_GetOptionalContentGroupInformation


My question is how I can get text only from specyfic Layer/ContentStream ?

Regards,
mLipok



Edited by mLipok - 05 Oct 17 at 8:32PM
Here you can find description how to test my examples:
http://www.quickpdf.org/forum/forum_posts.asp?TID=2932&PID=12600&title=drawcapturedpagematrix-matrix-howto#12600
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 06 Oct 17 at 6:45PM
Hi :)

perhaps this is the link you're looking for:
http://www.quickpdf.org/forum/how-to-preview-selected-content-stream_topic2305.html
BTW: You can't delete text from a selected contentstream/layer ... but you're able to select and delete a contentstream with the textcontent on it.
If you have a pdf with four layers i would make four copies.
In the copies i'll delete the first layer... in the second copy the second layer and so on.
Then i would start textextraction from the four copies.
Then i would compare the four textcontent.

Cheers and a nice weekend to you :)
Ingo

Cheers,
Ingo

Back to Top
mLipok View Drop Down
Senior Member
Senior Member
Avatar

Joined: 23 Apr 14
Location: Poland, Zabrze
Status: Offline
Points: 449
Post Options Post Options   Thanks (0) Thanks(0)   Quote mLipok Quote  Post ReplyReply Direct Link To This Post Posted: 06 Oct 17 at 9:50PM
Your advice sounds reasonable.
I will follow that path.

Thanks and have a nice weekend, ...... unfortunately, in our country, so far it is raining.

Cheers,
mLipok
Here you can find description how to test my examples:
http://www.quickpdf.org/forum/forum_posts.asp?TID=2932&PID=12600&title=drawcapturedpagematrix-matrix-howto#12600
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store