You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Jordan Naftolin <jo...@apache.org> on 2000/06/27 19:24:33 UTC

indirect text

Does anyone know if there is a way in PDF to indirectly reference text inside a text stream?  I am trying to insert text from another object into a text stream.  The idea would be to have something like the following:

22 0 obj
<< /Length 100 >>
stream
BT
/F1 12 Tf
0 0 0  rg 
1 0 0 1 70.875 611.104 Tm (I) Tj
0 0 0  rg 
1 0 0 1 74.875 611.104 Tm 23 0 R Tj
0 0 0  rg 
1 0 0 1 80.875 611.104 Tm (FOP) Tj
ET
endstream
endobj

23 0 obj
love
end obj

to give "I love FOP".  The example above doesn't work, and I've been searching through the PDF reference manual for some way to do this, but with no luck.  Does anyone know if there is any way to do this?  Does anyone know of a workaround?
Thanks,
Jordan

Re: indirect text

Posted by Jordan Naftolin <jo...@jtcsv.com>.
I'm trying to give some basic forward page-number-citation functionality
without getting into multiple passes.

At the time that we create the layout for a forward page-number-citation, we
don't know what the correct page number is.  Thus I was hoping that we could
place a reference to another object's text value inside the current text
stream.  This other object's text value would contain the proper page number
once it is determined (this is currently how I do forward internal linking,
except linking doesn't require placing references within text streams).

I'm not sure if this is possilbe, and so I'm trying to think of a workaround
for this.

It has already been discussed that even if we _could_ get this scenario
working, it would not be a completely feasible solution, since we wouldn't
know how many characters to alot the page number when the
page-number-citation is encountered, and thus we could run into trouble with
the layout.  However, for the time being, this would provide FOP with _some_
forward page-number-citation functionality until we decide how/whether we'll
do multiple passes.

----- Original Message -----
From: "Arved Sandstrom" <Ar...@chebucto.ns.ca>
To: <fo...@xml.apache.org>
Sent: Wednesday, June 28, 2000 2:17 AM
Subject: Re: indirect text


> I suspect not. Section 4.11 (Object References) indicates that "Any object
> used as an element of an array or as a value in a dictionary may be
> specified by either a direct object or an indirect reference." This
implies
> that "things" elsewhere (chunks of a stream) cannot be.
>
> Suggestions for a workaround would depend, I think, on the larger problem
> context.
>
> Arved
>
> At 10:24 AM 6/27/00 -0700, Jordan Naftolin wrote:
> Does anyone know if there is a way in PDF to indirectly reference text
> inside a text stream?  I am trying to insert text from another object into
> a text stream.  The idea would be to have something like the following:
>
> 22 0 obj
> << /Length 100 >>
> stream
> BT
> /F1 12 Tf
> 0 0 0  rg
> 1 0 0 1 70.875 611.104 Tm (I) Tj
> 0 0 0  rg
> 1 0 0 1 74.875 611.104 Tm 23 0 R Tj
> 0 0 0  rg
> 1 0 0 1 80.875 611.104 Tm (FOP) Tj
> ET
> endstream
> endobj
>
> 23 0 obj
> love
> end obj
>
> to give "I love FOP".  The example above doesn't work, and I've been
> searching through the PDF reference manual for some way to do this, but
> with no luck.  Does anyone know if there is any way to do this?  Does
> anyone know of a workaround?
> Thanks,
> Jordan
>
>
>


Re: indirect text

Posted by Arved Sandstrom <Ar...@chebucto.ns.ca>.
I suspect not. Section 4.11 (Object References) indicates that "Any object 
used as an element of an array or as a value in a dictionary may be
specified by either a direct object or an indirect reference." This implies 
that "things" elsewhere (chunks of a stream) cannot be.

Suggestions for a workaround would depend, I think, on the larger problem
context.

Arved

At 10:24 AM 6/27/00 -0700, Jordan Naftolin wrote:
Does anyone know if there is a way in PDF to indirectly reference text
inside a text stream?  I am trying to insert text from another object into
a text stream.  The idea would be to have something like the following:
  
22 0 obj
<< /Length 100 >>
stream
BT
/F1 12 Tf
0 0 0  rg 
1 0 0 1 70.875 611.104 Tm (I) Tj
0 0 0  rg 
1 0 0 1 74.875 611.104 Tm 23 0 R Tj
0 0 0  rg 
1 0 0 1 80.875 611.104 Tm (FOP) Tj
ET
endstream
endobj
  
23 0 obj
love
end obj
  
to give "I love FOP".  The example above doesn't work, and I've been
searching through the PDF reference manual for some way to do this, but
with no luck.  Does anyone know if there is any way to do this?  Does
anyone know of a workaround?
Thanks,
Jordan