Bug 696889 - **** Error: /BBox has zero width or height, which is not allowed.
Summary: **** Error: /BBox has zero width or height, which is not allowed.
Status: RESOLVED INVALID
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: PDF Writer (show other bugs)
Version: 9.19
Hardware: PC Windows NT
: P4 normal
Assignee: Ken Sharp
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-30 23:13 UTC by Paul
Modified: 2016-08-05 00:22 UTC (History)
1 user (show)

See Also:
Customer:
Word Size: ---


Attachments
File dont convert to PDFA (122.57 KB, application/pdf)
2016-08-04 15:29 UTC, William Gustavo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Paul 2016-06-30 23:13:14 UTC
Since the upgrade from version 8 to 9.19 Ghostscript seems to have been less tolerant to opening PDF files. We use Ghostscript to page count and merge multiple PDF documents sent in by customers.

After the upgrade we are seeing more complaints from Ghostscript about the following error:

**** Error: /BBox has zero width or height, which is not allowed.

I tried a PDF through both version 8 and 9.19, in 8 it manages to merge the document no problem, yet in 9.19 we get that error.

My question is this, what is going on here? if it can manipulate the PDF in version 8 with out any problems and generate a file, why can't it in 9?

Is this just Ghostscript being a little bit too picky? The fact the PDF opens in Adobe PDF reader says it all. In version 8 if Ghostscript had an issue with a PDF it usually wouldn't open up in Adobe reader and that makes sense, even if it would open up with Chromes build in reader. But on 9 if it has an issue it still opens up in Adobe, I can't even say to the customer check your PDF opens in Adobe.

Is this a bug?

Thanks

Paul.
Comment 1 Ken Sharp 2016-07-01 00:06:16 UTC
(In reply to Paul from comment #0)
> Since the upgrade from version 8 to 9.19 Ghostscript seems to have been less
> tolerant to opening PDF files.

Absolutely not, Ghostscript is more tolerant of broken, damaged or invalid PDF files than ever.


> I tried a PDF through both version 8 and 9.19, in 8 it manages to merge the
> document no problem, yet in 9.19 we get that error.

Ghostscript does not 'merge' documents, not now and not ever. For an explanation of how Ghostscript and the pdfwrite device work, please read the Overview in gs/docVectorDevices.htm.

While the effect from your point of view may be that multiple input files asre 'merged' it is important to understand that the final file is not a merging and that the content of the final file will bear little or no resembalnce to the content of any of the original input files.

 
> My question is this, what is going on here? if it can manipulate the PDF in
> version 8 with out any problems and generate a file, why can't it in 9?
> 
> Is this just Ghostscript being a little bit too picky? The fact the PDF
> opens in Adobe PDF reader says it all.

Actually no it doesn't. Acrobat is well known for opening (without complaint) file which are broken, or violate the specification, often quite alarmingly so.


> In version 8 if Ghostscript had an
> issue with a PDF it usually wouldn't open up in Adobe reader and that makes
> sense, even if it would open up with Chromes build in reader.

We have any number of example files which will not be rendered by old versions of Ghostscript but which will render with Acrobat. As well as a number of files which will render, at least partially, with Ghostscript but which Acrobat will not open.

Broken files are broken files, we are not Acrobat and cannot promise to deal with out-of-specification files the same way as another piece of software.


> But on 9 if it
> has an issue it still opens up in Adobe, I can't even say to the customer
> check your PDF opens in Adobe.

You never can and never could, Acrobat is *not* a good way to test a PDF file for conformance to the specification.

 
> Is this a bug?

You have not supplied an example file, how can we possibly tell ?
Comment 2 Ken Sharp 2016-07-01 00:09:22 UTC
From a quick perusal of the code I see only one place where this error can occur, if an annotation has an invliad height or width. In this case Ghostscript does the same as Acrobat and does not render the annotation, but continues to render the rest of the file unaffected.

So, are you complaining that Ghostscript raises an error, where Acrobat is silent ? Or are you complaining about an empty output, or what ?
Comment 3 Paul 2016-07-01 00:43:10 UTC
Hi Ken,

Thanks for getting back to me.

Firstly I know it doesn't merge but creates a new file based on the files you feed into it (as I wrote the code that uses Ghostscript), I just used merge as the description of the overall effect we get from it.

I can't provide the files, they are customer files so unacceptable for me to send them to you.

However, it might be my own script preventing the output because it has spotted the error, perhaps if I turn that off it might create the output still. Leave that with me.

Unfortunately I can't control if the file is well-formed, as they are from millions of different customers, I think I was just pointing out the fact I am seeing far more errors being reported than version 8. I guess your cracking down on non well-form pdfs :). And I used Adobe as an example as I believe it to be their language.

However thanks for the response, even though it did come over a tad rude with some attitude.

If I do spot anything further and can provide a file I will.

Best wishes

Paul.
Comment 4 Ken Sharp 2016-07-01 00:54:42 UTC
(In reply to Paul from comment #3)

> I can't provide the files, they are customer files so unacceptable for me to
> send them to you.

Well without an example file to look at, I don't see how we can help.


> Unfortunately I can't control if the file is well-formed, as they are from
> millions of different customers, I think I was just pointing out the fact I
> am seeing far more errors being reported than version 8. I guess your
> cracking down on non well-form pdfs :).

Not at all, over time we have added the ability to ignore many more illegal PDF files, you can check our Git repository to see that we 'handle' (ie don't throw an error and give up) many more types of broken PDF files than we used to.


> And I used Adobe as an example as I
> believe it to be their language.

It was (and essentially still is, though its an ISO spec these days) but Acrobat is not a conformance checker; it quite deliberately handles anything that looks remotely like it might be or once have been, a PDF file. And in general it doesn't even tell you if the file has a problem. You can use the Acrobat Preflight tool 'Report PDF syntax errors' which is better than Acrobat but still ignores a lot of problematic files.

We believe its important that if Ghostscript detects a problem with a file and *especially* if it ignores content as a result then it should generate a warning to the user, unlike that Acrobat approach of silently 'fixing' it. People tend to be unhappy if they print 10,000 copies of a leaflet only to discover that the customer's logo got dropped because there was a problem with the PDF file......


If you still believe there's a problem you can reopen this bug report, but you will need to supply us with an example to look at.
Comment 5 William Gustavo 2016-08-04 15:29:49 UTC
Created attachment 12806 [details]
File dont convert to PDFA

I am trying to convert the attached file to PDF/A but occurs the following message :
** Error: /BBox has zero width or height, wich not allowed Output may be incorrect

using the version 9.19 of GhostScritp.
Comment 6 Ken Sharp 2016-08-05 00:22:27 UTC
(In reply to William Gustavo from comment #5)
> Created attachment 12806 [details]
> File dont convert to PDFA
> 
> I am trying to convert the attached file to PDF/A but occurs the following
> message :
> ** Error: /BBox has zero width or height, wich not allowed Output may be
> incorrect
> 
> using the version 9.19 of GhostScritp.

Please don't add 'me too' comments to existing bugs. If you think you have found a bug, then open a bug report. That way you won't have to add yourself to the CC list either, as the owner you get email copies of the thread.

Note that although this is an error (the error will be in the original PDF file) the interpreter should carry on and complete the creation of a new PDF file. If this is not the case then you can add that information to the new bug report.

Please do not add further comments to this closed report.