Problem with Tabs in ShowTextBlock

A forum for questions or concerns related to the PDF-XChange Core API SDK

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Tracker Supp-Stefan

Forum rules
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.

When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
Post Reply
whoit
User
Posts: 269
Joined: Tue Jul 07, 2015 3:30 pm

Problem with Tabs in ShowTextBlock

Post by whoit »

Hi -

I'm using Core API v7.0.326.0 and having issues when trying to use Tabs within my text.
I am successful with most XFA notation, but I keep getting errors when trying to use tabs.

For example, this works fine:

Code: Select all

<body><p style="font-family:'Arial'; font-size:8pt; line-height:normal;">Lifecycle :Exists</p></body>
EDIT:
When I use tabs in conjunction with other style elements, like color, I get issues.
For example, this code works:

Code: Select all

<body><p style="tab-interval:60pt; font-family:'Arial'; font-size:8pt;"><span style="xfa-tab-count:1" />Rev</p></body>>
Separately this works giving me red text:

Code: Select all

<body><p style="tab-interval:60pt; font-family:'Arial'; font-size:8pt;"><span style="color:#ff0000;">Rev</span></p></body>>
Note that in the tab example, the "span" is closed immediately:

Code: Select all

<span style="xfa-tab-count:1" />Rev
but with the color example, then "span" has a closing tag:

Code: Select all

<span style="color:#ff0000;">Rev</span>
Here's the problem - I can't combine the two!
If do this:

Code: Select all

<span style="xfa-tab-count:1; color:#ff0000;">Rev</span>
the word "Rev" does not show up.

If I do this:

Code: Select all

<span style="xfa-tab-count:1; color:#ff0000;" />Rev
the word "Rev" shows in black, not red as expected.


What is wrong?

Thanks.
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Problem with Tabs in ShowTextBlock

Post by Sasha - Tracker Dev Team »

Hello whoit,

The tab count span should be used separately from other style parameters (from what I remember). Also, in your last example, the closed span is being used, meaning that the color style won't be applied further. Try this:

Code: Select all

<span style="color:#ff0000;"><span style="xfa-tab-count:1;"/>Rev</span>

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
whoit
User
Posts: 269
Joined: Tue Jul 07, 2015 3:30 pm

Re: Problem with Tabs in ShowTextBlock

Post by whoit »

Hi Alex -

Ok, thanks - your suggestions worked. :D
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Problem with Tabs in ShowTextBlock

Post by Sasha - Tracker Dev Team »

:)
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Post Reply