swftools-common
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Swftools-common] Problematic PDF: still badly balanced softmasks/transp


From: Benoit Beauséjour
Subject: [Swftools-common] Problematic PDF: still badly balanced softmasks/transparency groups
Date: Wed, 6 Jun 2012 13:39:00 -0400


Hi swftools list and Matthias!

I am converting a PDF page by page and received the following fatal error:

FATAL   Internal error: badly balanced softmasks/transparency groups

I know there has been a fix applied to previous versions of SWFTools to handle this case ; but I have a specific PDF file that contains a case that still triggers this error while converting to SWF. I am using swftools-0.9.1 for now but I get the same behaviour with 0.9.2.

I have attached the test PDF to this email. It contains 2 pages, the first one is causing the issue. 

I have tried to pin-point what was going on and have activated verbose mode in GFXOutputDev.cc , here is the output :

(pdf)  saveState 0x9cc34e0
(pdf)    saveState 0x9cc3778
(pdf)      update fillopaq 1.000000
(pdf)      update strokeopaq 1.000000
(pdf)      update filloverprint 0.000000
(pdf)      update strokeoverprint 0.000000
(pdf)      drawImage 31x31, colorMap, no maskColors, inline=0
(pdf)    restoreState 0x9cc3778
(pdf)    update fillopaq 1.000000
(pdf)    update strokeopaq 1.000000
(pdf)    update filloverprint 0.000000
(pdf)    update strokeoverprint 0.000000
(pdf)    saveState 0x9cc3778
(pdf)      saveState 0x9ccc620
(pdf)        update fillopaq 1.000000
(pdf)        update strokeopaq 1.000000
(pdf)        update filloverprint 0.000000
(pdf)        update strokeoverprint 0.000000
(pdf)        saveState 0x9cccb50
(pdf)          beginTransparencyGroup device=0x9cc6570 77.4/795.8/616.4/580.8 DeviceGray isolated=0 knockout=0 forsoftmask=1
(pdf)          this->device now 0x9cccef8 (old: 0x9cc6570)
(pdf)            update fillopaq 1.000000
(pdf)            update strokeopaq 1.000000
(pdf)            update filloverprint 0.000000
(pdf)            update strokeoverprint 0.000000
(pdf)            saveState 0x9ccf770
(pdf)              fill ffffffff
(pdf)            restoreState 0x9ccf770
(pdf)            saveState 0x9ccf770
(pdf)              saveState 0x9ccfb88
(pdf)                drawImageMask 1688x4395, invert=0 inline=0
(pdf)              restoreState 0x9ccfb88
(pdf)            restoreState 0x9ccf770
(pdf)          endTransparencyGroup this->device now back to 0x9cc6570 (destroying 0x9cccef8)
(pdf)                               forsoftmask=1 recording=0x9cccef8/0x9cc4058
(pdf)        restoreState 0x9cccb50
(pdf)        setSoftMask 77.4/795.8/616.4/580.8 alpha=0 backdrop=000000
(pdf)        softmaskrecording is 0x9cc4058 (dev=0x9cd1ee0) at statepos 3
(pdf)        saveState 0x9cccb50
(pdf)          beginTransparencyGroup device=0x9cd1ee0 77.4/795.8/616.4/580.8  isolated=0 knockout=0 forsoftmask=0
(pdf)          this->device now 0x9ccd490 (old: 0x9cd1ee0)
(pdf)            update fillopaq 1.000000
(pdf)            update strokeopaq 1.000000
(pdf)            update filloverprint 0.000000
(pdf)            update strokeoverprint 0.000000
(pdf)            saveState 0x9ccd098
(pdf)              fill db1f26ff
(pdf)            restoreState 0x9ccd098
(pdf)            saveState 0x9ccd098
(pdf)              saveState 0x9ccff88
(pdf)                update fillopaq 1.000000
(pdf)                update strokeopaq 1.000000
(pdf)                update filloverprint 0.000000
(pdf)                update strokeoverprint 0.000000
(pdf)                drawImageMask 1688x4395, invert=0 inline=0
(pdf)              restoreState 0x9ccff88
(pdf)            restoreState 0x9ccd098
(pdf)            update fillopaq 0.750000
(pdf)            update strokeopaq 0.750000
(pdf)            update filloverprint 1.000000
(pdf)            update strokeoverprint 1.000000
(pdf)            saveState 0x9ccd098
(pdf)              update fillopaq 1.000000
(pdf)              update strokeopaq 1.000000
(pdf)              beginTransparencyGroup device=0x9ccd490 76.0/796.8/616.8/580.8 DeviceCMYK isolated=0 knockout=0 forsoftmask=1
(pdf)              this->device now 0x9cd0770 (old: 0x9ccd490)
(pdf)                saveState 0x9cca280
(pdf)                  update fillopaq 1.000000
(pdf)                  update strokeopaq 1.000000
(pdf)                  update filloverprint 1.000000
(pdf)                  update strokeoverprint 1.000000
(pdf)                  drawImage 301x752, colorMap, no maskColors, inline=0
(pdf)                restoreState 0x9cca280
(pdf)              endTransparencyGroup this->device now back to 0x9ccd490 (destroying 0x9cd0770)
(pdf)                                   forsoftmask=1 recording=0x9cd0770/0x9cd07b8
(pdf)            restoreState 0x9ccd098
(pdf)            setSoftMask 76.0/796.8/616.8/580.8 alpha=0 backdrop=ffffff
FATAL   Internal error: badly balanced softmasks/transparency groups

From this output I can clearly see what is going on ; there is an overlap between groups/softmasks , but I'm not sure how to correct the issue or how the device should react.

Obviously, using poly2bitmap/bitmap will make the conversion succeed but it's not an option we can activate as the quality of the rendered output is degraded in this mode.

Here is the content structure as seen by Acrobat for the problematic element in the page:

Inline image 1

Any help or pointers on how I could address or find a workaround for this issue would be much appreciated! 

I can provide more info or perform additionnal tests to help !

thanks!
-b

Attachment: softmasks-single.pdf
Description: Adobe PDF document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]