View Issue Details

IDProjectCategoryView StatusLast Update
0013451ScribusPDFpublic2015-11-27 14:17
Reporterhtgoebel Assigned Tojghali  
PriorityhighSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Fixed in Version1.4.6.svn 
Summary0013451: Invalid PDF when specifying a non-existing page to export
DescriptionWhen specifying a non existing page-number in the PDF-Export dialog, the Written PDF is invalid:

- Okular simply says "can not open"
- pdf2pdf says:
    **** Warning: Invalid Page count.
    **** Warning: Invalid Page count.
    No pages will be processed (FirstPage > LastPage).

I set priority to "high", since this is very hard to find. I had to rebuild documents from scratch and compare the XML files to find this. A "normal" person will most probably not be able to find the cause.
Steps To ReproduceI prepared "Document-1-buggy.sla" which you can export to PDF immediately.

If you want to create such a buggy export from scratch:
- Open a new "one page" document
- Optionally: Add some simple text to have some content
- Export to PDF with option:
   - Choose pages: "2" (yes, two)
- Try to open the PDF with Okular or process with pdfp2df.
- Enjoy the error :-\
Additional InformationAttached find thee documents:

1. Document-1.sla - a neatly empty document exporting fine
2. Document-1-buggy.sla - the same document with page-range to export set to "2"
3. Document-1-buggy.pdf - the invalis PDF generated by exporting
   Document-1-buggy.sla

The only difference between the attached .slas is the page-range:

$ wdiff -3 Document-1.sla Document-1-buggy.sla
======================================================================
 [-rangeSel="0" rangeTxt=""-] {+rangeSel="1" rangeTxt="2"+}
======================================================================
TagsNo tags attached.
PatchNo

Relationships

related to 0011818 new [PATCH] No page range check in PDF export dialog 

Activities

htgoebel

2015-10-22 11:45

reporter  

Document-1.sla (14,034 bytes)

htgoebel

2015-10-22 11:45

reporter  

Document-1-buggy.sla (14,035 bytes)

htgoebel

2015-10-22 11:45

reporter  

Document-1-buggy.pdf (28,039 bytes)

htgoebel

2015-10-22 11:48

reporter   ~0036815

pdf2pdf is a simply script wrapping ghostscript. In the end-effect it does the following:

gs -q -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pdfwrite "-sOutputFile=foo.pdf" -c save pop -f Document-1-buggy.pdf

(I tested this command and it shows the same "Illegal page count" error.)

htgoebel

2015-10-22 14:06

reporter   ~0036819

I forgot: Scribus 1.5.0

htgoebel

2015-10-22 14:09

reporter   ~0036821

Thinking about this, I'd say, the pdf-expoter should check if the page-numbers are within range and if not, issue an error. The Export-Dialog should then show this error message.

JLuc

2015-10-22 16:00

developer   ~0036826

for page range check request and patch see 0011818

jghali

2015-10-22 17:50

administrator   ~0036838

Added a page range check to both 1.4.6.svn and 1.5.1.svn

Kunda

2015-10-22 18:06

updater   ~0036841

Fantastic!

JLuc

2015-10-22 18:37

developer   ~0036842

Tested OK.

Kunda

2015-11-27 14:17

updater   ~0037702

Fixed in r20486 by jean
Closing
please advise for 0011818

Issue History

Date Modified Username Field Change
2015-10-22 11:45 htgoebel New Issue
2015-10-22 11:45 htgoebel File Added: Document-1.sla
2015-10-22 11:45 htgoebel File Added: Document-1-buggy.sla
2015-10-22 11:45 htgoebel File Added: Document-1-buggy.pdf
2015-10-22 11:48 htgoebel Note Added: 0036815
2015-10-22 12:26 jghali Assigned To => jghali
2015-10-22 12:26 jghali Status new => assigned
2015-10-22 14:06 htgoebel Note Added: 0036819
2015-10-22 14:09 htgoebel Note Added: 0036821
2015-10-22 15:59 JLuc Relationship added related to 0011818
2015-10-22 16:00 JLuc Note Added: 0036826
2015-10-22 17:50 jghali Note Added: 0036838
2015-10-22 17:50 jghali Status assigned => resolved
2015-10-22 17:50 jghali Fixed in Version => 1.4.6.svn
2015-10-22 17:50 jghali Resolution open => fixed
2015-10-22 18:06 Kunda Note Added: 0036841
2015-10-22 18:37 JLuc Note Added: 0036842
2015-11-27 14:17 Kunda Note Added: 0037702
2015-11-27 14:17 Kunda Status resolved => closed