Re: fop-users@xmlgraphics.apache.org

2015-09-30 Thread Peter Coppens
See http://www.dpawson.co.uk/xsl/sect3/N8703.html 



http://www.w3.org/1999/XSL/Format;>









page 


 I would like to see page XX on top 







Peter

> On 30 Sep 2015, at 21:53, Franz de Copenhague  
> wrote:
> 
> It didn't help. It throws this exception: SEVERE: Invalid property value 
> encountered in initial-page-number="XX": 
> org.apache.fop.fo.expr.PropertyException
> 
> I wish could be an attribute similar to:
> 
>  page-number-style= "upper-roman">
> 
> Franz
> To: fop-users@xmlgraphics.apache.org 
> From: rsarg...@xmission.com 
> Date: Wed, 30 Sep 2015 13:35:26 -0600
> Subject: Re: fop-users@xmlgraphics.apache.org 
> 
> 
> Did you try
> initial-page-number="XX"
> ?
> 
> On 09/30/2015 01:34 PM, Franz de Copenhague wrote:
> This is my first question to the list.
> 
> I did try to google the way to have page numbers with roman numbers but I 
> couldn't figure it out.
> 
> Would you modify the example below to illustrate me how to achieve roman page 
> numbers?
> 
> 
> http://www.w3.org/1999/XSL/Format 
> ">
> 
>  page-width="21cm" margin-top="1cm" margin-bottom="2cm" margin-left="2.5cm" 
> margin-right="2.5cm">
> 
> 
> 
> 
> 
> 
> 
> page 
> 
> 
>  I would like to see page XX on top 
> 
> 
> 
> 
> 
> 
> Thanks,
> Franz 



Re: Rendering svg instream foreign object to pdf gives wrong result when svg contains dy on text

2015-04-20 Thread Peter Coppens
Hi Christoffer

Thanks for taking the time to look into this. Don’t think it is related to 
units, but I did notice that whenever I use a fop font (e.g. by making sure the 
font resolution fails and a default is used) as opposed to a macos one, it does 
seem to work.

So, seems font file/processing related

Peter

 On 19 Apr 2015, at 13:25, Christoffer Bruun cdbr...@flyingpigs.dk wrote:
 
 Forgot to cc you directly
 
 
  Videresendt meddelelse 
 Subject:  Re: Rendering svg instream foreign object to pdf gives wrong 
 result when svg contains dy on text
 Date: Sun, 19 Apr 2015 13:19:35 +0200
 From: Christoffer Bruun cdbr...@flyingpigs.dk mailto:cdbr...@flyingpigs.dk
 To:   fop-users@xmlgraphics.apache.org 
 mailto:fop-users@xmlgraphics.apache.org
 
 Hi Peter,
 
 Could it be some sort of unit confusion?
 
 You are using unit-less x and y attributes, but dy is given in px
 
 /Christoffer
 
 
 
 Den 15-04-2015 kl. 22:14 skrev Peter Coppens:
 Hello 
 
 I have a svg that has a text element positioned with a dy attribute. When 
 the svg is displayed in the browser or rendered to a png using batik, the dy 
 is taken into account, but when using fop to render to pdf it is not.
 
 Attached the fo file, the resulting pdf and the png as rendered by batik.
 
 Is there something wrong with the fo input or is the pdf transcoder not 
 support the dy attribute?
 
 All tips welcomed!
 
 Tx
 
 Peter
 
 
 
 
 
 
 
 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org 
 mailto:fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org 
 mailto:fop-users-h...@xmlgraphics.apache.org
 
 



Rendering svg instream foreign object to pdf gives wrong result when svg contains dy on text

2015-04-15 Thread Peter Coppens
Hello 

I have a svg that has a text element positioned with a dy attribute. When the 
svg is displayed in the browser or rendered to a png using batik, the dy is 
taken into account, but when using fop to render to pdf it is not.

Attached the fo file, the resulting pdf and the png as rendered by batik.

Is there something wrong with the fo input or is the pdf transcoder not support 
the dy attribute?

All tips welcomed!

Tx

Peter







dyissue.fo
Description: Binary data


dyissue.pdf
Description: Adobe PDF document

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org

Re: Multi threading problems with FOP 1.0

2011-11-23 Thread Peter Coppens
Hello

I have similar things but as far I can remember this was always related to svg 
as part of an fo stylesheet.

I should/could dive into the mail archives (and perhaps) bugzilla to refresh my 
memory, as I remember there were discussion on this, but perhaps you can 
indicate whether you are using svg at all in your fo?

Peter


On 23 Nov 2011, at 12:12, Klearchos Klearchou wrote:

 Dear FOP users,
 
 I am using the FOP version 1.0 under Windows x64.
 Lately I have integrated JPPF in order to regenerate my PDFs faster and I 
 experience the followings strange errors.
 
 For example inside the XSLT I place 8pt but the error in the console outputs 
 (pt8pt):
 [ERROR][org.apache.fop.fo.properties.PropertyMaker.convert(148)]: Unknown 
 length unit 'pt8pt'
 
 This kind of behaviour happens at other places as well:
 [ERROR][org.apache.fop.apps.FOUserAgent.processEvent(82)]: Invalid property 
 value encountered in color=whitewhite: 
 org.apache.fop.fo.expr.PropertyException: null:56:15: No conversion defined 
 whitewhite; property:'color' (See position 57:85)
 Only white at the XSLT.
 
 [ERROR][org.apache.fop.apps.FOUserAgent.processEvent(82)]: Invalid property 
 value encountered in background-color=#6777cf#6777cf: 
 org.apache.fop.fo.expr.PropertyException: null:56:15: No conversion defined 
 #6777cf#6777cf; property:'background-color' (See position 57:100)
 
 [ERROR][org.apache.fop.apps.FopFactory.resolveURI(755)]: Attempt to resolve 
 URI 'F:\JPF:\JPPF\Node1\resources\images\na_b.gif')' failed:
 Here the URI is given correctly at the XSLT processor: 
 F:\JPPF\Node1\resources\images
 
 These kind of errors continue.
 
 Any pointer would be really helpful.
 I am considering using the trunk version as well in order to close some other 
 reported and patched bugs of FOP 1.0
 
 Regards,
 Klearchos
 
 
 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
 


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: How to avoid vertical space between blocks containing images

2009-11-08 Thread Peter Coppens
Perhaps you find inspiration in

http://www.antennahouse.com/support/qa/QA/2005052701.html

Because fo:external-graphic is an inline element, it makes line area. The
default height of line area is 1.2em, so you should specify line-height=1
for the block.

However, even though line-height=1 is specified, a graphic is placed on
top of a baseline and there remains a space under the baseline as a result.
In order to avoid this, you should specify font-size=0pt, too.

Hth

Peter

 From: fopaddict rich...@uttner.de
 Reply-To: fop-users@xmlgraphics.apache.org
 Date: Sun, 8 Nov 2009 01:36:49 -0800 (PST)
 To: fop-users@xmlgraphics.apache.org
 Subject: How to avoid vertical space between blocks containing images
 
 
 My .fo code contains nothing but a sequence of images exactly fitting into
 page height (because page margins are defined accordingly):
 
 fo:block space-before=0mm space-after=0mm
 fo:external-graphic src=url(images/{...@picture}) /
 /fo:block
 
 When printing to the page, FOP 0.94 and 0.95 are inserting 2mm vertical
 space between each block. Only when I set space-after to -2mm, the output is
 as I would expect it normally (exactly no gap between images). Is there
 another way to keep FOP from adding space in general? If not: How do I know
 how much I have to subtract in order to get zero space?
 
 -- 
 View this message in context:
 http://old.nabble.com/How-to-avoid-vertical-space-between-blocks-containing-im
 ages-tp26252057p26252057.html
 Sent from the FOP - Users mailing list archive at Nabble.com.
 
 
 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
 



-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Fop.next release?

2009-09-22 Thread Peter Coppens
So what can the community do to make this happen?

Thanks

Peter


 From: spepp...@leverkruid.eu
 Reply-To: fop-users@xmlgraphics.apache.org
 Date: Mon, 21 Sep 2009 18:41:18 +0200
 To: fop-users@xmlgraphics.apache.org
 Subject: Re: Fop.next release?
 
 Quoting Peter Coppens pc.subscripti...@gmail.com:
 
 Fop fans,
 
 It seems the latest 'official¹ fop release (
 http://xmlgraphics.apache.org/fop/0.95/changes_0.95.html) is a over a year
 old
 
 I was wondering whether there are any plans to release a newer version.
 
 We plan to release a new version of our product and need support for some
 features currently only in trunk.
 
 I guess we could try to backport or rely on a trunk build but that does not
 seem ideal.
 
 Anyone any thoughts on this?
 
 We should make a release. We will make a release if someone has enough
 time to act as the release manager. I would very much like this to be
 the case, but it is difficult.
 
 Regards, Simon
 
 
 
 
 This message was sent using IMP, the Internet Messaging Program.
 
 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
 



-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Fop.next release?

2009-09-21 Thread Peter Coppens
Fop fans,

It seems the latest Œofficial¹ fop release (
http://xmlgraphics.apache.org/fop/0.95/changes_0.95.html) is a over a year
old

I was wondering whether there are any plans to release a newer version.

We plan to release a new version of our product and need support for some
features currently only in trunk.

I guess we could try to backport or rely on a trunk build but that does not
seem ideal.

Anyone any thoughts on this?

Thanks

Peter


Re: Using a PDF as an Image

2009-08-05 Thread Peter Coppens
You could try starting from
http://wiki.apache.org/xmlgraphics-fop/HowTo/EmbeddedPdf?highlight=%28pdf%29

Hth,

Peter



From: Steffanina, Jeff jeff.steffan...@marriott.com
Reply-To: fop-users@xmlgraphics.apache.org
Date: Wed, 5 Aug 2009 07:14:53 -0400
To: fop-users@xmlgraphics.apache.org
Subject: Using a PDF as an Image



I have a finished form that contains all my graphics.  It is a PDF.
I want to print it and add all the applicable data.   I have been doing this
with JPG files with great success.
I am getting the error: No ImagePreloader found

Here is my code: 
fo:block-container position=absolute top=.01in left=.1in
  fo:block space-after=.16in padding-top=0in padding-bottom=.16in
 margin-top=0in

fo:external-graphic src=url('/CY/JLS/CustForm.pdf')
 content-height=10.6in content-width=8.4in/

  /fo:block 
   /fo:block-container

I see the notes about using an SVG.   Is it possible to use a PDF for this
purpose? 
Is there one reference point where it clearly describes the process?






Jeff 




Re: URIResolver in combination with filenames with unicode characters fails - Problem in AbstractImageSessionContext#toFile?

2009-07-08 Thread Peter Coppens
Finally checked. The patch solves the issue.

Hope this helps and thanks,

Peter


 From: Peter Coppens pc.subscripti...@gmail.com
 Date: Tue, 07 Jul 2009 04:23:12 +0200
 To: fop-users@xmlgraphics.apache.org
 Conversation: URIResolver in combination with filenames with unicode
 characters fails - Problem in AbstractImageSessionContext#toFile?
 Subject: Re: URIResolver in combination with filenames with unicode characters
 fails - Problem in AbstractImageSessionContext#toFile?
 
 Have not checked. Still in my 'inbox'. Sorry for the delay. For now my wo does
 the job so it's less urgent for me. Will get to it asap.
 
 Peter
 
 
 From: Andreas Delmelle andreas.delme...@telenet.be
 Reply-To: fop-users@xmlgraphics.apache.org
 Date: Sun, 5 Jul 2009 21:07:13 +0200
 To: fop-users@xmlgraphics.apache.org
 Subject: Re: URIResolver in combination with filenames with unicode
 characters 
 fails - Problem in AbstractImageSessionContext#toFile?
 
 On 30 Jun 2009, at 12:35, Andreas Delmelle wrote:
 
 Hello Peter
 
 Just checking the status:
 
 On 30 Jun 2009, at 11:10, Peter Coppens wrote:
 What I found out debugging is that the A9C3 character is escaped as
 %A9%C3
 when the url is contructed but that in the toFile method %A9 and
 %C3 are
 interpreted as 2 different characters.
 
 Indeed, that already looked a bit suspicious to me, and may be the
 source of the issue.
 Seems more robust to use java.net.URLDecoder instead of re-inventing
 the light-bulb.
 
 I have attached a small patch for you to try out. Would be good if
 you could confirm this fixes the issue on your end.
 
 Have you been able to confirm this? If not, would it help if I
 provided you with a precompiled JAR for XG Commons including the
 changes in the patch (so that you can simply do a temporary swap in
 your test environment)?
 
 
 Thanks in advance!
 
 Andreas
 
 Andreas Delmelle
 mailto:andreas.delmelle.AT.telenet.be
 jabber: mandr...@jabber.org
 skype: adlm0608
 
 ---
 
 
 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
 



-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: URIResolver in combination with filenames with unicode characters fails - Problem in AbstractImageSessionContext#toFile?

2009-07-06 Thread Peter Coppens
Have not checked. Still in my 'inbox'. Sorry for the delay. For now my wo
does the job so it's less urgent for me. Will get to it asap.

Peter


 From: Andreas Delmelle andreas.delme...@telenet.be
 Reply-To: fop-users@xmlgraphics.apache.org
 Date: Sun, 5 Jul 2009 21:07:13 +0200
 To: fop-users@xmlgraphics.apache.org
 Subject: Re: URIResolver in combination with filenames with unicode characters
 fails - Problem in AbstractImageSessionContext#toFile?
 
 On 30 Jun 2009, at 12:35, Andreas Delmelle wrote:
 
 Hello Peter
 
 Just checking the status:
 
 On 30 Jun 2009, at 11:10, Peter Coppens wrote:
 What I found out debugging is that the A9C3 character is escaped as
 %A9%C3
 when the url is contructed but that in the toFile method %A9 and
 %C3 are
 interpreted as 2 different characters.
 
 Indeed, that already looked a bit suspicious to me, and may be the
 source of the issue.
 Seems more robust to use java.net.URLDecoder instead of re-inventing
 the light-bulb.
 
 I have attached a small patch for you to try out. Would be good if
 you could confirm this fixes the issue on your end.
 
 Have you been able to confirm this? If not, would it help if I
 provided you with a precompiled JAR for XG Commons including the
 changes in the patch (so that you can simply do a temporary swap in
 your test environment)?
 
 
 Thanks in advance!
 
 Andreas
 
 Andreas Delmelle
 mailto:andreas.delmelle.AT.telenet.be
 jabber: mandr...@jabber.org
 skype: adlm0608
 
 ---
 
 
 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
 



-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: URIResolver in combination with filenames with unicode characters fails - Problem in AbstractImageSessionContext#toFile?

2009-06-30 Thread Peter Coppens

Thanks Andreas.

Line nrs  in AbstractImageSessionContext do not match with what I see but I
am not using trunk.

What I found out debugging is that the A9C3 character is escaped as %A9%C3
when the url is contructed but that in the toFile method %A9 and %C3 are
interpreted as 2 different characters.

I am also confused on why you get 

resolve on héxlæ.png canRead returns false

Perhaps your machine/filesystem is not using utf8 and/or saving the file did
not use utf8 or something like that

I don't mind rewriting the URI resolver in whatever way to make it work bit
FOP. For now I have something very ugly hacked in, but at least that is
working

It looks like

class MyStreamSource extends StreamSource {
  private File file;

  public MyStreamSource(File f) {
super(f);
this.file=f;
  }
  
  @Override
  public String getSystemId() {
return this.file.getAbsolutePath();
  }
  
  @Override public InputStream getInputStream() {
try {
  return new FileInputStream(file);
} catch (FileNotFoundException e) {
  return null;
}
  }
  
}


Any other advice more than welcome.

Thanks,

Peter
-- 
View this message in context: 
http://www.nabble.com/URIResolver-in-combination-with-filenames-with-unicode-characters-fails---Problem-in-AbstractImageSessionContext-toFile--tp24235918p24268624.html
Sent from the FOP - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



URIResolver in combination with filenames with unicode characters fails - Problem in AbstractImageSessionContext#toFile?

2009-06-27 Thread Peter Coppens

Fop Fans,

Attached you will find 2 fo files 
-  http://www.nabble.com/file/p24235918/t1.fo t1.fo 
-  http://www.nabble.com/file/p24235918/t2.fo t2.fo 

and two image files 
-  http://www.nabble.com/file/p24235918/hexley.png hexley.png 
-  http://www.nabble.com/file/p24235918/h%25C3%25A9xl%25C3%25A6.png
héxlæ.png 

The same image actually with a different name. The second has a name with
unicode characters in (not sure it will make it on the list using nabble)

The issue I am struggling with (illustrated in attached java program 
http://www.nabble.com/file/p24235918/FopUriResolver.java FopUriResolver.java
)  is that when a URIResolver is used to find the image files, FOP (I assume
the image library) refuses to load the image when it contains unicode
characters in its name. If I comment out the uri resolver it works just
fine.


So, with the url resolver enabled I get

0[main] DEBUG org.apache.fop.apps.FOUserAgent(415) - target-resolution
set to: 72.0dpi (px2mm=0.3528)
resolve on hexley.png canRead returns true
1418 [main] DEBUG org.apache.fop.apps.FOUserAgent(415) - target-resolution
set to: 72.0dpi (px2mm=0.3528)
resolve on héxlæ.png canRead returns true
1426 [main] ERROR
org.apache.xmlgraphics.image.loader.impl.AbstractImageSessionContext(104) -
Error while opening file. Could not load image from system identifier
'file:/eb2/trunk/playground/h%C3%A9xl%C3%A6.png'
(/eb2/trunk/playground/héxl�.png (No such file or directory))
1426 [main] ERROR org.apache.fop.fo.flow.ExternalGraphic(83) - Image not
found: héxlæ.png

and t2.pdf does not have the image embedded

With the uri resolver disabled it returns

[main] DEBUG org.apache.fop.apps.FOUserAgent(415) - target-resolution
set to: 72.0dpi (px2mm=0.3528)
1384 [main] DEBUG org.apache.fop.apps.FOUserAgent(415) - target-resolution
set to: 72.0dpi (px2mm=0.3528)

and both pdfs are ok


I think the problem might lie in AbstractImageSessionContext#toFile where
unicode escapes are apparently not taken into account.


It does not reproduce with JDK 1.5 only with JDK1.6.

I would sure appreciate any tips on how to fix or workaround this issue

Many thanks indeed

Peter
-- 
View this message in context: 
http://www.nabble.com/URIResolver-in-combination-with-filenames-with-unicode-characters-fails---Problem-in-AbstractImageSessionContext-toFile--tp24235918p24235918.html
Sent from the FOP - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: FOP Encrypted files can not be opened with Mac's Preview?

2009-01-29 Thread Peter Coppens
 One tiny remark: is it deliberate that you specify the -u parameter
 without specifying a password, or is this a typo?
 If I do that here, the print and copy restrictions are applied, but no
 password is asked when opening the file. It has the same effect as
 omitting the '-u' parameter.
The idea is people can open the pdf without any password but can not e.g.
copy text from it.

 If I judge correctly, the change I committed (which Jeremias mentioned
 as a fix in Bugzilla 40557) could have something to do with it. Before
 that change, FOP generated two /ID entries in the trailer in case
 the document was encrypted, and this caused problems in earlier
 versions of Acrobat too...
 
 Can you confirm that the issue does not occur with FOP Trunk?
It does. Wonderful!
 
 
 Cheers
 
 Andreas

Many thanks indeed!
Peter



-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



FOP Encrypted files can not be opened with Mac's Preview?

2009-01-28 Thread Peter Coppens
Fop fans,

We are currently using, on customer request, fop¹s encryption features to
disallow e.g. copying of text.

Works fine when the pdf is opened in Acrobat but does not work in MacOs¹s
Preview (10.5.something)

The only thing I can think of is that Preview might have dropped 40bit RC4
support for opening PDF¹s. A security updated was provided ( CVE-2008-0994 -
http://support.apple.com/kb/HT1249) where Apple seems to have removed 40bit
RC4 support for encrypting PDF¹s. Nothing is mentioned about opening though.

Anyway, I guess this is more of a MacOS question, but perhaps some fop-users
reader ran into this earlier...hence my question on this list.

Thanks,

Peter




Re: FOP Encrypted files can not be opened with Mac's Preview?

2009-01-28 Thread Peter Coppens
Andreas,

Kind of you to take the time to try this.

I am on Preview Version 4.1 (469.4) on MacOs 10.5.6

FO is as simple as it gets I think

?xml version=1.0 encoding=UTF-8?
fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format;
  fo:layout-master-set
  fo:simple-page-master master-name=pm page-height=25cm
page-width=20cm margin-top=1cm
margin-bottom=1cm margin-left=1.5cm
margin-right=1.5cm
fo:region-body/
  /fo:simple-page-master
  /fo:layout-master-set

  fo:page-sequence master-reference=pm
  fo:flow flow-name=xsl-region-body
fo:block-container absolute-position=fixed top=4cm left=4cm 
  fo:block 
fo:inlineThis is text/fo:inline
  /fo:block
/fo:block-container
/fo:flow
  /fo:page-sequence
/fo:root


Attached the pdf with fop 0.95...if it makes it through the list server.
Rendered it with 
 fop -u -noprint -nocopy -fo t2.fo -pdf t2.pdf


It opens in Acrobat reader without further ado, but I get the password input
screen of Preview

Adding a password makes Acrobat ask for it and then open the file. Preview
refuses to open it even if the password is entered.

Thanks!

peter

 From: Andreas Delmelle andreas.delme...@telenet.be
 Reply-To: fop-users@xmlgraphics.apache.org
 Date: Thu, 29 Jan 2009 00:12:23 +0100
 To: fop-users@xmlgraphics.apache.org
 Subject: Re: FOP Encrypted files can not be opened with Mac's Preview?
 
 On 28 Jan 2009, at 23:31, Peter Coppens wrote:
 
 Hi Peter
 
 We are currently using, on customer request, fop¹s encryption
 features to disallow e.g. copying of text.
 
 Works fine when the pdf is opened in Acrobat but does not work in
 MacOs¹s Preview (10.5.something)
 
 I cannot immediately reproduce that over here (10.5.6) with a
 relatively simple FO producing a single page. Tested -noprint -nocopy
 -u test, and encountered no issues opening the file in Preview.
 
 Anything special about the FO and/or PDF that could be causing this?
 
 
 Andreas
 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
 



t2.pdf
Description: Binary data
-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org

Re: Scale fop created pages for pdf output

2009-01-14 Thread Peter Coppens

Thanks Jeremias.  As always to the point and helpful

Jeremias Maerki-2 wrote:
 
 This could be done using a similar approach as I've taken with my
 PDF-in-PDF plug-in for FOP. Each page could be converted to a PDF Form
 and then painted from a newly set-up page with the new dimensions. That
 could lead to a nice new function for PDFBox. They're also always
 looking for contributors. ;-)

I'll try to schedule some time to experiment with PDFBox to write such a
scaling tool, based on your pdf image extension. Having close to no
knowledge on PDF or PDFBox...that'll be...interesting.

 
 Also you might want to take a look at Multivalent. It has a good impose
 function. Maybe it can be mistreated for your purposes.
 
Multivalent has indeed what I was looking for (thanks for the pointer, I was
not aware of the project), but its license is a bit unclear to me. Also
could not find the source code.

 Another possibility is to use the new intermediate format I'm currently
 writing for FOP. It allows arbitrary transformation matrices which could
 be used to do something like you need. No guarantee that it'll work. I
 haven't done any tests in that direction. And it can only work for
 formats like PDF, PS and Java2D. For PCL and AFP this will definitely
 not work due to the format limitations. But I assume that won't bother
 you.

Well, that would certainly be the most optimal approach in terms of
performance, but I am not sure it would be optimal in terms of amount of
work and delivery date.
-- 
View this message in context: 
http://www.nabble.com/Scale-fop-created-pages-for-pdf-output-tp21445071p21452885.html
Sent from the FOP - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



RE: Scale fop created pages for pdf output

2009-01-14 Thread Peter Coppens

Pascal,

Thanks for the tip. It does not seem to do what I want though.

If I naievely wrap the content of the page's flow element, which is a
sequence of block-container's, in a wrapping block-container
fox:transform='scale(0.5)' , the scaling does not seem to be taken into
account. Scaling on the deeper block-containers works perfect.

Peter
-- 
View this message in context: 
http://www.nabble.com/Scale-fop-created-pages-for-pdf-output-tp21445071p21453056.html
Sent from the FOP - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: SVG positioning problem

2009-01-14 Thread Peter Coppens
I struggled with something similar

See http://markmail.org/message/5ppuwom7arnzqjy7

The solution provided was to set font-size=0pt

Hope this helps,

Peter

 From: Ulrich Mayring u...@denic.de
 Reply-To: fop-users@xmlgraphics.apache.org
 Date: Wed, 14 Jan 2009 19:45:10 +0100
 To: fop-users@xmlgraphics.apache.org
 Subject: SVG positioning problem
 
 Hi folks,
 
 since upgrading from FOP 0.20.5 to 0.95 the positioning of my SVG elements
 changed. In my FO I am basically doing this:
 
 fo:block-container position=absolute left=0.5cm top=20cm height=1cm
 width=0.5cm
fo:block
  fo:instream-foreign-object
svg:svg height=0.5cm width=0.5cm
  svg:rect height=0.2pt width=0.5cm y=0cm x=0cm/
/svg:svg
  /fo:instream-foreign-object
/fo:block
 /fo:block-container
 
 My understanding is that this should lead to a line positioned 20cm from the
 top of the page. However, the line appears 19.8cm from the top.
 Interestingly, if I change the 20cm to 10cm in the block-container's top
 attribute, then the line is positioned 10.2cm from the top. So the difference
 is 2mm in both cases. Going halfway between these cases, using 15cm as
 value, the line is positioned exactly right.
 
 Perhaps I should do my SVG positioning differently than with a
 block-container? Browsing through FOP's svg examples didn't provide any
 immediate insight...
 
 The FO file is available upon request.
 
 Many thanks in advance,
 
 Ulrich
 
 
 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
 



-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Scale fop created pages for pdf output

2009-01-13 Thread Peter Coppens

Hello,

I guess this is somewhat off topic

Assume existing code to create an XSL FO. Sometimes I need to render that
exact same content (to pdf) but with a different scale

One approach is to create a second stylesheet that refers to the originally
generated pdf but uses the scaled page size. 

Now I wonder whether I can take any shortcuts here. I have been looking into
some pdf lib's (PDFBox being one of them) but I can not immediately figure
out how I would be able to rescale the pages.

Many thanks for guidance or tips!

Peter
-- 
View this message in context: 
http://www.nabble.com/Scale-fop-created-pages-for-pdf-output-tp21445071p21445071.html
Sent from the FOP - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



RE: Scale fop created pages for pdf output

2009-01-13 Thread Peter Coppens

Apologies for not being sufficiently clear.

What i need is resized page but also scaled content (images and text).

Thanks

Peter




Griffin,Sean wrote:
 
 Peter,
 By scale do you mean a different page size?  As you probably know, this
 isn't exactly a difference scale (where the page size would be the same
 but the image zoom would be different).  If you want to use the same XSLT
 to generate similar XSL-FO with just different page sizes, you can easily
 pass the page dimensions in as XSLT parameters.  If you're actually
 generating images from the PDF and want the images to be scaled at
 different dimensions, some sort of post processor would be required.
 
 Sean
 
 -Original Message-
 From: Peter Coppens [mailto:pc.subscripti...@gmail.com] 
 Sent: Tuesday, January 13, 2009 3:39 PM
 To: fop-users@xmlgraphics.apache.org
 Subject: Scale fop created pages for pdf output
 
 
 Hello,
 
 I guess this is somewhat off topic
 
 Assume existing code to create an XSL FO. Sometimes I need to render that
 exact same content (to pdf) but with a different scale
 
 One approach is to create a second stylesheet that refers to the
 originally
 generated pdf but uses the scaled page size. 
 
 Now I wonder whether I can take any shortcuts here. I have been looking
 into
 some pdf lib's (PDFBox being one of them) but I can not immediately figure
 out how I would be able to rescale the pages.
 
 Many thanks for guidance or tips!
 
 Peter
 -- 
 View this message in context:
 http://www.nabble.com/Scale-fop-created-pages-for-pdf-output-tp21445071p21445071.html
 Sent from the FOP - Users mailing list archive at Nabble.com.
 
 
 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
 
 --
 CONFIDENTIALITY NOTICE This message and any included attachments are from
 Cerner Corporation and are intended only for the addressee. The
 information contained in this message is confidential and may constitute
 inside or non-public information under international, federal, or state
 securities laws. Unauthorized forwarding, printing, copying, distribution,
 or use of such information is strictly prohibited and may be unlawful. If
 you are not the addressee, please promptly delete this message and notify
 the sender of the delivery error by e-mail or you may call Cerner's
 corporate offices in Kansas City, Missouri, U.S.A at (+1) (816)221-1024.
 
 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Scale-fop-created-pages-for-pdf-output-tp21445071p21445355.html
Sent from the FOP - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: PDF Image extension and encryption don't go together?

2008-12-15 Thread Peter Coppens
Thanks. 

One can also use PDFBox in such a setup. It works in my case and PDFBox is
already part of the FOP PDF image extension. That avoids the platform
problem and does not introduce another dependency to manage. I just wanted
to avoid a two step process.

Peter


 From: Jay Berkenbilt e...@ql.org
 Reply-To: fop-users@xmlgraphics.apache.org
 Date: Thu, 11 Dec 2008 22:22:51 -0500
 To: fop-users@xmlgraphics.apache.org
 Subject: Re: PDF Image extension and encryption don't go together?
 
 Jeremias Maerki d...@jeremias-maerki.ch wrote:
 
 It appears this is not so simple. Depending on which approach I try I
 end up missing functionality in either the PDFBox or FOP PDF library
 APIs to cover that requirement: If I work with the decoded stream but
 get a PDF with JPEG images I get a warning from PDFBox: Warning:
 DCTFilter.decode is not implemented yet, skipping this stream. And the
 resulting PDF is corrupt. I would need the ability to ignore the DCT
 filter which is currently not possible. On the other side, if I want to
 try to just encrypt the undecoded stream AbstractPDFStream currently
 lacks finer control over the applied filters. So I either have to modify
 PDFBox or the FOP PDF library for which I don't currently have enough time.
 It also creates a dependency on a new version of either package. So for
 now, that means: no support for encrypting PDFs when PDF images are used.
 If you want to try yourself, feel free.
 
 Sorry if this is a little bit of a shameless plug, but Linux users
 would most likely be able to use my qpdf software,
 http://qpdf.sourceforge.net/, which can encrypt arbitrary PDF files.
 The licensing terms are relatively unrestrictive (Artistic license),
 so if there's any logic there that you could steal, have at it.  It's
 C++ code, so it would have to be translated, of course.  To use it
 outright, one could generate a non-encrypted PDF with fop and then
 encrypt it with qpdf.  qpdf can also linearize and do other
 transformations on the file.
 
 I haven't tried this on a PDF file that fop is encrypting incorrectly,
 but I would be willing to try it.  I don't have a windows version of
 qpdf at this time.
 
 -- 
 Jay Berkenbilt
 
 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
 



-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: CYMK

2008-12-05 Thread Peter Coppens
Wellif it is just rectangles I think you should be able to do that
without svg. In that case you should be able to get away with fop¹s cmyk
support.

E.g. This seems to Œwork¹

fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format;
  fo:layout-master-set
  fo:simple-page-master master-name=pm page-height=10cm
page-width=10cm 
fo:region-body/
  /fo:simple-page-master
  /fo:layout-master-set

  fo:page-sequence master-reference=pm
  fo:flow flow-name=xsl-region-body
fo:block-container absolute-position=fixed top=2cm left=2cm
width=1cm height=1cm background-color=cmyk(1,0,0,0)
  fo:block/fo:block
/fo:block-container
fo:block-container absolute-position=fixed top=2cm left=3cm
width=1cm height=1cm background-color=cmyk(0,1,0,0)
  fo:block/fo:block
/fo:block-container
fo:block-container absolute-position=fixed top=2cm left=4cm
width=1cm height=1cm background-color=cmyk(0,0,1,0)
  fo:block/fo:block
/fo:block-container
fo:block-container absolute-position=fixed top=2cm left=5cm
width=1cm height=1cm background-color=cmyk(0,0,0,1)
  fo:block/fo:block
/fo:block-container
/fo:flow
  /fo:page-sequence
/fo:root


Hth,

Peter


From: Iain Downs [EMAIL PROTECTED]
Reply-To: fop-users@xmlgraphics.apache.org
Date: Fri, 5 Dec 2008 09:20:53 -
To: fop-users@xmlgraphics.apache.org
Subject: RE: CYMK

Hey, Peter.  Thanks for this.
 
Perhaps I could phrase my question more broadly.
 
I have a need to create some pdf files for colour printing purposes.  Each
page will contain nothing but square blocks in one of two colours - no
overlap.
 
The printer requires that these colours are separable onto different plates
so they must be either spot colours or 100% C Y M or K from the C Y M K
palette.
 
Ignoring (or not) FOP/SVG and other things, what is the easiest way of
generating these files.   I was reasonably expert in pdf and ps 15 years
ago, but I've pretty much forgotten it all. so something fairly noddy
(simple to understand and implement) would be ideal!
 
 
Iain
 

From: Peter Coppens [mailto:[EMAIL PROTECTED]
Sent: 05 December 2008 09:01
To: fop-users@xmlgraphics.apache.org
Subject: Re: CYMK
 
Don¹t think batik/svg supports cmyk

Also see http://markmail.org/message/ogvc4we6n347vjvt?q=batik+cmyk

Hth,

Peter




From: Iain Downs [EMAIL PROTECTED]
Reply-To: fop-users@xmlgraphics.apache.org
Date: Fri, 5 Dec 2008 08:12:50 -
To: FOP MAILLIST fop-users@xmlgraphics.apache.org
Subject: CYMK

Hi, Guys.
 
I'm (still) trying to produce a simple 'camera ready copy' with separable
colours.  I'm now trying to do this by using specifying my two colours to be
Cyan and Magenta with the resulting CMYK in PDF files hopefully being
separable.
 
My chain is XSL-FO with embedded SVG - fop  (0.95) - PDF.
 
The problem is that magenta in the resulting PDF file actually contains some
cyan and the cyan contains some yellow.
 
So I appear to need to specify CMYK directly in the XSL-FO/SVG.
 
The problem is that although 'fill=rgb(255,0,0)' seems to work ok
'fill=cmyk(100%, 0%, 0%,0%)' throws an exception (something about functions
not being allowed)
 
svg:rect  x=0.5mm y=0.5mm width=5mm height=5mm fill=cmyk(100%, 0%,
0%, 0%) /
 
There's an indication in the archives
(http://fop.markmail.org/message/hoz4sp4l3imabkn5?q=spot+colors) that
something of this sort should work in FOP proper, but it seems not to in the
SVG parts.
 
AS in my earlier email (sport colours), I'm struggling to find much googling
this area and what I do find tends to require a background knowledge of
printing, SVG and so on which I don't have.
 
Any help would be much appreciated or I shall be forced to start assembling
PDF files by hand :(
 
 
Iain




PDF Image extension and encryption don't go together?

2008-12-05 Thread Peter Coppens

Fop fans,

I have the impression that when using e.g. the -noprint fop command line
option while pdf rendering an fo that referers to a pdf as external-graphic,
the pdf is either not included or not included correctly. 

E.g. this fo document reproduces the problem

fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format;
  fo:layout-master-set
  fo:simple-page-master master-name=pm page-height=25cm
page-width=20cm
fo:region-body/
  /fo:simple-page-master
  /fo:layout-master-set
  fo:page-sequence master-reference=pm
  fo:flow flow-name=xsl-region-body
fo:block-container absolute-position=fixed 
  fo:block 
fo:external-graphic
src=url(http://xmlgraphics.apache.org/fop/0.95/pdfencryption.pdf#1)
content-height=scale-to-fit content-width=scale-to-fit/
  /fo:block
/fo:block-container
/fo:flow
  /fo:page-sequence
/fo:root


Thanks

Peter
-- 
View this message in context: 
http://www.nabble.com/PDF-Image-extension-and-encryption-don%27t-go-together--tp20855649p20855649.html
Sent from the FOP - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [ANN] New release of PDF image support for Apache FOP

2008-12-01 Thread Peter Coppens
Jeremias,

We are trying to maintain a 'clean' maven setup to build our own software
from. For those dependencies we don't have external maven repo's we try to
build from the source.

The 'problem' we are currently facing is that it is unclear for us which
version of PDFBox the fop-pdf 1.3 build depends on. We found a
PDFBox-0.7.4-dev.jar  and local version of some of the classes in
/src/java/org/apache/fop/render/pdf/pdfbox/

Do you see a way to help us. Perhaps you have the svn revision corresponding
to PDFBox-0.7.4-dev?

Many thanks indeed!

Peter

 From: Jeremias Maerki [EMAIL PROTECTED]
 Reply-To: fop-users@xmlgraphics.apache.org
 Date: Fri, 28 Nov 2008 16:36:12 +0100
 To: fop-users@xmlgraphics.apache.org
 Subject: [ANN] New release of PDF image support for Apache FOP
 
 I've just uploaded a new release (Version 1.3) of the PDF image support
 plug-in for Apache FOP (0.95beta and later).
 
 The plug-in allows to include existing PDF files using
 fo:external-graphic and fox:external-document when generating PDF output.
 It is published under the Apache License V2.0, just like Apache FOP.
 
 For details on the plug-in, please read the README file in the
 distribution.
 
 Download from here:
 http://www.jeremias-maerki.ch/development/fop/index.html
 
 Changes since version 1.2:
 - Fixed a NullPointerException when the MediaBox is inherited.
 - An invalid page number is now properly handled.
 
 Hashes:
 6B2563F90128F2C4F2C5B5CD2F59BEAB  fop-pdf-images-1.3-bin.tar.gz
 619BF5486A34D9E4E5ABD0E273659149  fop-pdf-images-1.3-bin.zip
 252126A3CDE5EC7A48892C1787B1403C  fop-pdf-images-1.3-src.tar.gz
 C77C3D5647E96233D5B1F4A3722E28E2  fop-pdf-images-1.3-src.zip
 
 Enjoy,
 Jeremias Märki
 _
 Jeremias Märki, Software-Development and Consulting
 Contact Information: http://www.jeremias-maerki.ch/contact.html
 Blog: http://www.jeremias-maerki.ch/blog/
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [ANN] New release of PDF image support for Apache FOP

2008-12-01 Thread Peter Coppens
Thanks. It does help, Peter.


 From: Jeremias Maerki [EMAIL PROTECTED]
 Reply-To: fop-users@xmlgraphics.apache.org
 Date: Mon, 01 Dec 2008 11:45:22 +0100
 To: fop-users@xmlgraphics.apache.org
 Subject: Re: [ANN] New release of PDF image support for Apache FOP
 
 On 01.12.2008 11:36:12 Peter Coppens wrote:
 Jeremias,
 
 We are trying to maintain a 'clean' maven setup to build our own software
 from. For those dependencies we don't have external maven repo's we try to
 build from the source.
 
 The 'problem' we are currently facing is that it is unclear for us which
 version of PDFBox the fop-pdf 1.3 build depends on. We found a
 PDFBox-0.7.4-dev.jar  and local version of some of the classes in
 /src/java/org/apache/fop/render/pdf/pdfbox/
 
 Do you see a way to help us. Perhaps you have the svn revision corresponding
 to PDFBox-0.7.4-dev?
 
 PDFBox @SourceForge ran on CVS. The code change I needed to make the
 plug-in work was this one:
 http://sourceforge.net/tracker/?func=detailatid=552834aid=1806912group_id=7
 8314
 
 So I guess if you checked out the source with date 2007-10-16 you
 should get a version that works with the plug-in. What I'm publishing
 with the plug-in is a local snapshot build. I know, it's not beautiful.
 
 Anyway, I'm planning to migrate the plug-in to the migrated PDFBox
 (currently in ASF incubation) as soon as the first release is ready.
 That will make things easier.
 
 HTH
 
 Many thanks indeed!
 
 Peter
 
 From: Jeremias Maerki [EMAIL PROTECTED]
 Reply-To: fop-users@xmlgraphics.apache.org
 Date: Fri, 28 Nov 2008 16:36:12 +0100
 To: fop-users@xmlgraphics.apache.org
 Subject: [ANN] New release of PDF image support for Apache FOP
 
 I've just uploaded a new release (Version 1.3) of the PDF image support
 plug-in for Apache FOP (0.95beta and later).
 
 The plug-in allows to include existing PDF files using
 fo:external-graphic and fox:external-document when generating PDF output.
 It is published under the Apache License V2.0, just like Apache FOP.
 
 For details on the plug-in, please read the README file in the
 distribution.
 
 Download from here:
 http://www.jeremias-maerki.ch/development/fop/index.html
 
 Changes since version 1.2:
 - Fixed a NullPointerException when the MediaBox is inherited.
 - An invalid page number is now properly handled.
 
 Hashes:
 6B2563F90128F2C4F2C5B5CD2F59BEAB  fop-pdf-images-1.3-bin.tar.gz
 619BF5486A34D9E4E5ABD0E273659149  fop-pdf-images-1.3-bin.zip
 252126A3CDE5EC7A48892C1787B1403C  fop-pdf-images-1.3-src.tar.gz
 C77C3D5647E96233D5B1F4A3722E28E2  fop-pdf-images-1.3-src.zip
 
 Enjoy,
 Jeremias Märki
 _
 Jeremias Märki, Software-Development and Consulting
 Contact Information: http://www.jeremias-maerki.ch/contact.html
 Blog: http://www.jeremias-maerki.ch/blog/
 
 
 
 
 
 Jeremias Maerki
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Encryption garbles external link

2008-11-29 Thread Peter Coppens

Dear fop fans,

The xsl fo below renders fine to pdf and the link works when processed
without encryption options
e.g. using the command line

  fop -fo file.fo -pdf file.pdf

But with encryption options the link is garbled

  fop -noprint -nocopy  -fo  test.fo  -pdf test.pdf

When opening in Acrobat reader 8 it pops up a dialog stating

The document is trying to connect to 
file:///private/var/tmp/%1CH%3E%C2%A7%C3%AE%C2%B6%0C%C2%AAcA%C2%91%C2%8En%C2%A7y%C2%90%C3%9F%C2%AAI%C3%A3+%C2%81%C2%AA%3Euk%C3%98%05%C2%B6%C2%91


I am using fop 0.95 and jdk 1.5


Any guidance would indeed be greatly appreciated!

Peter

?xml version=1.0 encoding=iso-8859-1?
fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format;2
fo:layout-master-set
fo:simple-page-master master-name=my-page
fo:region-body margin=1in/
/fo:simple-page-master
/fo:layout-master-set

fo:page-sequence master-reference=my-page
fo:flow flow-name=xsl-region-body
fo:block
fo:basic-link
external-destination=url('http://xmlgraphics.apache.org/')
text-decoration=underline
color=blueFop is here/fo:basic-link
/fo:block
/fo:flow
/fo:page-sequence
/fo:root

-- 
View this message in context: 
http://www.nabble.com/Encryption-garbles-external-link-tp20746538p20746538.html
Sent from the FOP - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Encryption garbles external link

2008-11-29 Thread Peter Coppens

Thanks for the prompt feedback. I will try to get my head around the code and
see whether I can come up with a possible suggestion for a fix

Peter 


Andreas Delmelle-2 wrote:
 
 On 29 Nov 2008, at 13:24, Peter Coppens wrote:
 
 Hi Peter
 
 snip /
 But with encryption options the link is garbled

  fop -noprint -nocopy  -fo  test.fo  -pdf test.pdf

 When opening in Acrobat reader 8 it pops up a dialog stating

 The document is trying to connect to
 file:///private/var/tmp/%1CH%3E%C2%A7%C3%AE%C2%B6%0C%C2%AAcA%C2%91%C2%8En%C2%A7y%C2%90%C3%9F%C2%AAI%C3%A3+%C2%81%C2%AA%3Euk%C3%98%05%C2%B6%C2%91
 
 Seems like this is a known bug (since 0.92) that no one has got around  
 to fixing yet...
   (see also: http://issues.apache.org/show_bug.cgi?id=41959)
 
 
 Cheers
 
 Andreas
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Encryption-garbles-external-link-tp20746538p20747338.html
Sent from the FOP - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Encryption garbles external link

2008-11-29 Thread Peter Coppens

Looks like the uri is not encrypted at all.

The code that writes out the PDFLink object seems to completely skip the
'normal' pdf output processing and writes out text without going through the
encodeText method from PDFObject.

I tried to hack around a bit and after making sure PDFUri has its parent set
to PDFLink (which it has not in the 0.95 code) something encrypted is
written, but Acrobat still can not make sense of it. 

With the hack enabled I get 

 /Type /Annot
/Subtype /Link
/Rect [ 72.0 707.25 132.024 718.35 ]
/C [ 0 0 0 ]
/Border [ 0 0 0 ]
/A  /URI
(ö?§^[BÎ^OØ^^éOªûL^A;èÇ?%^Oµ?^G-?CS^TÔñÏ?f:¯?±??!£?¯ÉÀ^]y?n¬??^OE5Ä}| ,^V)
/S /URI 
/H /I



(without the hack the URI is plain text)


Unfortunately that is not what it should be...and I am clueless as to what
is going wrong now.  I guess I will have to dive in the encryption part of
the pdf spec to figure out what exactly needs to be encrypted for Acrobat to
be happy with it.

Perhaps someone has suggestions on what might be wrong in the above
Annotation object?

Thanks!

Peter



Peter Coppens wrote:
 
 Thanks for the prompt feedback. I will try to get my head around the code
 and see whether I can come up with a possible suggestion for a fix
 
 Peter 
 
 
 Andreas Delmelle-2 wrote:
 
 On 29 Nov 2008, at 13:24, Peter Coppens wrote:
 
 Hi Peter
 
 snip /
 But with encryption options the link is garbled

  fop -noprint -nocopy  -fo  test.fo  -pdf test.pdf

 When opening in Acrobat reader 8 it pops up a dialog stating

 The document is trying to connect to
 file:///private/var/tmp/%1CH%3E%C2%A7%C3%AE%C2%B6%0C%C2%AAcA%C2%91%C2%8En%C2%A7y%C2%90%C3%9F%C2%AAI%C3%A3+%C2%81%C2%AA%3Euk%C3%98%05%C2%B6%C2%91
 
 Seems like this is a known bug (since 0.92) that no one has got around  
 to fixing yet...
   (see also: http://issues.apache.org/show_bug.cgi?id=41959)
 
 
 Cheers
 
 Andreas
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Encryption-garbles-external-link-tp20746538p20747833.html
Sent from the FOP - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Encryption garbles external link

2008-11-29 Thread Peter Coppens

I have something that seems to be working, but I am not sure it is always
correct and I doubt it's the most optimal approach.

Here are the changes I did

1. PDFLink#toPDFString
Added

this.action.setParent(this);

(would be better to do this when creating the PDFUri object )

2. PDFUri#getAction

public String getAction() {
return  /URI ( + uri + )\n/S /URI ;

}


--

public String getAction() {
  String uriString=new String(this.encodeText2(uri));

  return  /URI  + uriString + \n /S /URI ;

}


3. Added PDFObject#encodeText2


protected byte[] encodeText2(String text)  {
if (getDocumentSafely().isEncryptionActive()) {
final byte[] buf = PDFText.encode(text);
byte[] enc = getDocument().getEncryption().encrypt(buf, this);
return PDFText.toHex(enc,true).getBytes();

 } else {
return encode(PDFText.escapeText(text, false));

 }

}


Perhaps this can be used as something to start from for a patch for bug
41959 ?

Thanks,

Peter



Peter Coppens wrote:
 
 Looks like the uri is not encrypted at all.
 
 The code that writes out the PDFLink object seems to completely skip the
 'normal' pdf output processing and writes out text without going through
 the encodeText method from PDFObject.
 
 I tried to hack around a bit and after making sure PDFUri has its parent
 set to PDFLink (which it has not in the 0.95 code) something encrypted is
 written, but Acrobat still can not make sense of it. 
 
 With the hack enabled I get 
 
  /Type /Annot
 /Subtype /Link
 /Rect [ 72.0 707.25 132.024 718.35 ]
 /C [ 0 0 0 ]
 /Border [ 0 0 0 ]
 /A  /URI
 (ö?§^[BÎ^OØ^^éOªûL^A;èÇ?%^Oµ?^G-?CS^TÔñÏ?f:¯?±??!£?¯ÉÀ^]y?n¬??^OE5Ä}|
 ,^V)
 /S /URI 
 /H /I
 

 
 (without the hack the URI is plain text)
 
 
 Unfortunately that is not what it should be...and I am clueless as to what
 is going wrong now.  I guess I will have to dive in the encryption part of
 the pdf spec to figure out what exactly needs to be encrypted for Acrobat
 to be happy with it.
 
 Perhaps someone has suggestions on what might be wrong in the above
 Annotation object?
 
 Thanks!
 
 Peter
 
 
 
 Peter Coppens wrote:
 
 Thanks for the prompt feedback. I will try to get my head around the code
 and see whether I can come up with a possible suggestion for a fix
 
 Peter 
 
 
 Andreas Delmelle-2 wrote:
 
 On 29 Nov 2008, at 13:24, Peter Coppens wrote:
 
 Hi Peter
 
 snip /
 But with encryption options the link is garbled

  fop -noprint -nocopy  -fo  test.fo  -pdf test.pdf

 When opening in Acrobat reader 8 it pops up a dialog stating

 The document is trying to connect to
 file:///private/var/tmp/%1CH%3E%C2%A7%C3%AE%C2%B6%0C%C2%AAcA%C2%91%C2%8En%C2%A7y%C2%90%C3%9F%C2%AAI%C3%A3+%C2%81%C2%AA%3Euk%C3%98%05%C2%B6%C2%91
 
 Seems like this is a known bug (since 0.92) that no one has got around  
 to fixing yet...
   (see also: http://issues.apache.org/show_bug.cgi?id=41959)
 
 
 Cheers
 
 Andreas
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Encryption-garbles-external-link-tp20746538p20753657.html
Sent from the FOP - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: pdf-image extension - exception when referred page does not exist

2008-11-28 Thread Peter Coppens
Thanks!

Peter.


 From: Jeremias Maerki [EMAIL PROTECTED]
 Reply-To: fop-users@xmlgraphics.apache.org
 Date: Fri, 28 Nov 2008 16:37:00 +0100
 To: fop-users@xmlgraphics.apache.org
 Subject: Re: pdf-image extension - exception when referred page does not exist
 
 Sorry, Peter, I forgot about it. I've just published a new version.
 
 On 27.11.2008 14:57:17 Peter Coppens wrote:
 Jeremias,
 
 Have you ever found the time to make progress on this? Or did I miss the
 message on the list?
 
 Is there anything I can do the help to move this forward?
 
 Thanks,
 
 Peter
 
 
 From: Jeremias Maerki [EMAIL PROTECTED]
 Reply-To: fop-users@xmlgraphics.apache.org
 Date: Mon, 13 Oct 2008 14:23:44 +0200
 To: fop-users@xmlgraphics.apache.org
 Subject: Re: pdf-image extension - exception when referred page does not
 exist
 
 I will take a look at this ASAP.
 
 On 01.10.2008 13:47:13 Peter Coppens wrote:
 
 Hello,
 
 When referring to a page that is not present in the pdf, the pdf-image
 extension throws an exception.
 
 SEVERE: Exception stack tracejava.lang.IndexOutOfBoundsException: Index: 3,
 Size: 2
 at java.util.ArrayList.RangeCheck(ArrayList.java:546)
 at java.util.ArrayList.get(ArrayList.java:321)
 at org.pdfbox.pdmodel.PDDocument.getPageFormat(PDDocument.java:776)
 at
 
org.apache.fop.render.pdf.pdfbox.PreloaderPDF.loadPDF(PreloaderPDF.java:114
)
 at
 org.apache.fop.render.pdf.pdfbox.PreloaderPDF.preloadImage(PreloaderPDF.jav
 a:
 73)
 at
 org.apache.xmlgraphics.image.loader.ImageManager.preloadImage(ImageManager.
 ja
 va:165)
 at
 org.apache.xmlgraphics.image.loader.cache.ImageCache.needImageInfo(ImageCac
 he
 .java:96)
 at
 org.apache.xmlgraphics.image.loader.ImageManager.getImageInfo(ImageManager.
 ja
 va:112)
 at
 org.apache.fop.fo.flow.ExternalGraphic.bind(ExternalGraphic.java:79)
 
 
 Is it thinkable to (optionally) change this behavior so that a SEVERE
 message is logged but that processing continues...much like fop's standard
 behavior when referring to non-existent images.
 
 Thanks,
 
 Peter
 -- 
 View this message in context:
 http://www.nabble.com/pdf-image-extension---exception-when-referred-page-do
 es
 -not-exist-tp19758780p19758780.html
 Sent from the FOP - Users mailing list archive at Nabble.com.
 
 
 
 
 
 
 Jeremias Maerki
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: pdf-image extension - exception when referred page does not exist

2008-11-27 Thread Peter Coppens
Jeremias,

Have you ever found the time to make progress on this? Or did I miss the
message on the list?

Is there anything I can do the help to move this forward?

Thanks,

Peter


 From: Jeremias Maerki [EMAIL PROTECTED]
 Reply-To: fop-users@xmlgraphics.apache.org
 Date: Mon, 13 Oct 2008 14:23:44 +0200
 To: fop-users@xmlgraphics.apache.org
 Subject: Re: pdf-image extension - exception when referred page does not exist
 
 I will take a look at this ASAP.
 
 On 01.10.2008 13:47:13 Peter Coppens wrote:
 
 Hello,
 
 When referring to a page that is not present in the pdf, the pdf-image
 extension throws an exception.
 
 SEVERE: Exception stack tracejava.lang.IndexOutOfBoundsException: Index: 3,
 Size: 2
 at java.util.ArrayList.RangeCheck(ArrayList.java:546)
 at java.util.ArrayList.get(ArrayList.java:321)
 at org.pdfbox.pdmodel.PDDocument.getPageFormat(PDDocument.java:776)
 at
 org.apache.fop.render.pdf.pdfbox.PreloaderPDF.loadPDF(PreloaderPDF.java:114)
 at
 org.apache.fop.render.pdf.pdfbox.PreloaderPDF.preloadImage(PreloaderPDF.java:
 73)
 at
 org.apache.xmlgraphics.image.loader.ImageManager.preloadImage(ImageManager.ja
 va:165)
 at
 org.apache.xmlgraphics.image.loader.cache.ImageCache.needImageInfo(ImageCache
 .java:96)
 at
 org.apache.xmlgraphics.image.loader.ImageManager.getImageInfo(ImageManager.ja
 va:112)
 at
 org.apache.fop.fo.flow.ExternalGraphic.bind(ExternalGraphic.java:79)
 
 
 Is it thinkable to (optionally) change this behavior so that a SEVERE
 message is logged but that processing continues...much like fop's standard
 behavior when referring to non-existent images.
 
 Thanks,
 
 Peter
 -- 
 View this message in context:
 http://www.nabble.com/pdf-image-extension---exception-when-referred-page-does
 -not-exist-tp19758780p19758780.html
 Sent from the FOP - Users mailing list archive at Nabble.com.
 
 
 
 
 Jeremias Maerki
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: pdf-image extension - exception when referred page does not exist

2008-11-27 Thread Peter Coppens
Resending - I have the impression the first attempt did not make it for some
reason.

Peter

 From: Peter Coppens [EMAIL PROTECTED]
 Date: Thu, 27 Nov 2008 14:57:17 +0100
 To: fop-users@xmlgraphics.apache.org
 Conversation: pdf-image extension - exception when referred page does not
 exist
 Subject: Re: pdf-image extension - exception when referred page does not exist
 
 Jeremias,
 
 Have you ever found the time to make progress on this? Or did I miss the
 message on the list?
 
 Is there anything I can do the help to move this forward?
 
 Thanks,
 
 Peter
 
 
 From: Jeremias Maerki [EMAIL PROTECTED]
 Reply-To: fop-users@xmlgraphics.apache.org
 Date: Mon, 13 Oct 2008 14:23:44 +0200
 To: fop-users@xmlgraphics.apache.org
 Subject: Re: pdf-image extension - exception when referred page does not
 exist
 
 I will take a look at this ASAP.
 
 On 01.10.2008 13:47:13 Peter Coppens wrote:
 
 Hello,
 
 When referring to a page that is not present in the pdf, the pdf-image
 extension throws an exception.
 
 SEVERE: Exception stack tracejava.lang.IndexOutOfBoundsException: Index: 3,
 Size: 2
 at java.util.ArrayList.RangeCheck(ArrayList.java:546)
 at java.util.ArrayList.get(ArrayList.java:321)
 at org.pdfbox.pdmodel.PDDocument.getPageFormat(PDDocument.java:776)
 at
 org.apache.fop.render.pdf.pdfbox.PreloaderPDF.loadPDF(PreloaderPDF.java:114)
 at
 
org.apache.fop.render.pdf.pdfbox.PreloaderPDF.preloadImage(PreloaderPDF.java
:
 73)
 at
 
org.apache.xmlgraphics.image.loader.ImageManager.preloadImage(ImageManager.j
a
 va:165)
 at
 
org.apache.xmlgraphics.image.loader.cache.ImageCache.needImageInfo(ImageCach
e
 .java:96)
 at
 
org.apache.xmlgraphics.image.loader.ImageManager.getImageInfo(ImageManager.j
a
 va:112)
 at
 org.apache.fop.fo.flow.ExternalGraphic.bind(ExternalGraphic.java:79)
 
 
 Is it thinkable to (optionally) change this behavior so that a SEVERE
 message is logged but that processing continues...much like fop's standard
 behavior when referring to non-existent images.
 
 Thanks,
 
 Peter
 -- 
 View this message in context:
 
http://www.nabble.com/pdf-image-extension---exception-when-referred-page-doe
s
 -not-exist-tp19758780p19758780.html
 Sent from the FOP - Users mailing list archive at Nabble.com.
 
 
 
 
 Jeremias Maerki
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: pdf-image extension problems

2008-10-03 Thread Peter Coppens
Thanks for the reply.The exception is thrown when a page is addressed which
does not exist. So I guess the exception is one way of dealing with that. I
would find it easier to get a missing image warning in the log in such cases
and see the rendering process continued. Similar to what happens with image
references that do not exist.

Peter

 From: Frederic W [EMAIL PROTECTED]
 Reply-To: fop-users@xmlgraphics.apache.org
 Date: Fri, 3 Oct 2008 07:04:22 -0700 (PDT)
 To: fop-users@xmlgraphics.apache.org
 Subject: Re: pdf-image extension problems
 
 
 Hi, Jeremias tells me that he is on holidays !
 I have no solution for you but you can check that:
 
 - The pdf to include has a version lower or equal than 1.4 (Acrobat 5.x)
 because I think that FOP creates a pdf with a version equal to 1.4
 
 - The pdf to include is not bigger that the available space.
 Don't forget that you have maybe margin in your fo:simple-page-master
 
 - If your pdf has several page, I have done a block for each page.
  for example :
 fo:block break-before=page
fo:external-graphic src=Part21.pdf#page=3/
 /fo:block 
 
 It was the same problem with Antenna House.
 
 In fact, I have in the xml, the number of page and I have done a loop.
 
 
 
 
 Peter Coppens wrote:
 
 Got them. Thanks for that.
 
 Unfortunately I run into 'a next' problem.
 
 
 SEVERE: Exception stack tracejava.lang.IndexOutOfBoundsException: Index:
 3,
 Size: 2
 at java.util.ArrayList.RangeCheck(ArrayList.java:546)
 at java.util.ArrayList.get(ArrayList.java:321)
 at
 org.pdfbox.pdmodel.PDDocument.getPageFormat(PDDocument.java:776)
 at 
 org.apache.fop.render.pdf.pdfbox.PreloaderPDF.loadPDF(PreloaderPDF.java:114)
 at 
 org.apache.fop.render.pdf.pdfbox.PreloaderPDF.preloadImage(PreloaderPDF.java
 :73)
 at 
 org.apache.xmlgraphics.image.loader.ImageManager.preloadImage(ImageManager.j
 ava:165)
 at 
 org.apache.xmlgraphics.image.loader.cache.ImageCache.needImageInfo(ImageCach
 e.java:96)
 at 
 org.apache.xmlgraphics.image.loader.ImageManager.getImageInfo(ImageManager.j
 ava:112)
 at 
 org.apache.fop.fo.flow.ExternalGraphic.bind(ExternalGraphic.java:79)
 at org.apache.fop.fo.FObj.processNode(FObj.java:126)
 at 
 org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.jav
 a:286)
 at 
 org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:163)
 
 Before I try to isolate, anyone any clue?
 
 Thanks!
 
 Peter
 
 
 
 From: Maximilian Gaerber [EMAIL PROTECTED]
 Reply-To: fop-users@xmlgraphics.apache.org
 Date: Tue, 30 Sep 2008 15:17:02 +0200
 To: fop-users@xmlgraphics.apache.org
 Subject: Re: pdf-image extension problems
 
 Hi Peter,
 
 I sent the files separately.
 
 @Jeremias: I guess it would be worth throwing out a new release ;-)
 
 Regards,
 
 Max
 
 Peter Coppens schrieb:
 Hello,
 
 I am running into the same problem. Any chance I could get the fixed
 version
 as well?
 
 Many thanks indeed,
 
 Peter
 
 
 
 Frederic W wrote:
   
 Thanks a lot to Jeremias and Maximilian. They send me the development
 version of pdf-image extension and that works great !!
 :jumping:
 
 
 Frederic W wrote:
 
 Hi,
 I have exactly the same error. Please could you send me your build too
 or
 tell me when there will be a new release..
 Thanks a lot.
 Frédéric
 [EMAIL PROTECTED]
 
 
 Jeremias Maerki-2 wrote:
   
 Thanks for the bug report and the test case. I've fixed the bug and
 will
 send you a new build off-list. If there are no other bugs reported in
 the short term, I'll see if I can do another release.
 
 On 12.09.2008 17:58:19 Maximilian Gaerber wrote:
 
 Hi,
 
 when using the pdf-image extension I get an exception when trying to
 place a pdf where all box sizes (trim, media etc.) are the same. PDF
 attached.
 
 SCHWERWIEGEND: Error while rendering page 2
 java.lang.NullPointerException
 at 
 org.apache.fop.render.pdf.pdfbox.PDFBoxAdapter.createFormFromPDFBoxPage
 (P
 DFBoxAdapter.java:229)
 at 
 org.apache.fop.render.pdf.pdfbox.PDFBoxPDFImageHandler.generateImage(PD
 FB
 oxPDFImageHandler.java:93)
 at
 org.apache.fop.render.pdf.PDFRenderer.putImage(PDFRenderer.java:1745)
 at 
 
org.apache.fop.render.pdf.PDFRenderer.renderImage(PDFRenderer.java:1679
)
 at 
 org.apache.fop.render.AbstractRenderer.renderViewport(AbstractRenderer.
 ja
 va:743)
 at 
 org.apache.fop.render.AbstractPathOrientedRenderer.renderViewport(Abstr
 ac
 tPathOrientedRenderer.java:621)
 at 
 org.apache.fop.render.AbstractRenderer.renderInlineArea(AbstractRendere
 r.
 java:626)
 at 
 org.apache.fop.render.pdf.PDFRenderer.renderInlineArea(PDFRenderer.java
 :1
 345)
 at 
 org.apache.fop.render.AbstractRenderer.renderLineArea(AbstractRenderer.
 ja
 va:601)
 at 
 org.apache.fop.render.pdf.PDFRenderer.renderLineArea(PDFRenderer.java:1
 33
 6)
 at 
 org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.ja
 va
 :536

Re: pdf-image extension problems

2008-10-01 Thread Peter Coppens
Got them. Thanks for that.

Unfortunately I run into 'a next' problem.


SEVERE: Exception stack tracejava.lang.IndexOutOfBoundsException: Index: 3,
Size: 2
at java.util.ArrayList.RangeCheck(ArrayList.java:546)
at java.util.ArrayList.get(ArrayList.java:321)
at org.pdfbox.pdmodel.PDDocument.getPageFormat(PDDocument.java:776)
at 
org.apache.fop.render.pdf.pdfbox.PreloaderPDF.loadPDF(PreloaderPDF.java:114)
at 
org.apache.fop.render.pdf.pdfbox.PreloaderPDF.preloadImage(PreloaderPDF.java
:73)
at 
org.apache.xmlgraphics.image.loader.ImageManager.preloadImage(ImageManager.j
ava:165)
at 
org.apache.xmlgraphics.image.loader.cache.ImageCache.needImageInfo(ImageCach
e.java:96)
at 
org.apache.xmlgraphics.image.loader.ImageManager.getImageInfo(ImageManager.j
ava:112)
at 
org.apache.fop.fo.flow.ExternalGraphic.bind(ExternalGraphic.java:79)
at org.apache.fop.fo.FObj.processNode(FObj.java:126)
at 
org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.jav
a:286)
at 
org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:163)

Before I try to isolate, anyone any clue?

Thanks!

Peter



 From: Maximilian Gaerber [EMAIL PROTECTED]
 Reply-To: fop-users@xmlgraphics.apache.org
 Date: Tue, 30 Sep 2008 15:17:02 +0200
 To: fop-users@xmlgraphics.apache.org
 Subject: Re: pdf-image extension problems
 
 Hi Peter,
 
 I sent the files separately.
 
 @Jeremias: I guess it would be worth throwing out a new release ;-)
 
 Regards,
 
 Max
 
 Peter Coppens schrieb:
 Hello,
 
 I am running into the same problem. Any chance I could get the fixed version
 as well?
 
 Many thanks indeed,
 
 Peter
 
 
 
 Frederic W wrote:
   
 Thanks a lot to Jeremias and Maximilian. They send me the development
 version of pdf-image extension and that works great !!
 :jumping:
 
 
 Frederic W wrote:
 
 Hi,
 I have exactly the same error. Please could you send me your build too or
 tell me when there will be a new release..
 Thanks a lot.
 Frédéric
 [EMAIL PROTECTED]
 
 
 Jeremias Maerki-2 wrote:
   
 Thanks for the bug report and the test case. I've fixed the bug and will
 send you a new build off-list. If there are no other bugs reported in
 the short term, I'll see if I can do another release.
 
 On 12.09.2008 17:58:19 Maximilian Gaerber wrote:
 
 Hi,
 
 when using the pdf-image extension I get an exception when trying to
 place a pdf where all box sizes (trim, media etc.) are the same. PDF
 attached.
 
 SCHWERWIEGEND: Error while rendering page 2
 java.lang.NullPointerException
 at 
 org.apache.fop.render.pdf.pdfbox.PDFBoxAdapter.createFormFromPDFBoxPage(P
 DFBoxAdapter.java:229)
 at 
 org.apache.fop.render.pdf.pdfbox.PDFBoxPDFImageHandler.generateImage(PDFB
 oxPDFImageHandler.java:93)
 at
 org.apache.fop.render.pdf.PDFRenderer.putImage(PDFRenderer.java:1745)
 at 
 org.apache.fop.render.pdf.PDFRenderer.renderImage(PDFRenderer.java:1679)
 at 
 org.apache.fop.render.AbstractRenderer.renderViewport(AbstractRenderer.ja
 va:743)
 at 
 org.apache.fop.render.AbstractPathOrientedRenderer.renderViewport(Abstrac
 tPathOrientedRenderer.java:621)
 at 
 org.apache.fop.render.AbstractRenderer.renderInlineArea(AbstractRenderer.
 java:626)
 at 
 org.apache.fop.render.pdf.PDFRenderer.renderInlineArea(PDFRenderer.java:1
 345)
 at 
 org.apache.fop.render.AbstractRenderer.renderLineArea(AbstractRenderer.ja
 va:601)
 at 
 org.apache.fop.render.pdf.PDFRenderer.renderLineArea(PDFRenderer.java:133
 6)
 at 
 org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java
 :536)
 at 
 org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:
 573)
 at 
 org.apache.fop.render.pdf.PDFRenderer.renderBlock(PDFRenderer.java:1329)
 at 
 org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java
 :526)
 at 
 org.apache.fop.render.AbstractPathOrientedRenderer.renderReferenceArea(Ab
 stractPathOrientedRenderer.java:548)
 at 
 org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:
 560)
 at 
 org.apache.fop.render.pdf.PDFRenderer.renderBlock(PDFRenderer.java:1329)
 at 
 org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java
 :526)
 at 
 org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:
 573)
 at 
 org.apache.fop.render.pdf.PDFRenderer.renderBlock(PDFRenderer.java:1329)
 at 
 org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java
 :526)
 at 
 org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:
 573)
 at 
 org.apache.fop.render.pdf.PDFRenderer.renderBlock(PDFRenderer.java:1329)
 at 
 org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java
 :526)
 at 
 org.apache.fop.render.AbstractRenderer.renderFlow(AbstractRenderer.java:4
 24)
 at 
 org.apache.fop.render.AbstractPathOrientedRenderer.renderFlow

Re: pdf-image extension problems

2008-10-01 Thread Peter Coppens

Please ignore last stack trace / problem. My mistake. Apologies for the
noise.

Peter


Peter Coppens wrote:
 
 Got them. Thanks for that.
 
 Unfortunately I run into 'a next' problem.
 
 
 SEVERE: Exception stack tracejava.lang.IndexOutOfBoundsException: Index:
 3,
 Size: 2
 at java.util.ArrayList.RangeCheck(ArrayList.java:546)
 at java.util.ArrayList.get(ArrayList.java:321)
 at
 org.pdfbox.pdmodel.PDDocument.getPageFormat(PDDocument.java:776)
 at 
 org.apache.fop.render.pdf.pdfbox.PreloaderPDF.loadPDF(PreloaderPDF.java:114)
 at 
 org.apache.fop.render.pdf.pdfbox.PreloaderPDF.preloadImage(PreloaderPDF.java
 :73)
 at 
 org.apache.xmlgraphics.image.loader.ImageManager.preloadImage(ImageManager.j
 ava:165)
 at 
 org.apache.xmlgraphics.image.loader.cache.ImageCache.needImageInfo(ImageCach
 e.java:96)
 at 
 org.apache.xmlgraphics.image.loader.ImageManager.getImageInfo(ImageManager.j
 ava:112)
 at 
 org.apache.fop.fo.flow.ExternalGraphic.bind(ExternalGraphic.java:79)
 at org.apache.fop.fo.FObj.processNode(FObj.java:126)
 at 
 org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.jav
 a:286)
 at 
 org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:163)
 
 Before I try to isolate, anyone any clue?
 
 Thanks!
 
 Peter
 
 
 
 From: Maximilian Gaerber [EMAIL PROTECTED]
 Reply-To: fop-users@xmlgraphics.apache.org
 Date: Tue, 30 Sep 2008 15:17:02 +0200
 To: fop-users@xmlgraphics.apache.org
 Subject: Re: pdf-image extension problems
 
 Hi Peter,
 
 I sent the files separately.
 
 @Jeremias: I guess it would be worth throwing out a new release ;-)
 
 Regards,
 
 Max
 
 Peter Coppens schrieb:
 Hello,
 
 I am running into the same problem. Any chance I could get the fixed
 version
 as well?
 
 Many thanks indeed,
 
 Peter
 
 
 
 Frederic W wrote:
   
 Thanks a lot to Jeremias and Maximilian. They send me the development
 version of pdf-image extension and that works great !!
 :jumping:
 
 
 Frederic W wrote:
 
 Hi,
 I have exactly the same error. Please could you send me your build too
 or
 tell me when there will be a new release..
 Thanks a lot.
 Frédéric
 [EMAIL PROTECTED]
 
 
 Jeremias Maerki-2 wrote:
   
 Thanks for the bug report and the test case. I've fixed the bug and
 will
 send you a new build off-list. If there are no other bugs reported in
 the short term, I'll see if I can do another release.
 
 On 12.09.2008 17:58:19 Maximilian Gaerber wrote:
 
 Hi,
 
 when using the pdf-image extension I get an exception when trying to
 place a pdf where all box sizes (trim, media etc.) are the same. PDF
 attached.
 
 SCHWERWIEGEND: Error while rendering page 2
 java.lang.NullPointerException
 at 
 org.apache.fop.render.pdf.pdfbox.PDFBoxAdapter.createFormFromPDFBoxPage(P
 DFBoxAdapter.java:229)
 at 
 org.apache.fop.render.pdf.pdfbox.PDFBoxPDFImageHandler.generateImage(PDFB
 oxPDFImageHandler.java:93)
 at
 org.apache.fop.render.pdf.PDFRenderer.putImage(PDFRenderer.java:1745)
 at 
 org.apache.fop.render.pdf.PDFRenderer.renderImage(PDFRenderer.java:1679)
 at 
 org.apache.fop.render.AbstractRenderer.renderViewport(AbstractRenderer.ja
 va:743)
 at 
 org.apache.fop.render.AbstractPathOrientedRenderer.renderViewport(Abstrac
 tPathOrientedRenderer.java:621)
 at 
 org.apache.fop.render.AbstractRenderer.renderInlineArea(AbstractRenderer.
 java:626)
 at 
 org.apache.fop.render.pdf.PDFRenderer.renderInlineArea(PDFRenderer.java:1
 345)
 at 
 org.apache.fop.render.AbstractRenderer.renderLineArea(AbstractRenderer.ja
 va:601)
 at 
 org.apache.fop.render.pdf.PDFRenderer.renderLineArea(PDFRenderer.java:133
 6)
 at 
 org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java
 :536)
 at 
 org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:
 573)
 at 
 org.apache.fop.render.pdf.PDFRenderer.renderBlock(PDFRenderer.java:1329)
 at 
 org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java
 :526)
 at 
 org.apache.fop.render.AbstractPathOrientedRenderer.renderReferenceArea(Ab
 stractPathOrientedRenderer.java:548)
 at 
 org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:
 560)
 at 
 org.apache.fop.render.pdf.PDFRenderer.renderBlock(PDFRenderer.java:1329)
 at 
 org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java
 :526)
 at 
 org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:
 573)
 at 
 org.apache.fop.render.pdf.PDFRenderer.renderBlock(PDFRenderer.java:1329)
 at 
 org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java
 :526)
 at 
 org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:
 573)
 at 
 org.apache.fop.render.pdf.PDFRenderer.renderBlock(PDFRenderer.java:1329)
 at 
 org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java
 :526

