Thanks, I have installed BTB AFP Parser, which is working...  :-)

Jeremias Maerki wrote:
Look here for various tools:
http://wiki.apache.org/xmlgraphics-fop/AFPResources

I used AFPParser.exe which is part of BTB's AFP Viewer. There's also a
REXX-based tool by IBM but that fails a bit too often. WinAFP is great
but it's not free.

On 22.09.2009 15:58:08 Venkat Reddy wrote:
Hi,

I found no error in opening the document in IBM's AFP Info print plung-in for IE/Firefox. I could able to see the segment/image dispalyed on the page, but don't know how to get this structure that you have given in your reply. Is there any free AFP viewer on web to give the document structure like below (Begin Document,Begin Named Page Group, etc...)? The AFP Explorer I am using is failing to open this document.

Thanks,
Venkat.

Jeremias Maerki wrote:
Strange, I have no problem opening your AFP file with AFP Explorer.
Here's a dump from another tool:

pagesegment.afp
.....1 BDT - Begin Document                    NAME DOC00001  00016 D3A8A8 00000
       |Name: 'DOC00001'
.....2 . BNG - Begin Named Page Group          NAME PGP00001  00016 D3A8AD 00000
         |Name: 'PGP00001'
.....3 ... BPG - Begin Page                    NAME PGN00001  00016 D3A8AF 00000
           |Name: 'PGN00001'
.....4 ..... BAG - Begin Active Environment Gr NAME AEG00001  00016 D3A8C9 00000
             |Name: 'AEG00001'
.....5 ....... MPS - Map Page Segment                         00024 D3B15F 00000
               |Length of each repeating group 12 (x'0C')
               |GCGID 's1islogo'
.....6 ....... PGD - Page Descriptor                          00023 D3A6AF 00000
               |Unit base X 0 (x'00') (Ten inches)
               |Unit base Y 0 (x'00') (Ten inches)
               |Units per unit base X 2400 (x'0960')
               |Units per unit base Y 2400 (x'0960')
               |Extent for the X axis 1984 (x'0007C0')
               |Extent for the Y axis 2806 (x'000AF6')
.....7 ....... PTD - Presentation Text Data Descriptor        00022 D3B19B 00000
               |Unit base X 0 (x'00') (Ten inches)
               |Unit base Y 0 (x'00') (Ten inches)
               |Units per unit base X 2400 (x'0960')
               |Units per unit base Y 2400 (x'0960')
               |Extent for the X axis 1984 (x'0007C0')
               |Extent for the Y axis 2806 (x'000AF6')
.....8 ..... EAG - End Active Environment Group               00016 D3A9C9 00000
.....9 ..... IPS - Include Page Segment                       00022 D3AF5F 00000
             |GCGID 's1islogo'
             |Origin X 189 (x'0000BD')
             |Origin Y 194 (x'0000C2')
....10 ... EPG - End Page                                     00016 D3A9AF 00000
....11 . ENG - End Named Page Group                           00016 D3A9AD 00000
....12 EDT - End Document                                     00016 D3A9A8 00000

As I see it, everything's fine. The page segment is used. If you have it,
open the AFP file with IBM's AFP Workbench. I think "s1islogo" is a demo
resource from that package. At any rate, the page segment displays just
fine in AFP Workbench. So as I suspected, the viewers that you're
working with don't have access to an page segment resource called
"s1islogo".

You don't have to install any plug-ins with FOP. I meant the built-in
plug-ins which are registered like any other potential external plug-in.
But since the AFP file is fine, that's really not the problem.

On 22.09.2009 12:54:47 Venkat Reddy wrote:
Hi Jeremias,

When I ran the following command at the prompt:

fop -fo pagesegment.fo -afp pagesegment.afp

C:\Source\FOPTrunk>fop -fo pagesegment.fo -afp pagesegment.afp
22-Sep-2009 10:41:52 org.apache.fop.events.LoggingEventListener processEvent
WARNING: No AFP fonts configured. Using default setup.

And a blank AFP document generated, i have attached the AFP document. When I tried to open the afp document in the AFP explorer, it returned an Overflow error and closed the explorer without showing the document. I have attached the error document as well.

I am using FOP truck source, haven't installed any plug-in for this... Do I need to install any plug-in for this on the viewer (AFP Explorer)?

Thanks,
Venkat.

Jeremias Maerki wrote:
Looks like the documentation on that particular extension is just not
good enough, yet. I've explained a few things a few months ago:
http://markmail.org/message/zitb2ytietlfsv5q

What does that mean if you say, you didn't find anything in the AFP
document? Was the viewer not showing the image? Or was there no
reference of the "s1islogo" page segment in the AFP document (when you
decode the AFP with a dumper utility)?

If the former, your viewer (or printer) may simply not have the page
segment "s1islogo" available because (like explained in the
above-mentioned post) the page segment is not embedded in the AFP
document by FOP. If the latter, then there might be something wrong with
the registration of the plug-in. But in that case you'd have warnings in
the FOP log.

BTW, you should avoid plain filenames whenever possible because that is
strictly speaking illegal in XSL-FO even if FOP can (usually) deal with
them. It's a good idea to use file URLs if possible to make the
documents more portable.

On 22.09.2009 11:52:37 Venkat Reddy wrote:
Hi,

Can someone guide me in using the following AFP extension 'Page Segment'?

I have following FO document extracted from one of the FOP mailing list. When I ran this example, I couldn't find anything on the AFP document. I thought the
page will be segmented based on the given resource.

Example:-

<?xml version="1.0" encoding="UTF-8"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format";
  xmlns:afp="http://xmlgraphics.apache.org/fop/extensions/afp";>
  <fo:layout-master-set>
<fo:simple-page-master master-name="A4" page-height="29.7cm" page-width="21cm" margin="2cm"> <afp:include-page-segment name="s1islogo" src="C:\mywork\JavaXSLTSamples\XSLFOSamples\fop.jpeg"/>
      <fo:region-body/>
    </fo:simple-page-master>
  </fo:layout-master-set>
  <fo:page-sequence master-reference="A4">
    <fo:flow flow-name="xsl-region-body">
      <fo:block>
<fo:external-graphic src="C:\mywork\JavaXSLTSamples\XSLFOSamples\fop.jpeg"
          width="160 div 2400 * 10in" height="192 div 2400 * 10in"/>
      </fo:block>
    </fo:flow>
  </fo:page-sequence>
</fo:root>

I am just learning these extensions, trying out the page segment example from one of the mails.

Thanks,
Venkat.

Jeremias Maerki




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]

Reply via email to