Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Realm Works Forums > Realm Works Discussion
Register FAQ Community Today's Posts Search

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
DMG
Senior Member
 
Join Date: Jun 2007
Location: Queensland, Australia
Posts: 195

Old September 14th, 2016, 04:50 PM
Hi Folks,

I'm importing the Strange Aeons AP & thought I'd share my solution here for formatting text.

The biggest problem when copy & pasting text from the PDF's is that the line breaks are exactly as per the PDF. So when text is broken into multiple smaller lines to run around an image etc, pasting into RW maintains the line breaks.

So a (reasonably) simple solution I found was to paste the raw text into Visual Studio & let it "fix" the text.

Any modern version of Visual Studio should work for this (I'm using the 2015 Community edition).

1. Create a new Visual Basic Windows Forms project.
2. Add 2 RichTextBox controls & a Button.
3. Create a click event for the button.
4. The click event code:

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
RichTextBox2.Text = RichTextBox1.Text
End Sub

When you run the project, paste the raw text into RichTextBox1 & click the button. When you do that, the cleaned text will show in RichTextBox2.

You can then select all of the text in RichTextBox2 (Ctrl-A) & paste it into Realm Works & it should have removed all of those pesky line breaks.

It doesn't preserve bolded / italicised text etc, but that's easy to fix up in RW.

Hopefully somebody will get some use from what I've found. It's sure saving me a lot of time!

Cheers,
Jim.
DMG is offline   #1 Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 10:38 PM.


Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.