pdf-image extension - exception when referred page does not exist

2008-10-01 Thread Peter Coppens

Hello,

When referring to a page that is not present in the pdf, the pdf-image
extension throws an exception.

SEVERE: Exception stack tracejava.lang.IndexOutOfBoundsException: Index: 3,
Size: 2
at java.util.ArrayList.RangeCheck(ArrayList.java:546)
at java.util.ArrayList.get(ArrayList.java:321)
at org.pdfbox.pdmodel.PDDocument.getPageFormat(PDDocument.java:776)
at
org.apache.fop.render.pdf.pdfbox.PreloaderPDF.loadPDF(PreloaderPDF.java:114)
at
org.apache.fop.render.pdf.pdfbox.PreloaderPDF.preloadImage(PreloaderPDF.java:73)
at
org.apache.xmlgraphics.image.loader.ImageManager.preloadImage(ImageManager.java:165)
at
org.apache.xmlgraphics.image.loader.cache.ImageCache.needImageInfo(ImageCache.java:96)
at
org.apache.xmlgraphics.image.loader.ImageManager.getImageInfo(ImageManager.java:112)
at
org.apache.fop.fo.flow.ExternalGraphic.bind(ExternalGraphic.java:79)


Is it thinkable to (optionally) change this behavior so that a SEVERE
message is logged but that processing continues...much like fop's standard
behavior when referring to non-existent images.

Thanks,

Peter
-- 
View this message in context: 
http://www.nabble.com/pdf-image-extension---exception-when-referred-page-does-not-exist-tp19758780p19758780.html
Sent from the FOP - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: pdf-image extension problems

2008-09-30 Thread Peter Coppens

Hello,

I am running into the same problem. Any chance I could get the fixed version
as well?

Many thanks indeed,

Peter



Frederic W wrote:
 
 Thanks a lot to Jeremias and Maximilian. They send me the development
 version of pdf-image extension and that works great !!
 :jumping:
 
 
 Frederic W wrote:
 
 Hi,
 I have exactly the same error. Please could you send me your build too or
 tell me when there will be a new release.. 
 Thanks a lot.
 Frédéric
 [EMAIL PROTECTED]
 
 
 Jeremias Maerki-2 wrote:
 
 Thanks for the bug report and the test case. I've fixed the bug and will
 send you a new build off-list. If there are no other bugs reported in
 the short term, I'll see if I can do another release.
 
 On 12.09.2008 17:58:19 Maximilian Gaerber wrote:
 Hi,
 
 when using the pdf-image extension I get an exception when trying to 
 place a pdf where all box sizes (trim, media etc.) are the same. PDF 
 attached.
 
 SCHWERWIEGEND: Error while rendering page 2
 java.lang.NullPointerException
 at 
 org.apache.fop.render.pdf.pdfbox.PDFBoxAdapter.createFormFromPDFBoxPage(PDFBoxAdapter.java:229)
 at 
 org.apache.fop.render.pdf.pdfbox.PDFBoxPDFImageHandler.generateImage(PDFBoxPDFImageHandler.java:93)
 at
 org.apache.fop.render.pdf.PDFRenderer.putImage(PDFRenderer.java:1745)
 at 
 org.apache.fop.render.pdf.PDFRenderer.renderImage(PDFRenderer.java:1679)
 at 
 org.apache.fop.render.AbstractRenderer.renderViewport(AbstractRenderer.java:743)
 at 
 org.apache.fop.render.AbstractPathOrientedRenderer.renderViewport(AbstractPathOrientedRenderer.java:621)
 at 
 org.apache.fop.render.AbstractRenderer.renderInlineArea(AbstractRenderer.java:626)
 at 
 org.apache.fop.render.pdf.PDFRenderer.renderInlineArea(PDFRenderer.java:1345)
 at 
 org.apache.fop.render.AbstractRenderer.renderLineArea(AbstractRenderer.java:601)
 at 
 org.apache.fop.render.pdf.PDFRenderer.renderLineArea(PDFRenderer.java:1336)
 at 
 org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:536)
 at 
 org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:573)
 at 
 org.apache.fop.render.pdf.PDFRenderer.renderBlock(PDFRenderer.java:1329)
 at 
 org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:526)
 at 
 org.apache.fop.render.AbstractPathOrientedRenderer.renderReferenceArea(AbstractPathOrientedRenderer.java:548)
 at 
 org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:560)
 at 
 org.apache.fop.render.pdf.PDFRenderer.renderBlock(PDFRenderer.java:1329)
 at 
 org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:526)
 at 
 org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:573)
 at 
 org.apache.fop.render.pdf.PDFRenderer.renderBlock(PDFRenderer.java:1329)
 at 
 org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:526)
 at 
 org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:573)
 at 
 org.apache.fop.render.pdf.PDFRenderer.renderBlock(PDFRenderer.java:1329)
 at 
 org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:526)
 at 
 org.apache.fop.render.AbstractRenderer.renderFlow(AbstractRenderer.java:424)
 at 
 org.apache.fop.render.AbstractPathOrientedRenderer.renderFlow(AbstractPathOrientedRenderer.java:577)
 at 
 org.apache.fop.render.AbstractRenderer.renderMainReference(AbstractRenderer.java:403)
 at 
 org.apache.fop.render.AbstractRenderer.renderBodyRegion(AbstractRenderer.java:337)
 at 
 org.apache.fop.render.AbstractRenderer.renderRegionViewport(AbstractRenderer.java:282)
 at 
 org.apache.fop.render.AbstractRenderer.renderPageAreas(AbstractRenderer.java:255)
 at 
 org.apache.fop.render.AbstractRenderer.renderPage(AbstractRenderer.java:229)
 at 
 org.apache.fop.render.pdf.PDFRenderer.renderPage(PDFRenderer.java:801)
 at 
 org.apache.fop.area.RenderPagesModel.addPage(RenderPagesModel.java:113)
 at 
 org.apache.fop.layoutmgr.AbstractPageSequenceLayoutManager.finishPage(AbstractPageSequenceLayoutManager.java:312)
 at 
 org.apache.fop.layoutmgr.PageSequenceLayoutManager.finishPage(PageSequenceLayoutManager.java:167)
 at 
 org.apache.fop.layoutmgr.AbstractPageSequenceLayoutManager.makeNewPage(AbstractPageSequenceLayoutManager.java:284)
 at 
 org.apache.fop.layoutmgr.PageBreaker.handleBreakTrait(PageBreaker.java:494)
 at
 org.apache.fop.layoutmgr.PageBreaker.startPart(PageBreaker.java:398)
 at 
 org.apache.fop.layoutmgr.AbstractBreaker.addAreas(AbstractBreaker.java:421)
 at 
 org.apache.fop.layoutmgr.AbstractBreaker.addAreas(AbstractBreaker.java:371)
 at 
 org.apache.fop.layoutmgr.PageBreaker.doPhase3WithColumnBalancing(PageBreaker.java:336)
 at
 org.apache.fop.layoutmgr.PageBreaker.doPhase3(PageBreaker.java:255)
 at 
 org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:346)
 at 
 

Re: fop, svg and cmyk colors

2008-09-11 Thread Peter Coppens
Maximilian,

For what it is worth I originally started (I think) the cmyk/icc support
that is currently in FOP (although I probably has been made more robust by
others who are familiar with the fop code).

At that time I also had a patch for Batik to support cmyk/icc colors. If I
remember correctly it more or less worked (for pdf output), but I never got
to submit it. It was a fairly clunky patch touching numerous source files
and I was far from sure I had it covered completely.

I guess I could delve it out from somewhere in case you are interested in
updating it and taking it through the patch submission process.

Hth

Peter


 From: Maximilian Gaerber [EMAIL PROTECTED]
 Reply-To: fop-users@xmlgraphics.apache.org
 Date: Thu, 11 Sep 2008 11:30:25 +0200
 To: fop-users@xmlgraphics.apache.org
 Subject: fop, svg and cmyk colors
 
 Hi all,
 
 I read some posts about cmyk integration in FOP and so far it seems to
 work for my purposes when using it directly in XSL-FO. The bigger issue
 is with SVG:
 
 - Illustrator or Inkscape will only export SVG with RGB color codes (HEX).
 - I could post-process the SVG graphics through xsl and add the cmyk
 information
 - But right now it seems the PDF output of FOP is not able to handle
 these colors
 
 What would be best practices at the moment with SVG, FOP and cmyk
 colors? Don't use? What else? Go back to EPS or rasterize the SVGs?
 
 Regards,
 
 Maximilian Gärber
 
 
 
 News des Monats: www.thermopal.de - E-Business Lösung mit System für
 Thermopal, eine Tochter der Pfleiderer AG: Neugestaltung, wegweisende
 Produktsuche und moderne Nutzerführung!
 
 -- 
 infolox GmbH
 Maximilian Gärber
 Bregenzer Straße 101
 D-88131 Lindau
 
 fon +49 8382 / 275 894-70
 fax +49 8382 / 275 894-9
 mob +49 176 / 20 10 33 24
 
 mail [EMAIL PROTECTED]
 www.infolox.de
 www.selektofix.de
 www.katalogfabrik.de
 www.typo3-services.com
 
 
 Rechtsform: Gesellschaft mit beschränkter Haftung
 Sitz der Gesellschaft: Lindau a. B.
 Registergericht: Amtsgericht Kempten
 Registernummer: HRB 8161
 Geschäftsführer: Stefan Bauhuis, Alexander Pircher, Richard Schmid
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Jpeg with ICC profile appears yellow

2008-06-25 Thread Peter Coppens
 Any idea?

This might be the same problem I discussed in a private exchange with
Jeremias a few weeks back. There is a problem with how color profiles are
copied. Conclusion at that time was

Apparently the embedded ICC profile in the pdf file that FOP creates
is wrong. The last four bytes are nul iso the correct values. This is
the Z component of the BlueColorant Tag. The result is a yellow shift.

Now, I thought issue was fixed in trunk, but it might be the trunk or latest
of xmlgraphics. Don't have the details on that.

Hth,

Peter



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



PDF images - IllegalStateException - Error registering a PDFObject: PDFObject already has an object number

2008-06-18 Thread Peter Coppens
Fop fans,

Somewhere deep in Œmy¹ web application when rendering a constructed fo I get

SEVERE: Exception stack tracejava.lang.IllegalStateException: Error
registering a PDFObject: PDFObject already has an object number
at 
org.apache.fop.pdf.PDFDocument.assignObjectNumber(PDFDocument.java:429)
at 
org.apache.fop.pdf.PDFDocument.registerObject(PDFDocument.java:414)
at 
org.apache.fop.render.pdf.pdfbox.PDFBoxAdapter.cloneForNewDocument(PDFBoxAda
pter.java:100)
at 
org.apache.fop.render.pdf.pdfbox.PDFBoxAdapter.transferDict(PDFBoxAdapter.ja
va:169)
at 
org.apache.fop.render.pdf.pdfbox.PDFBoxAdapter.cloneForNewDocument(PDFBoxAda
pter.java:133)
at 
org.apache.fop.render.pdf.pdfbox.PDFBoxAdapter.cloneForNewDocument(PDFBoxAda
pter.java:99)
at 
org.apache.fop.render.pdf.pdfbox.PDFBoxAdapter.cloneForNewDocument(PDFBoxAda
pter.java:142)
at 
org.apache.fop.render.pdf.pdfbox.PDFBoxAdapter.cloneForNewDocument(PDFBoxAda
pter.java:142)
at 
org.apache.fop.render.pdf.pdfbox.PDFBoxAdapter.createFormFromPDFBoxPage(PDFB
oxAdapter.java:182)
at 
org.apache.fop.render.pdf.pdfbox.PDFBoxPDFImageHandler.generateImage(PDFBoxP
DFImageHandler.java:93)
at 
org.apache.fop.render.pdf.PDFRenderer.putImage(PDFRenderer.java:1745)
at 
org.apache.fop.render.pdf.PDFRenderer.renderImage(PDFRenderer.java:1679)
at 
org.apache.fop.render.AbstractRenderer.renderViewport(AbstractRenderer.java:
734)
at 
org.apache.fop.render.AbstractPathOrientedRenderer.renderViewport(AbstractPa
thOrientedRenderer.java:557)
at 
org.apache.fop.render.AbstractRenderer.renderInlineArea(AbstractRenderer.jav
a:617)
at 
org.apache.fop.render.pdf.PDFRenderer.renderInlineArea(PDFRenderer.java:1345
)
at 
org.apache.fop.render.AbstractRenderer.renderLineArea(AbstractRenderer.java:
592)
at 
org.apache.fop.render.pdf.PDFRenderer.renderLineArea(PDFRenderer.java:1336)
at 
org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:52
9)
at 
org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:564
)
at 
org.apache.fop.render.pdf.PDFRenderer.renderBlock(PDFRenderer.java:1329)
at 
org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:51
9)
at 
org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:564
)
at 
org.apache.fop.render.pdf.PDFRenderer.renderBlock(PDFRenderer.java:1329)
at 
org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:51
9)
at 
org.apache.fop.render.AbstractPathOrientedRenderer.renderBlockViewport(Abstr
actPathOrientedRenderer.java:478)

...

I was wondering whether someone can diagnose this without me having to try
and extract a repro.

Thanks indeed!

Peter


Re: PDF images - IllegalStateException - Error registering a PDFObject: PDFObject already has an object number

2008-06-18 Thread Peter Coppens
Just bumped into the announcement for the 1.2 release of the component which
says.

- Fixed PDFObject already has an object number error occurring with
certain PDFs. 

I¹ll first upgrade :)

Sorry for the noise

Peter


On 18/06/08 22:30, Peter Coppens [EMAIL PROTECTED] wrote:

 Fop fans,
 
 Somewhere deep in Œmy¹ web application when rendering a constructed fo I get
 
 SEVERE: Exception stack tracejava.lang.IllegalStateException: Error
 registering a PDFObject: PDFObject already has an object number
 at 
 org.apache.fop.pdf.PDFDocument.assignObjectNumber(PDFDocument.java:429)
 at org.apache.fop.pdf.PDFDocument.registerObject(PDFDocument.java:414)
 at 
 org.apache.fop.render.pdf.pdfbox.PDFBoxAdapter.cloneForNewDocument(PDFBoxAdapt
 er.java:100)
 at 
 org.apache.fop.render.pdf.pdfbox.PDFBoxAdapter.transferDict(PDFBoxAdapter.java
 :169)
 at 
 org.apache.fop.render.pdf.pdfbox.PDFBoxAdapter.cloneForNewDocument(PDFBoxAdapt
 er.java:133)
 at 
 org.apache.fop.render.pdf.pdfbox.PDFBoxAdapter.cloneForNewDocument(PDFBoxAdapt
 er.java:99)
 at 
 org.apache.fop.render.pdf.pdfbox.PDFBoxAdapter.cloneForNewDocument(PDFBoxAdapt
 er.java:142)
 at 
 org.apache.fop.render.pdf.pdfbox.PDFBoxAdapter.cloneForNewDocument(PDFBoxAdapt
 er.java:142)
 at 
 org.apache.fop.render.pdf.pdfbox.PDFBoxAdapter.createFormFromPDFBoxPage(PDFBox
 Adapter.java:182)
 at 
 org.apache.fop.render.pdf.pdfbox.PDFBoxPDFImageHandler.generateImage(PDFBoxPDF
 ImageHandler.java:93)
 at 
 org.apache.fop.render.pdf.PDFRenderer.putImage(PDFRenderer.java:1745)
 at 
 org.apache.fop.render.pdf.PDFRenderer.renderImage(PDFRenderer.java:1679)
 at 
 org.apache.fop.render.AbstractRenderer.renderViewport(AbstractRenderer.java:73
 4)
 at 
 org.apache.fop.render.AbstractPathOrientedRenderer.renderViewport(AbstractPath
 OrientedRenderer.java:557)
 at 
 org.apache.fop.render.AbstractRenderer.renderInlineArea(AbstractRenderer.java:
 617)
 at 
 org.apache.fop.render.pdf.PDFRenderer.renderInlineArea(PDFRenderer.java:1345)
 at 
 org.apache.fop.render.AbstractRenderer.renderLineArea(AbstractRenderer.java:59
 2)
 at 
 org.apache.fop.render.pdf.PDFRenderer.renderLineArea(PDFRenderer.java:1336)
 at 
 org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:529)
 at 
 org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:564)
 at 
 org.apache.fop.render.pdf.PDFRenderer.renderBlock(PDFRenderer.java:1329)
 at 
 org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:519)
 at 
 org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:564)
 at 
 org.apache.fop.render.pdf.PDFRenderer.renderBlock(PDFRenderer.java:1329)
 at 
 org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:519)
 at 
 org.apache.fop.render.AbstractPathOrientedRenderer.renderBlockViewport(Abstrac
 tPathOrientedRenderer.java:478)
 
 ...
 
 I was wondering whether someone can diagnose this without me having to try and
 extract a repro.
 
 Thanks indeed!
 
 Peter 



