Issue 1602 in pdfium: Retrieving the text color and syles of Bookmark.

9 views
Skip to first unread message

rajna… via monorail

unread,
Oct 23, 2020, 4:05:34 AM10/23/20
to pdfiu...@googlegroups.com
Status: Unconfirmed
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 1602 by rajna...@gmail.com: Retrieving the text color and syles of Bookmark.
https://bugs.chromium.org/p/pdfium/issues/detail?id=1602

So can you please suggest is there any API for retrieving the TextStyle and Color of the bookmark. We need to retrieve the data inside the (/C and /F) operator. please suggest any solution for this?

--
You received this message because:
1. The project was configured to send all issue notifications to this address

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

n… via monorail

unread,
Oct 30, 2020, 4:24:46 PM10/30/20
to pdfiu...@googlegroups.com
Updates:
Status: WontFix

Comment #1 on issue 1602 by ni...@chromium.org: Retrieving the text color and syles of Bookmark.
https://bugs.chromium.org/p/pdfium/issues/detail?id=1602#c1

Once you have a CPDF_Bookmark structure, you can get all entries of an outline(bookmark) according to their types indicated by Table 153 in the PDF 32000-2008 reference.

For example:
If you already get a CPDF_Bookmark pointer |bookmark|, you can get its dictionary by :
dict = bookmark->GetDict();

Key "/C" stands for an array type in the dictionary, so you can do:
CPDF_Array* color = dict->GetArrayFor("C");

Similarly, to get key "/F", which stands for an integer value if the text style, you can call:
int text_style = dict->GetIntegerFor("F");

Hope this helpful! If you have further questions, feel free to post in pdf...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages