Cannot write file message while writing .pdf file

Previous topic - Next topic

John@Beardmore.org.uk

Windows 11
Scribus 1.6.2
Using default settings for scribus .pdf production.

I'm working on two reports, both around 100 pages and growing. Both contain a lot of photographs and diagrams.

Both have the same issue. It's not just my machine, a colleague has the same problem with these files on a different Windows system at another site.

When I try and export to PDF, it runs for a while, then stops with an error message of the form enclosed. Scribus does not crash, and I can go on working. There's over 76 gigabytes of free space on the disk. As a work around, I've been using 'microsoft print to pdf'. This works, and generates a 35 megabyte file. Just once, scribus export to pdf did work, but I can't replicate its working, and I don't know what was different that time.

Other scribus jobs which contain plenty of graphics, and never had this problem, still print without difficulty.

Is this a well known problem ?  Does anybody recognise it ?  Is there a work around ?  Any thoughts on how to diagnose ?

I don't have any special pdf requirements, but my users tell me that they can't copy and paste text out of the pdf files that microsoft generates, so this is an urgent problem, despite being able to generate pdf the microsoft way. They don't have any copy and paste problem with PDFs exported from Scribus.

If it helps to diagnose I can do a 'collect for output' and post a link to the project.

AdmFubar

Quote from: John@Beardmore.org.uk on Today at 12:28:38 AMThere's over 76 gigabytes of free space on the disk. As a work around, I've been using 
Which disk is this? the error message indicates 2 disks, C: and D:.. the issue seems to be on drive C: as it cannot write that particular image file. 
Using Scribus 1.5.8 & 1.6.3, 1.7.0 openSUSE 15.5
Advanced hobbyist

John@Beardmore.org.uk

The 76 gigabytes figure is the C: drive. D has 1.4 terabytes free.

Thanks, J/.

utnik

it could be an issue related to writing permissions or even a corrupt image file...

utnik

John@Beardmore.org.uk

OK, a bit more information on this one.

C:\Users\micro\AppData\Local\Temp contained 370 files with names of the form scribus_temp_??????.png

Many of these files are 94 bytes, and none were bigger than 5k.

Now I've moved those 370 files out of the way, both reports can generate PDFs using export→save as PDF.

No .png files are left in the directory after the successful production of a PDF file, so they seem to get cleaned up after a job that proceeds normally.

My suspicion is that if for some reason the PDF file creation doesn't happen successfully, temporary files get left behind which mess up the creation of temporary files during subsequent jobs.

I wonder if there is a fix where prior to exporting a PDF, scribus cleans out any old temporary files that might be there ?

This may not be the whole story though. I'm not sure if this would account for the problem that my colleague working on a different machine would have had. He had the problem with a fresh install of scribus and one of my reports being the first scribus file he'd ever opened.

Anyway, I've got my 'export→save to PDF' working again, but it would be interesting to know if others ever see the problem, and get to the bottom of the cause.

Thanks, J/.

Nermander

Isn't this a common issue that the dialog showing the location is showing the wrong folder? Try to navigate up and down in the folder tree to make sure you are saving in the right location.

(I would think that bug has been fixed a long time ago though, but it doesn't hurt to check.)

John@Beardmore.org.uk

Quote from: utnik on Today at 11:55:37 AMit could be an issue related to writing permissions or even a corrupt image file...

utnik

Windows was able to display the file as a small white rectangle or line; no errors reported. Probably not corrupted then.

Having moved the old temporary png files to a different directory, it worked and made a splendid PDF file, so the permissions seem to be right for writing new files.

Idon't know what the open() mode is but I wonder if swapping an O_CREAT to an O_TRUNC might fix the problem, but I'm not a coding expert these days the above may make clear.

Cheers, J/.


John@Beardmore.org.uk

Quote from: Nermander on Today at 03:26:59 PMIsn't this a common issue that the dialog showing the location is showing the wrong folder? Try to navigate up and down in the folder tree to make sure you are saving in the right location.

(I would think that bug has been fixed a long time ago though, but it doesn't hurt to check.)

When it worked, it wrote the file where expected. The immediate problem was resolved by moving the scribus_temp_*.png files out of C:\Users\micro\AppData\Local\Temp

I guess the real question is why were there bunch of scribus_temp_*.png files left behind, and when they are, why do those prevent subsequent 'export->save to PDF' operations ?

Thanks, J/.

Thanks, J/.