Re: Making a Large Dictionary

2008-05-18 Thread Peter Coppens

Ted,

No idea whether this is practical for your case nor whether it would  
actually make a difference, but you could try a two step approach


First render the 12000 entries to pdf (a 'page' for each entry), then  
use a second fo stylesheet that refers to the pdf pages as external  
graphics. See http://www.jeremias-maerki.ch/development/fop/ on how to  
use pdf (pages) as external graphics. If you are lucky fop will use  
pdf xobjects for each of the pdf pages and include them only once.


Perhaps it helps,

Peter


On 18 May 2008, at 06:10, Ted Young wrote:


Greetings to the list,

I am using FOP version 0 .94 under Java 1.6 update 6.

I am using FOP to create a PDF dictionary from a source XML file.   
There are only 12,000 entries in this dictionary.  The tricky bit is  
that the words being defined are in Ancient Egyptian Hieroglyphs.   
Each word (or phrase) is stored in SVG format.  So ultimately my FO  
document contains 12,000 instream-foreign-object tags each  
containing SVG.  This configuration alone taxes the 1 GB memory  
limit I am able to give to my virtual machine (a known issue with  
running Java under Windows).


Each dictionary entry would like to contain zero or more alternative  
words and phrases (think thesaurus).  This increases the number of  
instream-foreign-object tags containing SVG to the order of 30,000  
or 40,000.  Even breaking this up into individual chapters I have a  
very hard time rendering these documents.  They consume vast amounts  
of memory and bring my system to a halt even under Linux.


So I was wondering if anyone had any suggestions on how I could  
optimize my FO document and use of SVG.  Since all of the see also  
words and phrases can be found elsewhere in my document is there a  
way to generate a PDF-layer reference to content located at another  
part of a document? I am thinking of something analogous to symbols  
in Flash; a way of having FOP render the SVG word or phrase once and  
have it instruct the PDF to reuse that content in many locations.


Converting these to images is less than ideal since ancient Egyptian  
hieroglyphs contain a lot of fine detail that would be lost or  
blurred if rasterized.  One of my main reasons for choosing this  
approach was that I knew FOP would preserve the hieroglyphs in  
vector format.


For what it is worth without the SVG content FOP runs  
fantastically.  So this seems to be due to the sheer volume of  
vector data added to the rendering process by the inclusion of all  
of these SVG elements.


Since this is my first time ever mailing and FOP related mailing  
list when they take this opportunity to say that I have been using  
FOP for over seven years now and have enjoyed every minute of it.   
This is a fantastic product and I think the improvements in this new  
branch in performance and API are nothing less than spectacular!   
Thank you to everyone contributing to this project.


Ted young




Re: variable size output (pages)?

2008-05-06 Thread Peter Coppens
Can't you use different page masters and select the one that is  
appropriate using some (XSLT) pre-processing?


On 06 May 2008, at 14:16, paul womack wrote:


I need to generate output (PDF) where the page
size (actually just page depth) varies
with the content.

In effect I want to generate galleys of text,
where the formatting width is known, but the depth
of the final output is determined by the amount
of text formatted, in effect fitting the page
to the content.

I have tried to search the documentation,
but am greatly hampered by not knowing
the terminology well enough to search effectively.

It appears that I can fake what I want by
either using imageprocessing to autocrop
the output, or (possibly) by doing
something to the XML area tree, and performing
a second pass, but if there's a proper
way to achieve my goal, that'd be great.

I would welcome either advice, or simply
a pointer to any relevant parts of the
specification(s) or documentation.

 BugBear

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: variable size output (pages)?

2008-05-06 Thread Peter Coppens
Ic...so there is no way to know what the page size will have to be  
until the layout has been completed?


On 06 May 2008, at 14:25, paul womack wrote:


Peter Coppens wrote:
Can't you use different page masters and select the one that is  
appropriate using some (XSLT) pre-processing?


I'd need an almost infinite range of
masters - the line count could vary from 5-350,
and even line spacing could vary due to superscripts,
subscripts, emboldening etc.

So I think the answers no; in anycase, a two pass
solution (via the area tree) is already
my fall back option, but it feels
like a dirty hack.

 BugBear

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: fop throws a javax.xml.transform.TransformerException

2008-04-27 Thread Peter Coppens
You might have missed the reply, or perhaps it was discarded somewhere  
along the way, but Andreas (Delmelle) did reply


See  e.g. 
http://www.nabble.com/fop-throws-a-javax.xml.transform.TransformerException-td16840978.html

Copying his reply

quote

Definitely an issue with the input document. The error means that the
document has something like:

fo:flow ...
   ...
   fo:inline...

Which is not valid. The fo:flow's content model is restricted to only
block-level elements, like fo:block, fo:block-container, fo:list-
block, fo:table... An fo:wrapper would also be allowed, but an
fo:inline as direct flow-descendant is definitely in violation of the
XSL-FO Recommendation.

Check the input document with an XPath like: //fo:inline
[parent::fo:flow] to find the offending elements.


HTH!

Cheers

Andreas


/quote


On 27 Apr 2008, at 15:10, Bart Van Assche wrote:


Hello,

I did not receive any replies to the e-mail below. Did I send this
e-mail the right mailing list ?

Bart.

On Tue, Apr 22, 2008 at 8:23 PM, Bart Van Assche
[EMAIL PROTECTED] wrote:

Hello,

I'm trying to convert a document with fop to PDF format. The error
message cited below is not really clear to me. Is this a fop issue or
an issue with the input document (index.fo) ?

$ rpm -q fop
fop-0.94-31
$ export JAVA_HOME=/usr/java/jre1.6.0_05
$ FOP_OPTS=-Xmx900M fop index.fo index.pdf
...
Apr 22, 2008 8:15:23 PM org.apache.fop.fo.ElementMappingRegistry  
findFOMaker

WARNING: Unknown formatting object http://www.tug.org/fotex^bookmark
Apr 22, 2008 8:15:23 PM org.apache.fop.cli.Main startFOP
SEVERE: Exception
javax.xml.transform.TransformerException:
org.apache.fop.fo.ValidationException:
file:/home/bart/software/valgrind/docs/print/index.fo:4369:4879:
Error(4369/4879): fo:inline is not a valid child element of fo:flow.
   at  
org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:168)
   at  
org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)

   at org.apache.fop.cli.Main.startFOP(Main.java:166)
   at org.apache.fop.cli.Main.main(Main.java:197)

-

javax.xml.transform.TransformerException:
org.apache.fop.fo.ValidationException:
file:/home/bart/software/valgrind/docs/print/index.fo:4369:4879:
Error(4369/4879): fo:inline is not a valid child element of fo:flow.
   at  
org 
.apache 
.xalan 
.transformer 
.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:501)
   at  
org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:165)
   at  
org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)

   at org.apache.fop.cli.Main.startFOP(Main.java:166)
   at org.apache.fop.cli.Main.main(Main.java:197)
Caused by: org.apache.fop.fo.ValidationException:
file:/home/bart/software/valgrind/docs/print/index.fo:4369:4879:
Error(4369/4879): fo:inline is not a valid child element of fo:flow.
   at org.apache.fop.fo.FONode.invalidChildError(FONode.java:411)
   at org.apache.fop.fo.FONode.invalidChildError(FONode.java:396)
   at  
org.apache.fop.fo.pagination.Flow.validateChildNode(Flow.java:106)
   at org.apache.fop.fo.FOTreeBuilder 
$MainFOHandler.startElement(FOTreeBuilder.java:302)
   at  
org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:185)
   at  
org 
.apache 
.xalan 
.transformer 
.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java: 
1072)
   at  
org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown

Source)
   at  
org 
.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown

Source)
   at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl 
$FragmentContentDispatcher.dispatch(Unknown

Source)
   at  
org 
.apache 
.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown

Source)
   at  
org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
   at  
org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)

   at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
   at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown  
Source)
   at  
org 
.apache 
.xalan 
.transformer 
.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:484)

   ... 4 more
-
org.apache.fop.fo.ValidationException:
file:/home/bart/software/valgrind/docs/print/index.fo:4369:4879:
Error(4369/4879): fo:inline is not a valid child element of fo:flow.
   at org.apache.fop.fo.FONode.invalidChildError(FONode.java:411)
   at org.apache.fop.fo.FONode.invalidChildError(FONode.java:396)
   at  
org.apache.fop.fo.pagination.Flow.validateChildNode(Flow.java:106)
   at org.apache.fop.fo.FOTreeBuilder 
$MainFOHandler.startElement(FOTreeBuilder.java:302)
   at  
org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:185)
   at  
org 
.apache 
.xalan 
.transformer 
.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java: 
1072)
   at  

Re: Problem with rendering PNG images

