Using long text and PDF files

nir3112nir3112 Member, PRO Posts: 304

I'm trying to create an app with long text from pdf file. there is a way to show the text in gamesalad from the PDF without copy and paste all the text from the pdf to a table??


thanks![=

Comments

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited October 2020

    @nir3112

    Hi, my first thought is to import the text in an Excel (or other spreadsheet) cell as a csv file. The only problem there is that there is a maximum amount of characters in an Excel cell, of 32,767.

    However, this might be up to 8,000 words or more...so if your text is within that, then you could do it.

    You'd still have to copy and paste from the pdfs, but only once, as you should be able to select all the type on all the pages at once...

    If not, the only other way is to copy and paste from the pdf directly into the GS cell (max.amount of character permitting in a GS table cell, if there is one).

    GS won't bring in paragraph indents though (but will the line breaks). Not sure if they'd be there if imported from a csv file...

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • nir3112nir3112 Member, PRO Posts: 304


    Yes that what ill do... copy and paste ]=

    Its not a good solution but its the only one. the problem now is how to arrange 1000 pages inside GS '^_^

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited October 2020

    @nir3112

    Hi, yes, copy and paste is the only solution to get the text into your 1000 table cell rows in GS for sure, you're right. A bit of a pain and will take you a couple of hours or more, I guess, but then It's not too much of a problem to get the 1000 pages into GS.

    For getting the rows of text onto the pages, try the following (providing the pages are identical except for the text):

    --

    For your first page/scene, drag in a text area actor.

    Make a game integer called PageCounter and set it to 1

    In the prototype of your text area actor, put a Display Text behaviour, and in Text put:

    table CellValue(YourTable,PageCounter,1)

    Choose typeface, size, text positioning, etc.

    Now make an actors for left and right and put them in your scene. In the actor for left prototype, put:

    Rule: When touch is pressed

    Change Attribute game.PageCounter to game.PageCounter-1

    Change Scene to Previous Scene

    In the actor for right prototype, put:

    Rule: When touch is pressed

    Change Attribute game.PageCounter to game.PageCounter+1

    Change Scene to Next Scene

    --

    Now go to Home> Scenes, and duplicate your scene

    Go to the editor of your first scene and delete the left button (as this is the first page, so it's not needed there). Test to see if it works OK

    --

    If it works, go back to Home>Scenes and duplicate the other 998 scenes. (when you get 10 or more, you can select them all and option drag to copy in bulk, so shouldn't take too long to do)

    ---

    And that's it.

    Note: when setting up the first scene, make sure to add anything else that'll appear on all the other scenes before duplicating...

    Hope I've understood your problem correctly and it helps.

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • nir3112nir3112 Member, PRO Posts: 304
    edited October 2020

    Thanks!


    I have different idea for the text after finishing the table.

    The user need only small parts of the pdf when using the app so I'm going to separate the text into titles and every title will show itself when needed and all of that in 1 scene..

    I hope it will work, and the right and left buttons its a good idea thank you I will use it.

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited October 2020

    @nir3112

    You're welcome! Glad I helped in a small way at least. Best of luck with your project. :-)

    (Silly me, you could alter the code to appear in just in one scene with the buttons, as you say)

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

Sign In or Register to comment.