ShowTextBlock strips out spaces in strings

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

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Sean - Tracker, Chris - Tracker Supp, 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: 266
Joined: Tue Jul 07, 2015 3:30 pm

ShowTextBlock strips out spaces in strings

Post by whoit » Mon Jan 07, 2019 5:30 pm

Hi -

We've got a big problem with ShowTextBlock stripping out spaces from within strings.

For example, if I use the string "Hello Goodbye",
(Hello separated with multiple spaces - doesn't even show up in this Forum!!!!)

it shows up on my document as: "Hello Goodbye".

This a real issue for our clients.

We're using: PDF Core Version: x86 7.0.326.0

Please tell me that there is a fix for this.....

Thanks.

User avatar
Sasha - Tracker Dev Team
User
Posts: 3768
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: ShowTextBlock strips out spaces in strings

Post by Sasha - Tracker Dev Team » Tue Jan 08, 2019 7:02 am

Hello Wayne,

Please open the CoreAPIDemo application's sample number "1.4 Add text to the center of the first page" (the AddTextToThePageCenter method) and try adding spaces to the "Centered Text" string - from what I see, everything worked as it should.

Cheers,
Alex
Join us at Google+:
https://plus.google.com/+PDFXChangeEditorTS
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ

whoit
User
Posts: 266
Joined: Tue Jul 07, 2015 3:30 pm

Re: ShowTextBlock strips out spaces in strings

Post by whoit » Tue Jan 08, 2019 1:44 pm

Hi Alex -

I tried your sample, but you are only using plain text.

I am using RichText
(uint)PXC_DrawTextFlags.DTF_RichText;

(Sorry I didn't mention that in the first post)

User avatar
Sasha - Tracker Dev Team
User
Posts: 3768
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: ShowTextBlock strips out spaces in strings

Post by Sasha - Tracker Dev Team » Wed Jan 09, 2019 8:16 am

Hello Wayne,

Thought so. Well, this is a correct behavior of the XFA format - to preserve spaces, you will have to use the the "xfa-spacerun:yes" style, as described here:
http://www.verydoc.com/documents/pdf-xfa/pg_0949.htm

Cheers,
Alex
Join us at Google+:
https://plus.google.com/+PDFXChangeEditorTS
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ

whoit
User
Posts: 266
Joined: Tue Jul 07, 2015 3:30 pm

Re: ShowTextBlock strips out spaces in strings

Post by whoit » Wed Jan 09, 2019 1:53 pm

Hi Alex -

That fixes the issue - thanks!

One minor additional question though - your reply pointed me to the
XFA Doc v 2.4 - is that the correct version to reference?

I have a PDF with v3.3 from 2012....

Thanks Again,
Wayne

User avatar
Sasha - Tracker Dev Team
User
Posts: 3768
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: ShowTextBlock strips out spaces in strings

Post by Sasha - Tracker Dev Team » Wed Jan 09, 2019 2:03 pm

Hello Wayne,

The newer the better.

Cheers,
Alex
Join us at Google+:
https://plus.google.com/+PDFXChangeEditorTS
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ

whoit
User
Posts: 266
Joined: Tue Jul 07, 2015 3:30 pm

Re: ShowTextBlock strips out spaces in strings

Post by whoit » Wed Jan 09, 2019 2:10 pm

OK, thanks.

User avatar
Sasha - Tracker Dev Team
User
Posts: 3768
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: ShowTextBlock strips out spaces in strings

Post by Sasha - Tracker Dev Team » Fri Jan 11, 2019 1:01 pm

:)
Join us at Google+:
https://plus.google.com/+PDFXChangeEditorTS
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ

Post Reply