[ 
https://issues.apache.org/jira/browse/PDFBOX-1442?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13888954#comment-13888954
 ] 

Tilman Hausherr edited comment on PDFBOX-1442 at 2/2/14 3:56 PM:
-----------------------------------------------------------------

A possible clue? 
While searching for problems with a different file (ch14.pdf) I noticed that 
the shading parameters were always the same. Here's an output for this file:
{code}
PDShadingResources:296 - new PDShadingTypeShading: 
org.apache.pdfbox.pdmodel.graphics.shading.PDShadingType2@528f1577
PDShadingResources:297 - new 
PDShadingTypeCOSDictionary{(COSName{Coords}:COSArray{[COSInt{0}, COSInt{240}, 
COSInt{0}, COSInt{240}]}) (COSName{ColorSpace}:COSName{DeviceRGB}) 
(COSName{ShadingType}:COSInt{2}) (COSName{Extend}:COSArray{[true, true]}) 
(COSName{Function}:COSDictionary{(COSName{Domain}:COSArray{[COSInt{0}, 
COSInt{1}]}) (COSName{FunctionType}:COSInt{2}) (COSName{N}:COSInt{1}) 
(COSName{C1}:COSArray{[COSInt{1}, COSInt{1}, COSInt{1}]}) 
(COSName{C0}:COSArray{[COSInt{1}, COSInt{1}, COSInt{1}]}) }) }
PDShadingResources:296 - new PDShadingTypeShading: 
org.apache.pdfbox.pdmodel.graphics.shading.PDShadingType2@5a4bb836
PDShadingResources:297 - new 
PDShadingTypeCOSDictionary{(COSName{Coords}:COSArray{[COSInt{0}, COSInt{240}, 
COSInt{0}, COSInt{240}]}) (COSName{ColorSpace}:COSName{DeviceRGB}) 
(COSName{ShadingType}:COSInt{2}) (COSName{Extend}:COSArray{[true, true]}) 
(COSName{Function}:COSDictionary{(COSName{Domain}:COSArray{[COSInt{0}, 
COSInt{1}]}) (COSName{FunctionType}:COSInt{2}) (COSName{N}:COSInt{1}) 
(COSName{C1}:COSArray{[COSInt{1}, COSInt{1}, COSInt{1}]}) 
(COSName{C0}:COSArray{[COSInt{1}, COSInt{1}, COSInt{1}]}) }) }
PDShadingResources:296 - new PDShadingTypeShading: 
org.apache.pdfbox.pdmodel.graphics.shading.PDShadingType2@48a5598d
PDShadingResources:297 - new 
PDShadingTypeCOSDictionary{(COSName{Coords}:COSArray{[COSInt{0}, COSInt{240}, 
COSInt{0}, COSInt{240}]}) (COSName{ColorSpace}:COSName{DeviceRGB}) 
(COSName{ShadingType}:COSInt{2}) (COSName{Extend}:COSArray{[true, true]}) 
(COSName{Function}:COSDictionary{(COSName{Domain}:COSArray{[COSInt{0}, 
COSInt{1}]}) (COSName{FunctionType}:COSInt{2}) (COSName{N}:COSInt{1}) 
(COSName{C1}:COSArray{[COSInt{1}, COSInt{1}, COSInt{1}]}) 
(COSName{C0}:COSArray{[COSInt{1}, COSInt{1}, COSInt{1}]}) }) }
{code}

So new PDShadingTypeShading() is called only 3 times for this file, although 
there are 66 shading objects in the PDF.

Same observation for the files RGBCUBE.pdf and FUNSH01.pdf, files to be found 
in PDFBOX-615.


