Bug 47296 - Referenced Fill URL not applied when PDF Encrypted
Summary: Referenced Fill URL not applied when PDF Encrypted
Status: NEW
Alias: None
Product: Fop - Now in Jira
Classification: Unclassified
Component: pdf (show other bugs)
Version: trunk
Hardware: Macintosh Mac OS X 10.4
: P3 normal
Target Milestone: ---
Assignee: fop-dev
Depends on:
Reported: 2009-06-02 01:50 UTC by Lea Thurman
Modified: 2012-04-07 01:51 UTC (History)
1 user (show)

Filled rectangle pattern not applied. (550 bytes, image/svg+xml)
2009-06-02 01:50 UTC, Lea Thurman
Image associated with SVG (1.83 KB, image/png)
2009-06-09 05:02 UTC, Lea Thurman

Note You need to log in before you can comment on or make changes to this bug.
Description Lea Thurman 2009-06-02 01:50:32 UTC
Created attachment 23740 [details]
Filled rectangle pattern not applied.

We are generating the following SVG and then using FOP to convert this into a PDF. The PDF is rendered correctly and the referenced pattern applied if we do not encrypt the PDF. As soon as we encrypt the PDF the pattern is not applied. In both cases the SVG is identical. 

<?xml version="1.0" encoding="utf-8"?> 
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> 
<svg xml:space="preserve" height="297mm" width="210mm"> 
    <pattern width="1" x="0" height="1" y="0" id="1219915834789" patternUnits="userSpaceOnUse"> 
      <image width="1" x="0" height="1" id="img1" y="0" xlink:href="file:/tmp/A12/89.png"/> 
  <rect fill="url(#1219915834789)" x="1.0in" width="1.0in" height="1.0in" y="1.0in" stroke="none"/> 

The code being used to encrypt the pdf is as follows: 

   new PDFEncryptionParams(null, null, false, true, true, true) 
Comment 1 Andreas L. Delmelle 2009-06-04 14:05:32 UTC
Hi Lea

Sorry for the rather late reply...

Can you also attach the referenced PNG? That would make it slightly easier for us to reproduce the issue using the attached SVG. Thanks!

Comment 2 Lea Thurman 2009-06-09 05:02:41 UTC
Created attachment 23780 [details]
Image associated with SVG

Images as requested by Andreas.
Comment 3 Lea Thurman 2009-06-11 08:09:22 UTC
Hi Andreas,

Any progress with regards this defect? If it is not being looked into then I will try to pick it up myself.

Many Thanks
Comment 4 Andreas L. Delmelle 2009-06-11 08:35:18 UTC
(In reply to comment #3)

Hi Lea

> Any progress with regards this defect? If it is not being looked into then I
> will try to pick it up myself.

No progress yet. So far, I have only been able to confirm that current FOP Trunk still exhibits the issue, but I'm not sure where to begin looking... Maybe something with org.apache.fop.pdf.PDFPattern, and the way it is handled in case of encryption. I notice the toPDF() method does not check for encryption, so unless this is automatically handled by the OutputStream that is passed in, that may explain why the viewer cannot parse the pattern correctly (?)


Comment 5 Glenn Adams 2012-04-07 01:42:02 UTC
resetting P2 open bugs to P3 pending further review