[scribus] Importing Pages with Text Frame Chain
Matt Miller
matt.miller at fastmail.com
Wed Apr 20 18:40:04 UTC 2022
On Wed, Apr 20, 2022, at 08:43, Matt Miller wrote:
> On Tue, Apr 19, 2022, at 13:12, Craig Bradney wrote:
>> Hi Matt
>>
>> I am not sure what you are trying to achieve however I don’t think we
>> have built the scripter functions to support this. I think it exist in
>> the GUI as we have the menu item: Item, Text Frame Links, Unlink and
>> break chain.
>
> In 1.5.8 and 1.5.9svn I see "Item | Text Frame Links | Unlink Text
> Frames and Cut Text," but I'm not sure what that does.
I looks like this does do what I'm looking for. Thanks. Not sure why I didn't see that when I tried it earlier.
> I tried it once,
> and I didn't see that it did what I was hoping. I guess what I was
> hoping for is to remove or break a text frame chain without disturbing
> the placement of the text. In other words, can I take advantage of a
> text frame chain to layout a long piece of text across multiple pages
> and get it looking just right, but then after that, when editing is
> done, can I convert the document to a chain-free document where the
> text is fixed in each frame? If "Unlink Text Frames and Cut Text" is
> supposed to do that, then I would be interested in spending some time
> learning how to help get that functionality into the scripter.
>
> Note that I've haven't compiled trunk since it went to QT6.
>
> As far as my overall goal with all this, my use case is maintaining
> collections of documents. Mainly I'm building versions of each of the
> sixty-six books of the Bible in multiple page sizes and point sizes.
> Then, for each page size and point size, I have a single large document
> that collects all sixty-six books into a single Bible. There's no
> change of page layout when the individual books are collected into the
> Bible. Pages from the individual books are copied exactly into place.
> But, after a Bible has been created, my system does support editing of
> certain aspects of the individual books, and these edits need to then
> make it into the associated Bible. Regenerating the entire Bible can
> take a long time, so was trying to just replace individual pages. I
> have this page-level replacement working for the Bible PDFs (with the
> help of pdftk), but not yet for SLAs. My thinking is that if the SLAs
> were chain-free, then importPage() would work as expected for this use
> case.
>
> Thanks for taking the time to think about this.
>
>
>> Frames are just a place (single or a chain) to present a
>> Story of Text. A cursor selection can be placed over a text and then
>> the selection copied, again these functions may only be partially
>> represented in Scripter. Maybe it will work. The cmdtext.cpp function
>> contains the code.
>>
Thanks for that. As a test it seems I was able to change the unlinkTextFrames() Scripter function to call the unlinkWithText() cpp function instead of the unlink() function. This looks promising.
>> Also, not sure if you mentioned earlier, but what version of Scribus
>> are you using?
>>
>> Thanks
>> Craig
>>
>> On 18/04/2022, 17:20, "Matt Miller" <matt.miller at fastmail.com> wrote:
>>
>> I'm still struggling with this, and it seems one reason is that I
>> want to take advantage of text frame chains to initialize documents
>> from text files, but when I'm editing existing documents the text frame
>> chain is often getting in the way. So, how would I get rid of the frame
>> chain after I've used it to help layout a new document?
>>
>> Thanks.
>>
>>
>> On Sat, Apr 16, 2022, at 11:22, Matt Miller wrote:
>> > I'm trying use importPage() to replace selected pages with pages
>> from
>> > another document, but the document I'm importing from uses a text
>> frame
>> > chain. It seems that since the text in the other document is
>> associated
>> > with a frame chain and not with any particular frame, I'm not
>> able to
>> > import a page from somewhere in the middle of the other document
>> and
>> > get in my new document the text that would show in that page of
>> the
>> > other doc. As far as I can tell from the XML it's not stored in
>> the
>> > .sla what text is in each frame, but all the text of the entire
>> chain
>> > is just stored as a single piece of text.
>> >
>> > I'm thinking of opening the other document, using getFrameText()
>> to
>> > copy from the desired page of the other document, then using
>> > insertText() to paste into my new document, But each page could
>> have
>> > multiple frames to copy and paste from, so that's more complex
>> than a
>> > page import. I'm wondering if there's some way to do this at the
>> page
>> > level, without looping over all the objects on a page.
>> >
>> > Thanks.
>> >
>> >
>> > --
>> >
>> > Matt Miller
>> > mailto:matt.miller at fastmail.com
>> >
>> > -------------- next part --------------
>> > An HTML attachment was scrubbed...
>> > URL:
>> >
>> <http://lists.scribus.net/pipermail/scribus/attachments/20220416/c247fb0a/attachment.htm>
>> > ___
>> > Scribus Mailing List: scribus at lists.scribus.net
>> > Edit your options or unsubscribe:
>> > http://lists.scribus.net/mailman/listinfo/scribus
>> > See also:
>> > http://wiki.scribus.net
>> > http://forums.scribus.net
>>
>> --
>>
>> Matt Miller
>> mailto:matt.miller at fastmail.com
>>
>> ___
>> Scribus Mailing List: scribus at lists.scribus.net
>> Edit your options or unsubscribe:
>> http://lists.scribus.net/mailman/listinfo/scribus
>> See also:
>> http://wiki.scribus.net
>> http://forums.scribus.net
>>
>>
>>
>> ___
>> Scribus Mailing List: scribus at lists.scribus.net
>> Edit your options or unsubscribe:
>> http://lists.scribus.net/mailman/listinfo/scribus
>> See also:
>> http://wiki.scribus.net
>> http://forums.scribus.net
>
> --
>
> Matt Miller
> mailto:matt.miller at fastmail.com
>
> ___
> Scribus Mailing List: scribus at lists.scribus.net
> Edit your options or unsubscribe:
> http://lists.scribus.net/mailman/listinfo/scribus
> See also:
> http://wiki.scribus.net
> http://forums.scribus.net
--
Matt Miller
mailto:matt.miller at fastmail.com
More information about the scribus
mailing list