was (Author: tilman):
A possible clue? 
While searching for problems with a different file (ch14.pdf) I noticed that 
the shading parameters were always the same. Here's an output for this file:
{code}
PDShadingResources:296 - new PDShadingTypeShading: 
org.apache.pdfbox.pdmodel.graphics.shading.PDShadingType2@528f1577
PDShadingResources:297 - new 
PDShadingTypeCOSDictionary{(COSName{Coords}:COSArray{[COSInt{0}, COSInt{240}, 
COSInt{0}, COSInt{240}]}) (COSName{ColorSpace}:COSName{DeviceRGB}) 
(COSName{ShadingType}:COSInt{2}) (COSName{Extend}:COSArray{[true, true]}) 
(COSName{Function}:COSDictionary{(COSName{Domain}:COSArray{[COSInt{0}, 
COSInt{1}]}) (COSName{FunctionType}:COSInt{2}) (COSName{N}:COSInt{1}) 
(COSName{C1}:COSArray{[COSInt{1}, COSInt{1}, COSInt{1}]}) 
(COSName{C0}:COSArray{[COSInt{1}, COSInt{1}, COSInt{1}]}) }) }
PDShadingResources:296 - new PDShadingTypeShading: 
org.apache.pdfbox.pdmodel.graphics.shading.PDShadingType2@5a4bb836
PDShadingResources:297 - new 
PDShadingTypeCOSDictionary{(COSName{Coords}:COSArray{[COSInt{0}, COSInt{240}, 
COSInt{0}, COSInt{240}]}) (COSName{ColorSpace}:COSName{DeviceRGB}) 
(COSName{ShadingType}:COSInt{2}) (COSName{Extend}:COSArray{[true, true]}) 
(COSName{Function}:COSDictionary{(COSName{Domain}:COSArray{[COSInt{0}, 
COSInt{1}]}) (COSName{FunctionType}:COSInt{2}) (COSName{N}:COSInt{1}) 
(COSName{C1}:COSArray{[COSInt{1}, COSInt{1}, COSInt{1}]}) 
(COSName{C0}:COSArray{[COSInt{1}, COSInt{1}, COSInt{1}]}) }) }
PDShadingResources:296 - new PDShadingTypeShading: 
org.apache.pdfbox.pdmodel.graphics.shading.PDShadingType2@48a5598d
PDShadingResources:297 - new 
PDShadingTypeCOSDictionary{(COSName{Coords}:COSArray{[COSInt{0}, COSInt{240}, 
COSInt{0}, COSInt{240}]}) (COSName{ColorSpace}:COSName{DeviceRGB}) 
(COSName{ShadingType}:COSInt{2}) (COSName{Extend}:COSArray{[true, true]}) 
(COSName{Function}:COSDictionary{(COSName{Domain}:COSArray{[COSInt{0}, 
COSInt{1}]}) (COSName{FunctionType}:COSInt{2}) (COSName{N}:COSInt{1}) 
(COSName{C1}:COSArray{[COSInt{1}, COSInt{1}, COSInt{1}]}) 
(COSName{C0}:COSArray{[COSInt{1}, COSInt{1}, COSInt{1}]}) }) }
{code}

So new PDShadingTypeShading() is called only 3 times for this file, although 
there are 66 shading objects in the PDF.

> bar chart converted from PDF is totally a black area.
> -----------------------------------------------------
>
>                 Key: PDFBOX-1442
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-1442
>             Project: PDFBox
>          Issue Type: Bug
>          Components: PDFReader
>    Affects Versions: 1.7.1
>            Reporter: James Zhou
>              Labels: shadingpattern
>         Attachments: clientfocus.PNG, clientfocus.pdf
>
>
> The bar charts converted from PDF is totally a black area. The code is as 
> following:
>                  
> PDFImageWriter imageWriter = new PDFImageWriter();
>                  boolean success = imageWriter.writeImage(document, 
> imageFormat, password,
>                          startPage, endPage, outputPrefix, imageType, 
> resolution);
>                  if (!success)
>                  {
>                        logger.error( "Error: no writer found for image format 
> '"
>                              + imageFormat + "'" );
>                      System.exit(1);
>    
>                  }
> I will attach the ppt and PNG files later



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to