[FOP] Cannot add cropped pdf as fo:external-graphic

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[FOP] Cannot add cropped pdf as fo:external-graphic

John Brown
My original pdf (created by printing to PDF Creator (http://www.pdfforge.org/pdfcreator) works as an external graphic in test.fo. This PDF has 1-inch borders which I removed using Briss (http://briss.sourceforge.net/). The cropped PDF image is not displayed in test.pdf. I think that it is present but invisible because when I look at the document's properties (Fonts), I see two fonts but lorem_cropped.pdf has 1 font.

To reproduce:
<!-- BEGIN test.fo -->
<?xml version="1.0"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
  <fo:layout-master-set>
    <fo:simple-page-master master-name="A4-portrait" page-height="29.7cm" page-width="21.0cm" margin="2cm">
      <fo:region-body/>
    </fo:simple-page-master>
  </fo:layout-master-set>
  <fo:page-sequence master-reference="A4-portrait">
    <fo:flow flow-name="xsl-region-body">
      <fo:block>
            Hello, World!
      </fo:block>
      <fo:block>
        <fo:external-graphic src="lorem_cropped.pdf" /> <!-- External graphic here -->
      </fo:block>
    </fo:flow>
  </fo:page-sequence>
</fo:root>
<!-- END test.fo -->

lorem.pdf is a "Lorem ipsum" paragraph printed to PDF Creator on letter
 size paper.
lorem_cropped.pdf is lorem.pdf cropped to contain just the paragraph
with minimal whitespace.
test.pdf is the output of
C:\>fop test.fo test.pdf

I am using fop SVN r1768353 (2016-10-20 17:03:59 -0500) and the fop
PDF Images plugin from
https://dist.apache.org/repos/dist/dev/xmlgraphics/binaries/ on
Windows 10.

Regards,
John Brown.




---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

lorem.pdf (24K) Download Attachment
lorem_cropped.pdf (21K) Download Attachment
test.pdf (27K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

RE: [FOP] Cannot add cropped pdf as fo:external-graphic

Simon Steiner
Hi,

Can you report any bugs on jira https://issues.apache.org/jira/browse/FOP

Thanks

-----Original Message-----
From: John Brown [mailto:[hidden email]]
Sent: 06 November 2016 19:00
To: [hidden email]
Subject: [FOP] Cannot add cropped pdf as fo:external-graphic

My original pdf (created by printing to PDF Creator
(http://www.pdfforge.org/pdfcreator) works as an external graphic in
test.fo. This PDF has 1-inch borders which I removed using Briss
(http://briss.sourceforge.net/). The cropped PDF image is not displayed in
test.pdf. I think that it is present but invisible because when I look at
the document's properties (Fonts), I see two fonts but lorem_cropped.pdf has
1 font.

To reproduce:
<!-- BEGIN test.fo -->
<?xml version="1.0"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
  <fo:layout-master-set>
    <fo:simple-page-master master-name="A4-portrait" page-height="29.7cm"
page-width="21.0cm" margin="2cm">
      <fo:region-body/>
    </fo:simple-page-master>
  </fo:layout-master-set>
  <fo:page-sequence master-reference="A4-portrait">
    <fo:flow flow-name="xsl-region-body">
      <fo:block>
            Hello, World!
      </fo:block>
      <fo:block>
        <fo:external-graphic src="lorem_cropped.pdf" /> <!-- External
graphic here -->
      </fo:block>
    </fo:flow>
  </fo:page-sequence>
</fo:root>
<!-- END test.fo -->

lorem.pdf is a "Lorem ipsum" paragraph printed to PDF Creator on letter
size paper.
lorem_cropped.pdf is lorem.pdf cropped to contain just the paragraph with
minimal whitespace.
test.pdf is the output of
C:\>fop test.fo test.pdf

I am using fop SVN r1768353 (2016-10-20 17:03:59 -0500) and the fop PDF
Images plugin from
https://dist.apache.org/repos/dist/dev/xmlgraphics/binaries/ on Windows 10.

Regards,
John Brown.




---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [FOP] Cannot add cropped pdf as fo:external-graphic

John Brown
On Sunday, November 6, 2016 2:59 PM,Simon Steiner wrote:

> Hi,
>
> Can you report any bugs on jira https://issues.apache.org/jira/browse/FOP
>
> Thanks

https://issues.apache.org/jira/browse/FOP-2660

Regards,
John Brown.


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]