- Posts: 25
- Thank you received: 0
Microsoft Windows Phone 8.1 support ends (13 Jul 2017)
Microsoft has ended support for Windows Phone 8.1
Questions about Android development and PDF
Table of content problem
10 years 8 months ago #9165
by Gracanin
Table of content problem was created by Gracanin
Hi,
I'm having problems extracting TOC from PDF file. In my OnCreate method I'm trying to get outlines by using following code:
float top = document.GetPageHeight(0);
boolean ret = document.NewRootOutline("Root", 0, top);
if(ret)
{
Document.Outline ol = document.GetOutlines();
ol.AddChild("Child1", 0, top * 5 / 6);
Document.Outline ol1 = ol.GetChild();
ol1.AddNext("Child2", 0, top / 2);
}
Problem is that variable ret is always returning null... Do you have any suggestion how to solve this problem? Btw, I have professional licence.
I'm having problems extracting TOC from PDF file. In my OnCreate method I'm trying to get outlines by using following code:
float top = document.GetPageHeight(0);
boolean ret = document.NewRootOutline("Root", 0, top);
if(ret)
{
Document.Outline ol = document.GetOutlines();
ol.AddChild("Child1", 0, top * 5 / 6);
Document.Outline ol1 = ol.GetChild();
ol1.AddNext("Child2", 0, top / 2);
}
Problem is that variable ret is always returning null... Do you have any suggestion how to solve this problem? Btw, I have professional licence.
10 years 8 months ago #9168
by Davide
Replied by Davide on topic Table of content problem
Hi,
the problem is that in the onCreate() of the demo project the document is not yet open.
If you try your code after the PDFOpen() method it should return true and work properly.
the problem is that in the onCreate() of the demo project the document is not yet open.
If you try your code after the PDFOpen() method it should return true and work properly.
10 years 8 months ago #9169
by Gracanin
Replied by Gracanin on topic Table of content problem
Hi,
I tried to call it after PDFOpen() method, didn't work. Also, I tried to call it onButtonClick after PDF has opened, didn't work. Problem is always the same, document.NewRootOutline is returning false... Tried it on 3.4 and 3.5beta8 versions. Do you maybe have any other suggestions how to solve this?
P.S. PDF I'm testing on is showing TOC perfectly on iOS.
I tried to call it after PDFOpen() method, didn't work. Also, I tried to call it onButtonClick after PDF has opened, didn't work. Problem is always the same, document.NewRootOutline is returning false... Tried it on 3.4 and 3.5beta8 versions. Do you maybe have any other suggestions how to solve this?
P.S. PDF I'm testing on is showing TOC perfectly on iOS.
10 years 8 months ago #9170
by Davide
Replied by Davide on topic Table of content problem
Hi,
to use this method you need a Premium License.
to use this method you need a Premium License.
10 years 8 months ago #9171
by Gracanin
Replied by Gracanin on topic Table of content problem
Hi,
is there any other option to get TOC with professional licence? In iOS there is method rootOutline, does something similar exist on Android?
is there any other option to get TOC with professional licence? In iOS there is method rootOutline, does something similar exist on Android?
10 years 8 months ago #9172
by Davide
Replied by Davide on topic Table of content problem
Hi,
with your license you can read table of contents using these getters methods: www.radaeepdf.com/documentation/javadocs...ocument.Outline.html
With a Premium license you can manipulate the TOC: www.radaeepdf.com/ecommerce/technical-specification
with your license you can read table of contents using these getters methods: www.radaeepdf.com/documentation/javadocs...ocument.Outline.html
With a Premium license you can manipulate the TOC: www.radaeepdf.com/ecommerce/technical-specification
Time to create page: 0.431 seconds