2008-04-22 Thread Peter Coppens
We have recently reported something similar (it might have been in  
private to Jeremias...can't remember) and he fixed that problem just  
this week. It was related to a color profile being truncated (or  
something like that). Might be the same issue. Perhaps you can try the  
trunk version of fop or post one of your images.


Hth,

Peter

On 22 Apr 2008, at 14:57, Jean-François El Fouly wrote:


I have a problem with the way PNG images are rendered.
I'm writing tools to manage aircraft technical documentations. One  
of the documents is the Pilot's Guide, it has quite a lot of  
cockpit screens screenshots. The source image files are all PNG's,  
and they have very bright, fully saturated colours such as bright  
green (0,255,0) -- on black.
Yet these images are rendered by FOP in the target PDF with dull  
colors, rather pale green, pale yellow, pale magenta -- and  
obviously the customer rejects the document as it is now.


Adobe Acrobat Professional seems to tell in the properties that the  
generated PDF document is CMYK, while the source images are  
obviously RGB. But I'm not quite sure we understand and interpret  
this correctly, so take this hint with a pinch of salt.


I've looked in quite a lot of directions such as manipulating source  
images and target resolutions to prevent image resizing (source =  
target = 300 dpi), or investigated JAI related questions but to no  
avail. My feeling, reading pieces of the FOP 0.94 source code  
(ImageFactory) is that JAI is not used at all for the processing of  
PNG images, it all seems to occur between ImageIO and a PNGImage  
class that use Apache xmlgraphics own codec.


Could the problem be related to the gamma correction
param.setPerformGammaCorrection(true);
that is used in PNGImage ?

By now, all in all, I'm puzzled and can't figure what's happening  
and how to find a solution to this problem.


If someone has an idea I'd be soo grateful ;-)



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problem with rendering PNG images

2008-04-22 Thread Peter Coppens

I dug up the original problem

It was described as

I've done some additional experiments. It turns out that all RGB- 
based

color profiles that are not sRGB exhibit the same problem.


If you png falls under the above then you might benefit from trying  
the latest svn sources



Peter



On 22 Apr 2008, at 15:23, Jean-François El Fouly wrote:


Peter Coppens a écrit :
We have recently reported something similar (it might have been in  
private to Jeremias...can't remember) and he fixed that problem  
just this week. It was related to a color profile being truncated  
(or something like that). Might be the same issue. Perhaps you can  
try the trunk version of fop or post one of your images.


Hth,

Peter


Great news ! Sounds interesting.
I will try to generate an example source image and PDF document (I  
may not disclose the ones I use for real).



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to underline a graphic

2008-04-21 Thread Peter Coppens

Perhaps border properties could help you achieve what you want?

On 21 Apr 2008, at 15:32, [EMAIL PROTECTED] wrote:



Hello,

I insert a little graphic in an underlined text but it is not  
underlined.


fo:block text-decoration=underline
 Text is underlined fo:external-graphic src=logo.png
content-height=1.5em/  but not graphic.
/fo:block

I think it is normal because I find nothing in the W3C specification  
to

underline fo:external-graphic.
(fo:inline / fo:page-number / fo:page-number-citation / fo:character  
can be

underlined but fo:leader / fo:external-graphic can not)

But can somebody give me a way to have the same rendering as an  
underlined

graphic ?

Thanks,
Patrice





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Fop 0.95beta - svg tif images

2008-04-13 Thread Peter Coppens

Thanks Jeremiasas always, very thorough work/analysis.

Is it correct you always used JAI TIFF codec in your measurements and  
never the xmlgraphics fix you added on Friday. The one that supports  
tiff without jai at all?


If so, any chance at all you could measure the performance of that fix/ 
patch on your xp box as well?


Thanks,

Peter


On 13 Apr 2008, at 10:02, Jeremias Maerki wrote:
Peter sent me one of his large TIFF images to test with. Thanks,  
Peter.

I used his FO snippet he posted at the beginning of the thread so the
firgures below are including Batik into the picture.

The TIFF file: RGB, LZW compression, 1327x3682 pixels, 2.73MB

I couldn't see a factor 6 increase of time necessary to process the
picture on my Windows XP SP2 except when run inside my profiler but
that's due to method instrumentation overhead. The normal runtime  
effect

was far smaller. As you can see I didn't experience slower performance
with FOP Trunk/0.95beta compared to 0.94. Here's what I measured  
(please
note that the figures below always refer to the server VM with  
parallel

GC enabled, JVM startup and class loading is included in the times):

FOP 0.94 (Commons' TIFF codec)

Java 1.4.2: 4.0 sec
Java 1.5.0: 3.6 sec
Java 6: 3.3 sec

Trunk (comparable to 0.95beta, JAI TIFF codec)

Java 1.4.2: 2.9 sec
Java 1.5.0: 2.9 sec
Java 1.6: 2.6 sec

When profiled with my YourKit profiler I found two hotspots which are
now fixed:
http://svn.apache.org/viewvc?rev=647537view=rev
http://svn.apache.org/viewvc?rev=647536view=rev

The latter hotspot in Commons is only triggered when my new TIFF image
loader is used.

0.95 Branch (including my performance fixes, JAI TIFF codec):

Java 1.4.2: 2.2 sec
Java 1.5.0: 2.0 sec
Java 6.0: 1.9 sec

0.95 Branch (including my performance fixes, internal TIFF codec):

Java 1.4.2: 2.7 sec
Java 1.5.0: 2.4 sec
Java 6.0: 2.3 sec

Just as an experiment I've converted the TIFF image to JPEG with
relatively low compression so there are no serious artifacts. The
resulting JPEG image is 425KB. If performance is important and the
images are suitable (fotos), JPEG can be an option since the images
don't have to be decoded for PDF production. Here's the result:

0.95 Branch (including my performance fixes):
Java 6.0: 1.1 sec


On 12.04.2008 11:37:01 Jeremias Maerki wrote:
snip/

If Peter sends me his test TIFF I'll profile the problem. A factor 6
increase is certainly not to be expected.

snip/



Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Fop 0.95beta - svg tif images

2008-04-13 Thread Peter Coppens

Pfff...sorry for the noise.

I'll double check my measurements on MacOS and will also try to  
measure on Debian (where the app is in production). I can live with  
the slowdown on Mac and so hopefully it does not show up on Debian


Thanks again!

Peter

On 13 Apr 2008, at 11:19, Jeremias Maerki wrote:

That's why I provided two different measurements for the 0.95 branch:
once with JAI's codec and once with Commons' TIFF codec (internal  
TIFF

codec) which is enabled by my fix from Friday. You can see that the
internal TIFF codec adds about 0.4 seconds in my environment  
compared to

the JAI codec.

On 13.04.2008 10:38:27 Peter Coppens wrote:

Thanks Jeremiasas always, very thorough work/analysis.

Is it correct you always used JAI TIFF codec in your measurements and
never the xmlgraphics fix you added on Friday. The one that supports
tiff without jai at all?

If so, any chance at all you could measure the performance of that  
fix/

patch on your xp box as well?

Thanks,

Peter


On 13 Apr 2008, at 10:02, Jeremias Maerki wrote:

Peter sent me one of his large TIFF images to test with. Thanks,
Peter.
I used his FO snippet he posted at the beginning of the thread so  
the

firgures below are including Batik into the picture.

The TIFF file: RGB, LZW compression, 1327x3682 pixels, 2.73MB

I couldn't see a factor 6 increase of time necessary to process the
picture on my Windows XP SP2 except when run inside my profiler but
that's due to method instrumentation overhead. The normal runtime
effect
was far smaller. As you can see I didn't experience slower  
performance

with FOP Trunk/0.95beta compared to 0.94. Here's what I measured
(please
note that the figures below always refer to the server VM with
parallel
GC enabled, JVM startup and class loading is included in the times):

FOP 0.94 (Commons' TIFF codec)

Java 1.4.2: 4.0 sec
Java 1.5.0: 3.6 sec
Java 6: 3.3 sec

Trunk (comparable to 0.95beta, JAI TIFF codec)

Java 1.4.2: 2.9 sec
Java 1.5.0: 2.9 sec
Java 1.6: 2.6 sec

When profiled with my YourKit profiler I found two hotspots which  
are

now fixed:
http://svn.apache.org/viewvc?rev=647537view=rev
http://svn.apache.org/viewvc?rev=647536view=rev

The latter hotspot in Commons is only triggered when my new TIFF  
image

loader is used.

0.95 Branch (including my performance fixes, JAI TIFF codec):

Java 1.4.2: 2.2 sec
Java 1.5.0: 2.0 sec
Java 6.0: 1.9 sec

0.95 Branch (including my performance fixes, internal TIFF codec):

Java 1.4.2: 2.7 sec
Java 1.5.0: 2.4 sec
Java 6.0: 2.3 sec

Just as an experiment I've converted the TIFF image to JPEG with
relatively low compression so there are no serious artifacts. The
resulting JPEG image is 425KB. If performance is important and the
images are suitable (fotos), JPEG can be an option since the images
don't have to be decoded for PDF production. Here's the result:

0.95 Branch (including my performance fixes):
Java 6.0: 1.1 sec


On 12.04.2008 11:37:01 Jeremias Maerki wrote:
snip/
If Peter sends me his test TIFF I'll profile the problem. A  
factor 6

increase is certainly not to be expected.

snip/



Jeremias Maerki




Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: images in pdf file

2008-04-13 Thread Peter Coppens

Wrt to the imagepreloader not found, you might want to check 
http://xmlgraphics.apache.org/fop/0.95/graphics.html

To summarize, you will need JAI Image I/O Tools for bmp to be  
supported as an input format


Hth,

Peter

On 13 Apr 2008, at 00:07, morten wrote:

hi

I am trying to do a basic docbook - xls-fo - pdf

It is a basic docbook book written in conglomerate on my newly  
installed

debian system. I use the latest fop-095beta.

I have tried to include an image, but it does not show up in the pdf.

What I do:
- use conglomerate to create a small docbook called mbndocbooktest.xml

- generate the xls-fo : I use the style sheet included in debian to  
do the

conversion.
$ xsltproc /usr/share/xml/docbook/stylesheet/nwalsh/fo/docbook.xsl
mbndocbooktest.xml  mbndocbooktest.fo.xml

- convert using fop
$ ../../download/fop/fop-0.95beta/fop mbndocbooktest.fo.xml  
mbndocbooktest.pdf


Selected output is shown at the end.

I also have an issue with draft.png, but I have read that it is a  
question of
status=draft or something to that effect. The interesting part is  
that the
error related to this image is Background image not available.  
This makes

sense since the draft.png is unavailable.

My error is No ImagePreloader found. I have tried to google it,  
and search

the archive but apparently I am looking in the wrong place.

Any suggestions?
cheers

Morten


Selected texts from the process.
--- docbook xml extract ---
   chapter status=quot;notdraftquot;
   titleHello, world/title
   screenshot
   graphic fileref=file:///home/morten/Devel/FS/SomeImage.bmp 
/

   /screenshot
   paraThis is my first DocBook file./para
   paralkjlkjlkj/para
   /chapter

--- xml-fo extract ---
   fo:block
   fo:external-graphic
src=url(file:///home/morten/Devel/FS/SomeImage.bmp) width=auto
height=auto content-width=auto content-height=auto/
   /fo:block

--- Fop error extract ---
12-Apr-08 11:35:47   
org.apache.fop.fo.properties.CommonBorderPaddingBackground

init
SEVERE: Background image not available:
http://docbook.sourceforge.net/release/images/draft.png

12-Apr-08 11:35:48  org.apache.fop.fo.flow.ExternalGraphic bind
SEVERE: Image not available: No ImagePreloader found for
file:///home/morten/Devel/FS/SomeImage.bmp



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Fop 0.95beta - svg tif images

2008-04-12 Thread Peter Coppens


On 12 Apr 2008, at 13:09, Andreas Delmelle wrote:

On Apr 11, 2008, at 23:30, Peter Coppens wrote:

Hi Peter



I don't like the jai dependancy (don't like native Java libraries)


Very rightly so. As demonstrated by this particular case, if one  
platform lacks native support, it seriously breaks the usability of  
the library as a platform-independent way of handling images.


Maybe this will be better in Apple Java 6, but I can't test since  
the DP is only available for 64-bit Intel Macs and I'm still on  
PowerPC... :(

I did...and these are decoders that are available
BMP
bmp
jpg
JPG
wbmp
jpeg
png
PNG
JPEG
WBMP
GIF
gif



but Jeremias' patch would solve that. The 6x performance hit  
is more troublesome :(


Does this performance hit here also increase with the number of  
TIFFs you include (as you verified with Sun's pure Java  
implementation),

yes it does...that was the point I was trying to make

or is the effect restricted to the first one?

No, it does not,.
If you include, say 6 different images, is there still a 6x  
performance hit, or does it shrink?

Have not tried to be honest
The latter would ind1icate that the performance hit could actually  
be a sign of good scalability (always think positive ;-)).
A performance /hit/ for very low numbers, which decreases, then once  
a threshold is reached, translates itself into an actual  
performance /benefit/ for the larger numbers (?)
An algorithm with linear behavior will perform better (sometimes / 
much/ better) for only one execution, than one with logarithmic  
behavior. The latter, OTOH, will very soon become your friend as the  
number of executions starts to grow. Slower for a single execution  
due to the added complexity, but this added complexity would  
precisely have as its purpose to reduce the runtime for future  
executions. Only if there are none, does this become pure overhead.

Yes thanks for the refreshment (I had my share of csc :) ).

Another thing you could try out: Is there a similar difference in  
timing if the TIFF is included as an fo:external-graphic? That would  
already allow to factor Batik out of the equation.

Yes indeed...that would be a good parameter to play with.




Cheers

Andreas

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Fop 0.95beta - svg tif images

2008-04-11 Thread Peter Coppens


On 11 Apr 2008, at 17:48, Andreas Delmelle wrote:

On Apr 11, 2008, at 07:18, Peter Coppens wrote:
Tried 2 more tiffs (but from the same 'source'). They gave the  
similar results for relative performance. 1 (0.94) vs 30 (0.95beta)  
vs 6(0.95beta-jeremias-tiff)



Given my non existent knowledge on tiff (and image formats in  
general) and (I am sure recognizable) chronic lack of time to dive  
into image formats at this moment, I am afraid I would not even  
know with which tiff parameters to play




Which properties did you alter exactly? In the meantime, I read  
somewhere that Apple's native TIFF codec for JAI does not provide  
support for big-endian TIFFs.
None to be honest. Just took other tiff files. Would be nice if  
someone could try to reproduce my findings on another platform with  
other files. Perhaps this is a macos only issue...although the fact  
that 0.94 is faster than 0.95beta-jeremias-tiff would make  
that weird.



Cheers

Andreas

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Fop 0.95beta - svg tif images

2008-04-11 Thread Peter Coppens


although the fact that 0.94 is faster than 0.95beta-jeremias-tiff  
would make that weird.


Not really. It would be much weirder IMO if FOP (or any software for  
that matter) were to offer increased flexibility/functionality/ 
features without any performance penalty whatsoever. If that were  
the case, Vista should run on a 386 without any noticeable slow-down  
when compared to, say, Windows 3.11... errmmm.

Oh...well let's leave windows out of this  :)


I'd think it pretty 'normal' that the new image-handling framework  
adds /some/ overhead. A factor of six would be on the high side,  
though, but nothing points in the direction of the image-handling  
framework alone. A lot has been changed and added between 0.94 and  
0.95, so even though this may seem 'weird', I somehow expect 0.95 to  
be slightly slower than 0.94.


I understand that...no such thing as a free lunch. But as you said, a  
factor 6 (assuming what I found is correct) irrespective of where in  
fop/xmlgraphics/batik the slowdown lies, is...a lot.


Also, since (I presume) you are timing singular runs, there is no  
accounting for things like static initialization. This only occurs  
for the very first run in a given runtime session. If the newer code  
moved some parts to those areas, then this would only slow down that  
first run, but could speed up/save memory in all subsequent runs in  
the same VM.


Well, the numbers come from single runs yes. Otoh, I started out with  
a stylesheet with more tiff's (which is how I originally ran into the  
slowdown). There the performance penalty was far worse ...to the  
extent that it makes the (web) application unusable with 0.95beta. To  
be complete - that was before the 'jeremias-tiff' version.


I'll try to find some time to ...well...not sure what I can do. But  
it's either ignore post 0.94 versions or fix something (and I want to  
use post 0.94 versions for different reasons)


I will try to profile the code I guess and figure out where the  
problem might have been introduced (which will be quite an adventure  
having no real idea how the code is structured nor what was changed  
when...I know svn does help there).


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Fop 0.95beta - svg tif images

2008-04-11 Thread Peter Coppens

YeahI wrote my first jai program earlier today

import javax.imageio.*;

public class ListImageDecoders {
public static void main (String args[]) {
  String rfn[]=ImageIO.getReaderFormatNames();  
  for(String rf:rfn) {
System.out.println(rf);
 }
}
}

and came to the same conclusion you did.

I don't like the jai dependancy (don't like native Java libraries) but  
Jeremias' patch would solve that. The 6x performance hit is more  
troublesome :(


(but I don't want to be whining all the time ...I do appreciate the  
time you spent on this)


Peter


Well...for me
On 11 Apr 2008, at 22:59, Andreas Delmelle wrote:

On Apr 11, 2008, at 19:26, Andreas Delmelle wrote:

On Apr 11, 2008, at 18:20, Peter Coppens wrote:


Well, did a very quick test here, and without Jeremias' change, any  
TIFF that is produced by Preview indeed fails with the message you  
provided earlier.
Seems the issue is isolated to OS X. I guess one important thing to  
check on the side of XMLGraphics is whether the native OS X TIFF  
reader has peculiarities which make it undetectable somehow.


Checked closer, and the result of ImageIO.getReaderMimeTypes() does  
not contain image/tiff as a supported type on my system, so it's  
normal behavior on the side of XG Commons.
Browsed around a bit more, and the impression I'm getting is that  
ImageIO TIFF support was available at one point. I read posts  
mentioning tiff as a natively supported type on Java 1.4.2. Then  
again, most posts I found indicate nothing but trouble and security  
issues. The latest I could gather was that it was 'currently  
unavailable, but put on the planning', but as far as I could tell,  
not really with the highest priority...



Cheers

Andreas

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Fop 0.95beta - svg tif images

2008-04-10 Thread Peter Coppens

Dearest FOP/Batik fans (I am unclear where to post...sorry),

With FOP 0.94/Batik 1.6, the fo/svg fragment listed lower worked ok. I  
switched to FOP0.95beta (which seems to come with a newer batik  
version, 1.7) and get


SEVERE: SVG ErrorCannot load image (no suitable loader/converter  
combination available) for file:/lap-pc-migration/Downloads/RenderX/ 
inx2fo/mda/./Ostern_DIN Lang_back.tif (image/tiff)
org.apache.xmlgraphics.image.loader.ImageException: Cannot load image  
(no suitable loader/converter combination available) for file:/lap-pc- 
migration/Downloads/RenderX/inx2fo/mda/./Ostern_DIN Lang_back.tif  
(image/tiff)
at  
org 
.apache 
.xmlgraphics.image.loader.ImageManager.getImage(ImageManager.java:248)

   

I am guessing this is all about the new image library, but I am not  
sure really and I am even less sure how to deal with this.


Anyone any thoughts?

Tx!

Peter

FO fragment

fo:block-container absolute-position=fixed 
left=0pt
top=0pt width=318.6pt 
height=884pt
fo:block
fo:instream-foreign-object
content-width=318.6pt 
content-height=884pt
svg:svg width=318.6 
height=884
viewbox=0, 0, 318.6, 
884
svg:g

transform=translate(159.3, 442)
svg:g

transform=matrix(1, 0, 0, 1, -0.06, 0.04)
svg:rect 
x=-159.24

y=-441.960004 width=318.48

height=883.92001 fill=none stroke=none /

svg:g

transform=translate(-159.24, -441.960004)

svg:svg overflow=hidden

width=318.48 height=883.92001
   
 svg:g
 
   transform=translate(159.24, 441.960004)
   
 svg:g
		transform=matrix(1, 0, 0, 1, -159.24,  
-441.960004)

   
 svg:image
  
  xmlns:xlink=http://www.w3.org/1999/xlink; x=0 y=0
  
  width=318.48 height=883.92001 fill=none
  
  stroke=none
 
   xlink:href=Ostern_DIN Lang_back.tif /
  
  /svg:g
  
  /svg:g
  
  /svg:svg

/svg:g
svg:rect 
x=-159.24

y=-441.960004 width=318.48

height=883.92001 fill=none stroke-width=0pt /
/svg:g
/svg:g
/svg:svg
/fo:instream-foreign-object
 

Re: Fop 0.95beta - svg tif images

2008-04-10 Thread Peter Coppens
(AbstractRenderer.java: 
424)
at  
org 
.apache 
.fop.render.AbstractRenderer.renderMainReference(AbstractRenderer.java: 
403)
at  
org 
.apache 
.fop.render.AbstractRenderer.renderBodyRegion(AbstractRenderer.java:337)
at  
org 
.apache 
.fop 
.render.AbstractRenderer.renderRegionViewport(AbstractRenderer.java:282)
at  
org 
.apache 
.fop.render.AbstractRenderer.renderPageAreas(AbstractRenderer.java:255)
at  
org 
.apache.fop.render.AbstractRenderer.renderPage(AbstractRenderer.java: 
229)
at  
org.apache.fop.render.pdf.PDFRenderer.renderPage(PDFRenderer.java:801)
at  
org.apache.fop.area.RenderPagesModel.addPage(RenderPagesModel.java:113)

at org.apach



On 10 Apr 2008, at 16:30, Jeremias Maerki wrote:

The error message comes from the FOP part, so I don't think that the
snippet you posted is really the source of the error. The solution  
here

is simple: Please install JAI Image I/O Tools in your classpath:
http://jai-imageio.dev.java.net/

This will add an Image I/O codec for TIFF. The new image loader
framework used by FOP doesn't have an implementation for the bundled
TIFF codec so it uses Image I/O for TIFF loading.

HTH

On 10.04.2008 16:06:56 Peter Coppens wrote:

Dearest FOP/Batik fans (I am unclear where to post...sorry),

With FOP 0.94/Batik 1.6, the fo/svg fragment listed lower worked  
ok. I

switched to FOP0.95beta (which seems to come with a newer batik
version, 1.7) and get

SEVERE: SVG ErrorCannot load image (no suitable loader/converter
combination available) for file:/lap-pc-migration/Downloads/RenderX/
inx2fo/mda/./Ostern_DIN Lang_back.tif (image/tiff)
org.apache.xmlgraphics.image.loader.ImageException: Cannot load image
(no suitable loader/converter combination available) for file:/lap- 
pc-

migration/Downloads/RenderX/inx2fo/mda/./Ostern_DIN Lang_back.tif
(image/tiff)
at
org
.apache
.xmlgraphics.image.loader.ImageManager.getImage(ImageManager.java: 
248)

   

I am guessing this is all about the new image library, but I am not
sure really and I am even less sure how to deal with this.

Anyone any thoughts?

Tx!

Peter

FO fragment

fo:block-container absolute-position=fixed 
left=0pt
top=0pt width=318.6pt 
height=884pt
fo:block
fo:instream-foreign-object
content-width=318.6pt 
content-height=884pt
svg:svg width=318.6 
height=884
viewbox=0, 0, 318.6, 
884
svg:g

transform=translate(159.3, 442)
svg:g

transform=matrix(1, 0, 0, 1, -0.06, 0.04)
svg:rect 
x=-159.24

y=-441.960004 width=318.48

height=883.92001 fill=none stroke=none /

svg:g

transform=translate(-159.24, -441.960004)

svg:svg overflow=hidden

width=318.48 height=883.92001
   
 svg:g
 
   transform=translate(159.24, 441.960004)
   
 svg:g
 
   transform=matrix(1, 0, 0, 1, -159.24,
-441.960004)
   
 svg:image
  
  xmlns:xlink=http://www.w3.org/1999/xlink; x=0 y=0
  
  width=318.48 height=883.92001 fill=none

Re: Fop 0.95beta - svg tif images

2008-04-10 Thread Peter Coppens


You can use the Java-only part of JAI Image I/O Tools. The
platform-specific parts are not necessary for TIFF. In the worst case,
you can extract the JAR from an installation done on a Windows machine
I hope you'll have around.


That works...kind of...

If I 'time' the pdf rendering of 'the' stylesheet with 0.94 it takes  
about 7 seconds. With 0.95beta it takes 328 seconds


I could try to isolate the 'performance' bottleneck...but perhaps this  
can be explained with the info available right now?


Thanks!

Peter

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Apache FOP: Different Problems with embedding PDFs

2008-04-10 Thread Peter Coppens
5. With the newely versions fop 0.95beta and fop-pdf-images-1.2-bin,  
I can not ebbed TIFF graphics. There happens the exception (see  
below *2) in fop. With fop 0.94, the same graphic could be embedded  
well.



See reply of Jeremias in a previous thread

quoteThe solution here
is simple: Please install JAI Image I/O Tools in your classpath:
http://jai-imageio.dev.java.net/

This will add an Image I/O codec for TIFF. The new image loader
framework used by FOP doesn't have an implementation for the bundled
TIFF codec so it uses Image I/O for TIFF loading.
/quote

In the next days, I will do the same tests with Antennahouse. Are  
there the same problems to expect?

The same...that's unlikely...other problems...perhaps :)


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Fop 0.95beta - svg tif images

2008-04-10 Thread Peter Coppens
Now...for the more problematic part - I am on MacOS...anybody any  
luck getting the 0.95beta fop/batik  to work on macos when using  
tif images? It is unclear from my intial www wanderings what the  
state of jai on mac os is.


I've not really tested TIFF yet, but I do know that JAI is  
definitely available for the Apple JVM:

http://docs.info.apple.com/article.html?artnum=120289
Thanks...ran into that as well. I was somewhat 'scared' away as it  
seems to be version 1.0 and dates from december 2003.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Fop 0.95beta - svg tif images

2008-04-10 Thread Peter Coppens


On 10 Apr 2008, at 20:47, Andreas Delmelle wrote:

On Apr 10, 2008, at 20:09, Peter Coppens wrote:
Now...for the more problematic part - I am on MacOS...anybody any  
luck getting the 0.95beta fop/batik  to work on macos when using  
tif images? It is unclear from my intial www wanderings what the  
state of jai on mac os is.


I've not really tested TIFF yet, but I do know that JAI is  
definitely available for the Apple JVM:

http://docs.info.apple.com/article.html?artnum=120289
Thanks...ran into that as well. I was somewhat 'scared' away as it  
seems to be version 1.0 and dates from december 2003.


No sure way to find out, other than trying it... :-)
I did...but it refused to install saying it could not find a volume  
with Java installed on it





Now, I've been looking deeper into my local setup, and IIC, then for  
Java 1.5, the JAI libraries are already distributed /with/ the  
install package. At least, I do not remember ever having to  
configure this manually and still, the JARs are available in the lib/ 
ext folder.
Ok..sorry upfront...this is not for this list and extremely  
newbeebut what should I look for where (I am very new to MacOS and  
confused by its setup). I have found /System/Library/Frameworks/ 
JavaVM.framework/Versions/ by now with different versions and also  
e.g. /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/ 
lib/ext/ containing apple_provider.jar, dnsns.jar, localedata.jar,  
sunjce_provider.jar, sunpkcs11.jar but nothing imageio like. Am I  
looking in the wrong place or have I not installed enough (I do have  
XCode installed)


All help warmly welcomed. Many thanks indeed!

Peter



This could explain why there is no more recent version of the  
separate package (needed only for Java 1.3 and 1.4?)



Cheers

Andreas

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Fop 0.95beta - svg tif images

2008-04-10 Thread Peter Coppens


On 10 Apr 2008, at 22:00, Andreas Delmelle wrote:

On Apr 10, 2008, at 21:37, Peter Coppens wrote:


On 10 Apr 2008, at 20:47, Andreas Delmelle wrote:


Now, I've been looking deeper into my local setup, and IIC, then  
for Java 1.5, the JAI libraries are already distributed /with/ the  
install package. At least, I do not remember ever having to  
configure this manually and still, the JARs are available in the  
lib/ext folder.


Ok..sorry upfront...this is not for this list and extremely  
newbeebut what should I look for where (I am very new to MacOS  
and confused by its setup). I have found /System/Library/Frameworks/ 
JavaVM.framework/Versions/ by now with different versions and also  
e.g. /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/ 
Home/lib/ext/ containing apple_provider.jar, dnsns.jar,  
localedata.jar, sunjce_provider.jar, sunpkcs11.jar but nothing  
imageio like. Am I looking in the wrong place or have I not  
installed enough (I do have XCode installed)


My mistake. It's not the standard lib/ext. When I installed it for  
Java 1.4, apparently JAI was put under /System/Java/Extensions  
(where the Quicktime for Java JAR also resides), hence why it was  
also automagically available under Java 1.5.


Ha, that does get me somewhere (not sure where though). I found  
'stuff' in /System/Library/Java/Extensions  
(jai_core.jar,jai_codec.jar,mlibwrapper_jai.jar )...I explicitly added  
them to the classpath (which I guess should not be required) before  
running fop but I keep on getting no suitable loader/converter  
combination available.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Fop 0.95beta - svg tif images

2008-04-10 Thread Peter Coppens


On 10 Apr 2008, at 22:11, Andreas Delmelle wrote:

On Apr 10, 2008, at 22:00, Andreas Delmelle wrote:


No idea why the install would fail on your system, though. Maybe a  
bug, due to the fact that, as you suggested, the install-package is  
quite old, and no longer works on more recent versions of OS X (?)  
Unfortunately, I don't know how the installer checks for Java being  
present,

...

Additional question: does the notice appear at the very start?  
(Right after you get the warning about a script needing to run to  
verify whether the installation can proceed?)

Yes...that is when it happens.



If so, you might get a clue if you look at the scripts in the .dmg's  
contents (right-click + show package contents).
Hmmm...that might be a bit too ambitious for me at this stage (took a  
peek but could not make much sense of it)...and I guess I did find  
that jai was installed after all (in /System/Library/Java/ 
Extensions...see other mail in this thread)



Cheers

Andreas

Thanks for taking the time...much appreciated!

Peter

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Fop 0.95beta - svg tif images

2008-04-10 Thread Peter Coppens
  
  /svg:g
  
  /svg:svg

/svg:g
/svg:g
/svg:g
/svg:svg
/fo:instream-foreign-object
/fo:block
/fo:block-container
/fo:block
/fo:flow
/fo:page-sequence
/fo:root



On 10 Apr 2008, at 20:54, Andreas Delmelle wrote:


On Apr 10, 2008, at 20:01, Peter Coppens wrote:


You can use the Java-only part of JAI Image I/O Tools. The
platform-specific parts are not necessary for TIFF. In the worst  
case,
you can extract the JAR from an installation done on a Windows  
machine

I hope you'll have around.


That works...kind of...

If I 'time' the pdf rendering of 'the' stylesheet with 0.94 it  
takes about 7 seconds. With 0.95beta it takes 328 seconds


I could try to isolate the 'performance' bottleneck...but perhaps  
this can be explained with the info available right now?


Hmm.. That could be caused by all sorts of things.
Are you sure the difference is even related to the included TIFF?
Have you compared the timings for documents without TIFF? If so, is  
there a similar difference?




Cheers

Andreas

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Apache FOP: Embedding PDF, EPS

2008-04-07 Thread Peter Coppens

For pdf, checkout http://www.jeremias-maerki.ch/development/fop/index.html

For eps, you probably get expected behavior (but I am not sure)  -  
see http://xmlgraphics.apache.org/fop/0.94/graphics.html#eps


Hth,

Peter

On 07 Apr 2008, at 13:00, Oliver Hirschi wrote:

Hi there again

Is there a way to embed a PDF or an EPS as a graphic using apache  
fop 0.94?


With PDF, I get the error [Fatal Error] :1:1: Content is not  
allowed in prolog. [WARN] No ImageReader found for file:/t:/test/ 
2.pdf...

With EPS, I get no error, but the graphic is not embedded...

Thanks  kind regard,
Oliver Hirschi


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: GUI Configuration Tool

2008-03-12 Thread Peter Coppens

FWIW

In general and personally I only have 'problems' getting font  
configuration right. Although latest fop changes have alleviated much  
of the trouble it still can be a hassle to find out why a certain font  
is not picked up.


I guess 'fop font' configuration (and verification) features could be  
part of such workbench...so I would be interested in that part


Perhaps it helps,

Peter

On 12 Mar 2008, at 13:01, Adrian Cumiskey wrote:

Even though FOP configuration is quite well documented (http://xmlgraphics.apache.org/fop/0.94/configuration.html 
), I think there is a need for
a FOP configuration tool.  It would help new users get up and  
running quickly and allow existing users to easily manage their  
existing configurations.  Maybe even provide an automated 0.20 to  
0.93 upgrade path.  Users would then not have to (initially at  
least) spend much time learning the fine details of FOP xml  
configuration schema and would save a lot of time with questions on  
the users forum.


I was thinking it could be a simple swing app.  It would certainly  
be a good starter project for anyone interested in familiarizing  
themselves with the FOP code base.  So the first question I ask is,  
would the user community find such a tool useful?  And - any  
volunteers? :)


Adrian.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Fop layout question

2007-11-23 Thread Peter Coppens

Hello.

I have a quick follow up question - in case the fo does not specify the
line-height, what would be the default?

Thanks,

Peter
-- 
View this message in context: 
http://www.nabble.com/Fop-layout-question-tf4815030.html#a13910009
Sent from the FOP - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Fop layout question

2007-11-16 Thread Peter Coppens

Thanks Jeremias. 

This is exactly the type of information I was looking for. 

I will try to work out a few examples of my own the coming days to make sure
I understand what is going on.

Peter
-- 
View this message in context: 
http://www.nabble.com/Fop-layout-question-tf4815030.html#a13790353
Sent from the FOP - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Fop layout question

2007-11-15 Thread Peter Coppens

Gentlepeople

Assume the following fo structure 

  fo:block-container width=600pt top=0pt  overflow=hidden
left=0.0pt 
height=280pt absolute-position=fixed

fo:block linefeed-treatment=ignore
  fo:block margin-top=aa text-align=left line-height=bb
   fo:inline color=rgb(11,51,60) font-family=a font font-size=cc
 Some test
   /fo:inline
  /fo:block
/fo:block

/fo:block-container

I am trying to figure where the base line (let's say) of the characters will
end up based on the values of margin-top, line-height and possibly the
relevant font properties

Would anyone have any pointers to information that would help me to get
started. I am sure it's in the fo spec, but i have not enough time to try
and get my brain around that document (assuming I would ever succeed).

Many thanks indeed!

Peter
-- 
View this message in context: 
http://www.nabble.com/Fop-layout-question-tf4815030.html#a13774821
Sent from the FOP - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Fop 0.94 instream svg object regression?

2007-11-08 Thread Peter Coppens

StrangeI tried different jdk's (on Windows) , using

   fop  -fo test.fo -pdf test.pdf

always the same broken image result.

Any idea what else could be different that is of importance in this context?

Thanks,

Peter



-- 
View this message in context: 
http://www.nabble.com/Fop-0.94-instream-svg-object-regression--tf4763837.html#a13643447
Sent from the FOP - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Fop 0.94 instream svg object regression?

2007-11-08 Thread Peter Coppens

Thanks Jeremias

URL looks ok...also tested with relative uri's with the same result. And the
same test copied in a 0.93 directory seem to work fine.

I'll dive into the debugger somewhere in the coming hours/days and will post
back with my findings.

Thanks,

Peter
-- 
View this message in context: 
http://www.nabble.com/Fop-0.94-instream-svg-object-regression--tf4763837.html#a13644262
Sent from the FOP - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: FOP 0.94 - API access to font directory

2007-10-31 Thread Peter Coppens

Hacking around a bit I ended up parsing the config file as a DOM document,
look for the directory element, change it as needed and then instantiate the
fop factory using the DOM structure, with

 
this.fopFactory.setUserConfig(ConfigurationUtil.toConfiguration(fDoc.getDocumentElement()));


Seems to work ok, but does feel a bit like (unnecessary) mumbo jumbo.

Perhaps a more elegant approach is available?

Thanks,

Peter
-- 
View this message in context: 
http://www.nabble.com/FOP-0.94---API-access-to-font-directory-tf4720666.html#a13505723
Sent from the FOP - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



FOP 0.94 - directory config element and fonts with space in name

2007-10-31 Thread Peter Coppens

Gentlepeople,

I have a font file in a directory where the font name is 'Gill Sans MT'.

If I use the directory configuration tag to direct fop to find the font, I
apparently have to use GillSansMT as font name. I was hoping that 'Gill Sans
MT' (quoted name with spaces) would be the thing to use but apparently that
is not working. 

Am I missing something? Is this intended behaviour or is this an
(un)documented feature?

Many thanks indeed for any pointers or considerations,

Peter

-- 
View this message in context: 
http://www.nabble.com/FOP-0.94---%3Cdirectory%3E-config-element-and-fonts-with-space-in-name-tf4725796.html#a13511888
Sent from the FOP - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: FOP 0.94 - directory config element and fonts with space in name

2007-10-31 Thread Peter Coppens

Thanks! Peter.


Jeremias Maerki-2 wrote:
 
 I've stumbled over that myself a few days ago. I've got a fix
 (registering both GillSansMT and Gill Sans MT). I'll see to it that
 I can upload this change in the next two days.
 
 Jeremias Maerki
 
 
 
 On 31.10.2007 16:36:52 Peter Coppens wrote:
 
 Gentlepeople,
 
 I have a font file in a directory where the font name is 'Gill Sans MT'.
 
 If I use the directory configuration tag to direct fop to find the
 font, I
 apparently have to use GillSansMT as font name. I was hoping that 'Gill
 Sans
 MT' (quoted name with spaces) would be the thing to use but apparently
 that
 is not working. 
 
 Am I missing something? Is this intended behaviour or is this an
 (un)documented feature?
 
 Many thanks indeed for any pointers or considerations,
 
 Peter
 
 -- 
 View this message in context:
 http://www.nabble.com/FOP-0.94---%3Cdirectory%3E-config-element-and-fonts-with-space-in-name-tf4725796.html#a13511888
 Sent from the FOP - Users mailing list archive at Nabble.com.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/FOP-0.94---%3Cdirectory%3E-config-element-and-fonts-with-space-in-name-tf4725796.html#a13513194
Sent from the FOP - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



FOP 0.94 - API access to font directory

2007-10-30 Thread Peter Coppens

Dear Fop-fans,

Is there a way, using the API to change the font directory as configured in
the directory element in the config file. 

I can find the value somewhere deep in the user configuration object
(FopFactory.getUserConfig) and I guess I could change that value, but I am
not sure whether that would actually do something useful.

Thanks,

Peter
-- 
View this message in context: 
http://www.nabble.com/FOP-0.94---API-access-to-font-directory-tf4720666.html#a13495749
Sent from the FOP - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: FOP 0.94 - API access to font directory

2007-10-30 Thread Peter Coppens

Adrian,

Thanks for your reply.

I am trying to package a web application that also contains a bunch of fonts
stored in a directory and a fop config file. Everything is packed in war and
deployed on tomcat.

So I want to tell fop in the webapp where to look for fonts, but depending
on how tomcat is installed that could be a completely separate path. Until
now I located the fop config file through the classloader and because the
fonts directory is fixed relative to the fop config file I could set the
base url for font resolution. Worked fine, but I now want to use the new fop
font features avoiding the  hassle of the measurement files.

I hope you see what I am trying to do

Thanks for you help,

Peter



Adrian Cumiskey wrote:
 
 Hi Peter,
 
 I'm not quite sure why this feature would be useful, maybe it would be
 helpful if you could explain your requirement for this?  Currently there
 is
 no public API for this.  Anyhow, if you really need to make a programmatic
 customization you might want to take a look at
 buildFontListFromConfiguration() in
 src/java/org/apache/fop/render/PrintRendererConfigurator.java.
 
 Hope this helps,
 
 Adrian.
 
 On 30/10/2007, Peter Coppens [EMAIL PROTECTED] wrote:


 Dear Fop-fans,

 Is there a way, using the API to change the font directory as configured
 in
 the directory element in the config file.

 I can find the value somewhere deep in the user configuration object
 (FopFactory.getUserConfig) and I guess I could change that value, but I
 am
 not sure whether that would actually do something useful.

 Thanks,

 Peter
 --
 View this message in context:
 http://www.nabble.com/FOP-0.94---API-access-to-font-directory-tf4720666.html#a13495749
 Sent from the FOP - Users mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 
 

-- 
View this message in context: 
http://www.nabble.com/FOP-0.94---API-access-to-font-directory-tf4720666.html#a13499793
Sent from the FOP - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: (Postscript) transformation of block-container

2007-08-06 Thread Peter Coppens

 Give your block-container an id. If you render your document using -at,
 you get an XML file. Locate the block element that has a prod-id
 attribute with the id you've given the block-container. There may be
 more than one. Choose the one that has is-viewport-area=true. There,
 you'll find an attribute called ctm. That's a transformation matrix.
 If you manipulate it you may be able to achieve the effect you seek.
 After modifying the XML you can render the XML file to PostScript using
 -atin instead of -fo.
 
 More info: http://xmlgraphics.apache.org/fop/0.93/intermediate.html
 
 HTH
Yes it does. Thanks for the tip. I am most certainly going to try this.

Finally got around trying this. It works...more or less.

If I start from 

  fo:block-container id='totransform' height=100.0pt width=100.0pt 
  overflow=hidden background-color=rgb(0,0,255)
  position=absolute top=30pt left=30pt  
fo:block linefeed-treatment=ignore white-space-treatment=ignore
white-space-collapse=true  
   color=cmyk(0,0,1,0) font-size=8pt background-color=rgb(0,0,0)
jaja
/fo:block
/fo:block-container

and change the ctm as in 


block ipd=10 bpd=10
  ipda=10 bpda=10 bap=0 0 0 0
  prod-id=totransform is-viewport-area=true
  background=color=#ff
  bkg-color=java.awt.Color[r=0,g=0,b=255]
  left-position=3 top-position=3
  ctm=[0.7071 0.7071 -0.7071 0.7071 3.0 3.0]
  clipped=true positioning=absolute


This does not rotate the 'background' of the block-container, but only its'
'content'.

http://www.nabble.com/file/p12018237/fo.pdf fo.pdf 

Would anyone have any thoughts?

Thanks,

Peter
-- 
View this message in context: 
http://www.nabble.com/%28Postscript%29-transformation-of-block-container-tf3632392.html#a12018237
Sent from the FOP - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



non uniform scaling and overflow warning

2007-06-09 Thread Peter Coppens

Gentlepeople,

I am struggling to find the correct fo code to fill a fixed size region
with an image. Scaling should non uniform if needed.

e.g.

fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format; 
fo:layout-master-set
fo:simple-page-master master-name=New Page 
page-height=150.0pt
  page-width=300.0pt
fo:region-body/fo:region-body
/fo:simple-page-master
/fo:layout-master-set
fo:page-sequence master-reference=New Page
fo:flow flow-name=xsl-region-body
fo:block-container 
  absolute-position=fixed 
  left=30pt 
  top=30pt
  width=52.5pt
  height=65.25pt 
  fo:block
fo:external-graphic  
  width=52.5pt
  height=65.25pt 
  content-height=scale-to-fit 
  content-width=scale-to-fit 
  scaling=non-uniform 
src=url(http://www.reproducts.de/museum/2005/0104_catweazle/catweazle.jpg))
/
  /fo:block
/fo:block-container
/fo:flow
/fo:page-sequence
/fo:root


While this seems to work, I am surprised by the fact that fop complains with 

WARNING: Part/page 0 overflows the available area in block-progression
dimension. (fo:block-container, location: 15/24)

Also if I add overflow=hidden to the block container a few rows of pixels
of the image are gone.

Can anyone point me to the problem in the above fo fragment and give some
guidance on how this should be done correctly.

As always, many thanks indeed!

Peter

-- 
View this message in context: 
http://www.nabble.com/non-uniform-scaling-and-overflow-warning-tf3895012.html#a11042339
Sent from the FOP - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



(Postscript) transformation of block-container

2007-04-23 Thread Peter Coppens

Gentlepeople,

Does anyone know how I could apply a postscript transformation on the
content of a block-container.

What I currently do is render the container content to png and then use svg
to do the transformation. 

I would however like to keep the content as text and have not found a way to
achieve that.

The basic use case is arbitrary rotation of (fop formatted) text blocks, but
scaling and skewing might be nice to have as well.

Any guidance, as always, most warmly welcomed!

Peter


-- 
View this message in context: 
http://www.nabble.com/%28Postscript%29-transformation-of-block-container-tf3632392.html#a10142589
Sent from the FOP - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]