problems with importing multiple pages

Previous topic - Next topic

garydale

I'm running Scribus 1.5.8 on a Debian/Bookworm system.

I'm putting together a 100 or so page document where some sections are created using Scribus Generator. In my particular case, I've just tried doing a page | import of a large (50+ pages) generated document (after touching it up in Scribus to remove the debris that the Generator leaves when fields are blank and resizing items to fit the actual space they take up).

I've noticed that Scribus hates it when the receiving document already contains the styles the imported document uses, so I made sure that the styles being imported are unique.

Unfortunately, while the import worked for the first couple of pages, after that, all the styles were replaced by "default paragraph style".

I've imported smaller documents that were generated the same way (up to a few pages) without this happening.

Have others encountered this issue?

AdmFubar

Per chance did you use Scribus Generator with earlier versions of Scribus?
There is a more recent version of located here:
https://github.com/berteh/ScribusGenerator/archive/python3.zip

for versions 1.5.6+
Using Scribus 1.6.1, openSUSE 15.6
Advanced hobbyist

garydale

Thanks, but I don't know if that's the issue. I was using the Python3 version already, all though it was from 2021. I downloaded the newest version and replaced my older copy. Then I removed the pages I'd previously imported and the styles that came with them then saved and closed the document.

I rechecked the template I was using and tried again. The file it produced looked OK, with all the correct styles on all of the pages. However when I re-opened the master document and imported the generated document, I got the same result.

The first imported page seems to have worked perfectly. However the second imported page added a (2) to all of the styles. The third imported page added a (3) to the first style it used then all the subsequent styles became "default paragraph style".

The added styles don't show up in the list of styles until I save the document, then close and reopen it.

I noticed that the styles actually all derived from a "default" so deleted that in the template then tried again. I forgot to remove the styles from the master document so this time only the first page imported properly (as the (4) version of the styles) then everything became "default paragraph style" again.

A template that I'd used earlier had multiple records on one page and it imported correctly. This one had one record per page...

garydale

In another experiment, I changed the layout to put two records on a page, using SG_Next_Record as the last element on the first set. Page import wouldn't properly import elements that extended past the page bottom, so I shrunk the template to fit two records on a page (vertically compressed a group of elements from 95mm to 53mm so I could easily reverse it after import).

This seems to have almost worked. The generated file looks good. After importing, the first imported page is again correct. The subsequent pages were added but the elements they contained were all on the second page - stacked on top of each other with the last page's elements on the top. I had two pages with elements followed by over 40 blank pages.

It appears that the styles have been correctly imported - the top record on the second page had the correct formatting, so I'm assuming the records below it also do. However that still doesn't help me as I've got no way of working with the imported pages. It would be easier for me to cut and paste from the generated file than to sort out what the page import has left me with.

garydale

Finally got it to work!

I used the same generated file but edited it first. I took the first few pages and cleaned them up, including restoring the vertical height. This required inserting some new pages to handle records that wouldn't fit in half page when expanded.

I'm not sure what exactly made it work this time but I suspect it was the adding of extra pages. In particular, the second page, which was where the trouble began in my previous attempt, was split into two page, with the first 2 records on page 1, the 3rd record on page 2 and the 4th record on page 3. This may circumvented the stacking glitch I had encountered.

So, it looks like Scribus' Page | import has at least three problems:
  • it doesn't handle styles properly when importing one record per page, and
  • it doesn't handle page imports properly when there are 2 records per page.
  • it doesn't handle page imports properly when elements aren't fully contained within a page.

I haven't tested for 3 records per page but I do have a successful case where there were more records per page.

a.l.e

hi garydale,

would you mind creating a ticket in https://bugs.scribus.net , with .sla files that show the faulty behaviors you're describing?