Maximum "weight" of a Scribus file ?

Previous topic - Next topic

dragonfly

I will add a few tips, hopefully not taking you off course.

1. You might share notes with other creators of music scores.
Further into this (admittedly very long) thread ...
http://forums.scribus.net/index.php/topic,3042.0.html
it became clear that the author was using lilypond for creating music scores.

2. Lilypond can create SVG or other formats such as JPG. Import SVG into Scribus renderframe not imageframe.

3. Another tool ... Pandoc ...
https://pandoc.org/
allows PDF files to be concatenated.

pierruel

Thank you, utnik, dragonfly and a.l.e.
My source can export under .pdf format. I'll look for pdfsam.

I know what lilypond does but if I must learn how to write 27 minutes of music with it, it will take more time that I own.

When I bought my first computer, for 4-5 years it didn't master anything but command lines of MS-DOS. I'm a very old newbie, you know.
Quoteif it's true that it has been working in many similar cases on the same computer and now it does not, then there is little that can be said without seeing the files.
Of course it's true ! The existing Scribus made score weights more than one pound; else I would have sent it attached to an e mail.
As I said, my computer did it one or two years ago, why does it fail this time ? This seems like sort of an aporia. There is an example in the attachement (sorry, it's Microsoft Word) with an URL to a very long excursus.
Now let's see what pdfsam is.
Thank you everybody.
Pierre

[attachment deleted by admin]

a.l.e

yeah... but, now let's try to get to the goal.

can you please:

- create a zip file with all your .jpg and your .sla inside of it. (you just have to right click on the folder with all the file and run "compress".
- upload it to https://framadrop.org/
- share the link with me or any other user who dares to look at it via private message.

of course, joining the pdfs with pdfsam will probably work ok.  and -- if it works -- it's probably a better solution than composing the pdf with scribus.
for this specific case.

if you want to try that way. do it.
if it does not work, please send the link to the file : - )

pierruel

Hi,
My pdf files and the sla I was able to build are at:
https://framadrop.org/r/VcS-ITF-7N#a2Zrpmp8oQamVkdZ73cvHU5LUVGChnE1fALo8b5zMaE=
Perhaps the problem comes from other softs running while I import pictures into Scribus. I'll redo my initial export to png files and make a new try.
What that old Windows bike did once will be done again, by Jove !
Good evening
Pierre

pierruel

Good evening,
No benefit with .png files. Windows file manager shows that my .png files contain staves and notes (my notation soft exports all right), but
- in my old picture editing software (Photostudio) the pictures can't be opened ("pictures format not supported or corrupted files")
- in Scribus no picture at all is imported, only the filename of the image
- in The Gimp they are imported as full black pages.
Another mystery isn'it ?
Regards
Pierre

a.l.e

#20
the images seem to work of with scribus 1.5
the same for 1.4.

i gave it a few tries and did not found any issue.

first, i had to amke sure that the image files are shown in order (eventually rename the files with -1.jpg, -2.jpg to -01.jpg, -02.jpg and so on... )
on windows the order might be more intelligent, but here i needed to add the missing zeros to the filenames to get the right order.

then, a few hints for the workflow

with 1.4

- in the file > document settings > tools > image frame set the image to automatically fill the frame (by default)
- with shift click create an image frame that fills the page
- load the image
- item > adjust frame to image
- page > snap to guide
- move the frame down to the bottom margin
- keep the properties palette open to see the position and size
- insert > frames and insert on all pages with the position and size you see in the properties palette
- remove the double you already did import
- drag each image from a file manager (this works for me on linux... i don't see why it should not work on windows...)

with scribus 1.5

- in the file > document settings > tools > image frame set the image to automatically fill the frame (by default)
- with shift click create an image frame that fills the page
- load the image
- item > adjust frame to image
- page > snap to guide
- move the frame down to the bottom margin
- copy the y position
- edit > master page
- page > manage guides and add an horizontal by pasting the y position of the item
- (do it for both master pages)
- close the editor
- delete the image frame
- zoom out to see many pages
- create an image frame on the first page
- open the load image dialog and select all the images in the directory
- click on the first image frame to fill it with the first image
- shift click on the lower part of each page (in the right order) to fill the part below the guide with the new image
- repeat for each empty page.

but, well, it's a lot of images.

i've created a simple python script that fills all frames with the files in a directory.
(based on https://wiki.scribus.net/canvas/Automatic_import_of_images_from_a_directory_using_a_script)


# - get the directory with all images
# - on the first page where you want the image create an image frame of the right size
# - select the empty image frame
# - run the script
# - the script copies the frame, then loads the first image in the exiting frame
# - then on other following pages paste the emtpy frame and load the next image
# - if there are not enough pages, create them to put all the images in the directory
import os
import sys
import scribus

if not scribus.haveDoc():
    scribus.messagebarText("No .")
    sys.exit()

if scribus.selectionCount() == 0:
    scribus.messagebarText("No frame selected.")
    sys.exit()

if scribus.selectionCount() > 1:
    scribus.messagebarText("Please select one single frame.")
    sys.exit()

master_frame = scribus.getSelectedObject()

x,y = scribus.getPosition()
width, height = scribus.getSize()


path = scribus.fileDialog("Pick a directory", scribus.getDocName(), isdir = True)
if path == '':
    scribus.messagebarText("No directory selected.")
   

extensions = ['jpg', 'png', 'tif']
filenames = [f for f in os.listdir(path)
              if any(f.endswith(ext) for ext in extensions)]

if not filenames:
    scribus.messagebarText("No image found.")
    sys.exit()

# sorted(filenames)
filenames.sort()

scribus.loadImage(filenames[0])
filenames = filenames[1:]

page = scribus.currentPage() + 1
n_pages = scribus.pageCount()

for filename in filenames:
    print(filename)
    if page <= n_pages:
        scribus.gotoPage(page)
    else:
        # TODO: currently this does not work if there are multiple master pages
        # (facing pages). you need to create all pages before loading the images.
        scribus.newPage(-1)
        scribus.gotoPage(scribus.pageCount())
    new_image = scribus.createImage(x, y, width, height)
    scribus.setScaleImageToFrame(True, True, new_image)
    scribus.loadImage(filename, new_image)
    page += 1


you can download it from

https://raw.githubusercontent.com/aoloe/scribus-script-repository/master/load-images/load-images.py

put it somewhere and run it with "script > execute scripts..."

it loads the 150+ images in about 20 seconds...

just one warning: the scripter currently cannot create new pages if you have a facing pages document (i have created a ticket for this: https://bugs.scribus.net/view.php?id=15515).

voilà, finally, this is the document with all images in there (created with my script):

https://framadrop.org/r/yg2gspfiwo#uAsPscgwnLSl/D87QYmqeieIwWkgAYoKhmjTxzdfZqw=

bonne chance!
a.l.e

pierruel

Thank you a.l.e,
I wasn't able to get your answer until this morning.
I went directly to "Notes.sla" and opened it. It contains 165 filenames ending with .jpg but no picture. My Scribus ver. is 1.4.7. I made sure that notes.sla and the 165 .jpg files are in the same directory. Perhaps they shouldn't ?
I've some practice with VBA for Excel but never with Python.
I'm sorry
I'd understand if you lose patience.
regards
Pierre

a.l.e

i've downloaded my own zip and opened with my scribus 1.4: i see all the images.

i also "manually" checked the full-ale.sla and it looks correct.

for what i can tell from here, it looks like a memory issue on your computer... but it's hard to say.
and if you cannot "correctly" open my .sla (and you're not doing a "stupid" error... something that can always happen...) the python script won't really help.

finally, here is the pdf i can generate from my .sla:

https://framadrop.org/r/ZbYdHIOswR#Oe97lk69FUunFOVkIm/OxGgxmfAJo4Lk03E5sZ7fPW8=

we both live in the same small country, but -- probably -- as much as it is possible, so i cannot take a train and come over to see what's happening on your computer...


pierruel

Thank you a.l.e.
Your pdf is splendid.
I have only two regrets.
I did'nt get the answer to my question (why some years ago and now no more ?)
I can't add "têtières" changing at each part and a "Contents" page (têtières are these small lines of text at the top repeating on each page the title of the book and the number of the chapter).
My RAM is 8 Go, it should be enough, isn't it ?
I'll try to finish the job in two volumes of about 80 pages each. I don't know if Scribus can put page numbers beginning on a specific number like 85, I'll see.
Thank you for everything and thank you to dragonfly and utnik too.
Regards
Pierre
P.S. a.l.e don't take the train but you don't need to do so. You can handle with my PC without standing up from your chair. If you feel like. But wait some time, I have to work on my solution.

a.l.e

the answer to your question

"""
I did'nt get the answer to my question (why some years ago and now no more ?)
"""

was a bit hidden and was not a real answer:

no idea.
from what i can tell it looks like a memory (RAM) issue... except if you did a "stupid" error (and stupid errors do also happen to the best ones!).
it's hard to say from here why your scribus cannot manage your images anymore.
my computer with my scribus did manage it... so the issue does not seem to be related to scribus or the images.

finally, if you provide me a .sla  with the master pages correctly setup (page numbers, headers...) and one page with a big image frame for the notes, i can easily send you a pdf with all the note sheets in there!

pierruel

Hi!
In the meantime I tried the solution I was talking about: to divide my score into two parts of about 80 pages each. The first part existed, I just had to cut pages after the 79th.
In the second part I was able to import more than 50 pictures without any problem. I was stopped because the rest weren't "détourées" (cut around in order to eliminate too wide margins with irrelevant texts) and I didn't feel like doing it tonight.
The remaining problem is that in part 2 pages are numbered from 1, instead of from 80. Shall I number them manually ? I thought about writing a small script on the theme "write here the page number + 79" but Python isn't my cup of tea, alas.
Well, I have not much skills but I have time to do things manually, everything ok.
Have a fine day tomorrow
Pierre

a.l.e

- File > Document Setup.
- Activate the "Sections" section.
- Set the "Start" value for the "main" section.



[attachment deleted by admin]

pierruel

Marvelous. Seems so easy when you reply.
Many thanks.
regards
P.