Add text with underline style

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
rlcgm
User
Posts: 38
Joined: Thu Jun 10, 2021 11:00 am

Add text with underline style

Post by rlcgm »

Hello,

i want to add text on a page with the underline style, but i can not find any information about it.
Has anyone i idee, what i must do?
We use the core api.

Thanks.

Kind regards
User avatar
TrackerSupp-Daniel
Site Admin
Posts: 8436
Joined: Wed Jan 03, 2018 6:52 pm

Re: Add text with underline style

Post by TrackerSupp-Daniel »

Hello, rlcgm

Thank you for the excellent question, I am afraid that this inquiry goes beyond my personal knowledge, but I have asked our Dev team to take a look. Someone should come along and post here today or tomorrow to help with this.

Kind regards,
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
User avatar
Vasyl-Tracker Dev Team
Site Admin
Posts: 2352
Joined: Thu Jun 30, 2005 4:11 pm
Location: Canada

Re: Add text with underline style

Post by Vasyl-Tracker Dev Team »

Hi rlcgm.

Look to IPXC_ContentCreator::ShowTextBlock, here you may specify custom pCharFmt with TEF_Underline-effect. OR you may try another way: specify the DTF_RichText flag to the nFlags argument and then specify the XFA-structured text to the pText argument, like this:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<body xmlns="http://www.w3.org/1999/xhtml" xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/">
	<p>This is<span style="xfa-spacerun:yes"> </span><span style="text-decoration:underline">underlined</span> text</p>
</body>
(see https://www.pdfa.org/norm-refs/XFA-3_3.pdf, page 1187)

HTH.
Vasyl Yaremyn
Tracker Software Products
Project Developer

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
rlcgm
User
Posts: 38
Joined: Thu Jun 10, 2021 11:00 am

Re: Add text with underline style

Post by rlcgm »

Hi,
many thanks for this information, but i use the function "ShowTextLine".
Has this function a underline option?

Kind regards
User avatar
Vasyl-Tracker Dev Team
Site Admin
Posts: 2352
Joined: Thu Jun 30, 2005 4:11 pm
Location: Canada

Re: Add text with underline style

Post by Vasyl-Tracker Dev Team »

Unfortunately not.
Vasyl Yaremyn
Tracker Software Products
Project Developer

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Post Reply