Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pagination support #134

Open
fklosowski opened this issue Apr 10, 2019 · 4 comments
Open

Pagination support #134

fklosowski opened this issue Apr 10, 2019 · 4 comments

Comments

@fklosowski
Copy link

It would be great if SG would support forcing next page feature.
This would enable users to generate catalogues of items where every category needs own page and in such circumstances, when there isn't enough items to fill full page.
Page indicator should be in CSV file, lets say there would be special column name, like %page or something.

%page, category, item, description
1, fruits, apple, sweet
2, vegetables, potato, fresh
2, vegetables, carrot, long

In such case, apple goes to page 1 and potato, carrot goes to page 2 instead there are for example two variables defined per page.

@berteh
Copy link
Owner

berteh commented Apr 14, 2019

I understand the idea... but really see no way to implement such a thing in the current SG, sorry. If you want to give it a try you're welcome.

As a weak workaround maybe you could add empty lines in your csv, to match the number of items per page ? empty text frames will be removed automatically by SG... but I agree this is not really satisfactory if you have a complex design with static text or content.

@fklosowski
Copy link
Author

fklosowski commented Apr 16, 2019

Well, thank you for your comment. And I want to say also thank you for your work.
Yes, this workaround could be fine but after testing, I think that the main disadvantage of the whole system is XML objects order on page and %SG_NEXT-RECORD%, which plays major role in generating listings. If there is complex design, placing all the elements in right sequence may be challenging.
For example I have template with five identical groups (quite simple thing: text, text, image) which I wanted to fill with rows progression of CSV data. I cloned these segments in Scribus and then tried to add %SG_NEXT-RECORD% somewhere to accomplish this task, but with no luck. So after all I had to delete all the cloned groups, add %SG_NEXT-RECORD% to the group I left and clone this updated group again to keep right order in XML which, I believe, is processed seqentially.
So, sometimes the flow control is tricky. If your template is not designed with some rules in mind, there is no way to fix it, maybe by hand in XML. That's why I imagine that moving some controls to CSV would improve abilities to manipulate data.

@berteh
Copy link
Owner

berteh commented Apr 20, 2019

I understand the ordering problem relating to xml. there is some hints provided in the wiki at:
https://github.com/berteh/ScribusGenerator/wiki#cards-deck-walkthrough

@arielmol
Copy link

Maybe this can be done by recusion. Generate a page with overflowing text hidden, generate many pages then merge all the single pages into a big pdf file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants