check to see if newpage is created

2005-03-01 Thread Jaysheel Bhavsar
Hi,
  I am displaying some text on one of the pages, and some times the text
might be long enough that a new page is created. Is there a way to check
if a new page is created so I put some page title eg. (cont...) or
something else.

Thanks

Jaysheel. 

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



RE: printing page numbers (closed)

2005-02-17 Thread Jaysheel Bhavsar
Hi guys,
  Thanks so much for helping. I got it. It worked when I moved the
Text-align to the fo:block for some reason I tried everything with
fo:inline but it did not work.

Thanks again.

Jaysheel.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 16, 2005 4:13 PM
To: [EMAIL PROTECTED]
Subject: RE: printing page numbers

Move the text-align property to the fo:block element (and you can then 
remove the inline wrapper, since text-align is its only attribute).

Jay Bryant
Bryant Communication Services
(presently consulting at Synergistic Solution Technologies)




Jaysheel Bhavsar [EMAIL PROTECTED] 
02/16/2005 02:48 PM
Please respond to
[EMAIL PROTECTED]


To
[EMAIL PROTECTED]
cc

Subject
RE: printing page numbers






Hi,
   Here is part of my xsl sheet it is working fine, I get it to display
page 1 of x. Now the problem I am running into is I cannot align my text
for some reason. I have tried end and right but my text page 1 of
x always stays on the left. Is there something I am missing. Is this
because its in the footer of the page?

--
fo:layout-master-set
!-- layout for the first page --
fo:simple-page-master
   master-name=test
   page-height=11in
   page-width=8.5in
 
margin-bottom=0.25in
margin-top=0.25in
   
  fo:region-before extent=1.5cm/
   fo:region-body margin-top=0.2in/

fo:region-start 
extent=1.0in/
fo:region-end 
extent=0.3in/
 
fo:region-after 
extent='1.0cm'
region-name=footer/
 
/fo:simple-page-master
 /fo:layout-master-set

fo:page-sequence master-reference=test initial-page-number=1

!-- usage of page layout --
!-- header --
 fo:static-content 
flow-name=footer
  fo:block font-family=Helvetica 
font-size=7pt
 fo:inline text-align=end
 Page fo:page-number/
 of
 fo:page-number-citation
ref-id=last-page/
 /fo:inline
  /fo:block
  /fo:static-content
 
 fo:flow 
flow-name=xsl-region-body
fo:block
  xsl:apply-templates/
/fo:block
 
 
fo:block 
id=last-page/
/fo:flow
 
 /fo:page-sequence


-
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]


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



RE: printing page numbers

2005-02-16 Thread Jaysheel Bhavsar
Thanks John,
   I will try this code out and let you know how it works.

Jaysheel.

-Original Message-
From: john farrow [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 15, 2005 6:27 PM
To: [EMAIL PROTECTED]
Subject: Re: printing page numbers

last-page is used to identify a block which appears on the last page
of 
the document, like this:

?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=page margin=2.5cm

  fo:region-body margin-bottom='2.5cm' region-name=body
   background-color=#cc/

  fo:region-after extent='2cm' region-name=footer
  background-color=#dd/
/fo:simple-page-master
  /fo:layout-master-set

  fo:page-sequence master-reference=page
   fo:static-content flow-name=footer
 fo:block
this is the page footer,
the page number is fo:page-number/
of
fo:page-number-citation ref-id=last-page/
 /fo:block
 /fo:static-content
fo:flow flow-name=body
fo:blockThis will be on page one/fo:block
fo:block break-before=page
This will be on page two
/fo:block

fo:block id=last-page/
/fo:flow
  /fo:page-sequence
/fo:root

John Farrow

Ibex PDF Creator - High speed scalable XSL-FO
Visual Programming Ltd  mail PO Box 22-222, Khandallah, Wellington, New 
Zealand site Level 2, 2 Ganges Road, Khandallah, Wellington, New Zealand

phone +64 4 479 1738 fax +64 4 479 1294 web
http://www.xmlpdf.com/ibex.html

- Original Message - 
From: Jaysheel Bhavsar [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, February 16, 2005 12:10 PM
Subject: RE: printing page numbers


Dear Manoj,
  Can you explain what you code does? I am very new to XSL-FO. Can you
explain where I should place this code in my xsl sheet, what is
last-page
Is it a reserve word that keep counts of how many pages it has processed
at a given point? Also the code you sent me will it work as is?

Thank you.

Jaysheel.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 15, 2005 4:36 PM
To: [EMAIL PROTECTED]
Subject: Re: printing page numbers





Yes you can do that. You need to check usage for
fo:block id=last-page/ ,
fo:page-sequence 
 fo:page-number-citation  ref-id=last-page/


Thanks
Manoj





  Jaysheel

  Bhavsar To:
[EMAIL PROTECTED]

  [EMAIL PROTECTED]cc:

  ite.com Subject:  printing page
numbers


  02/15/2005 01:29

  PM

  Please respond to

  fop-user









Hi,
  I was wondering if I can have Page 1 of 10  printed at the
bottom of the page instead of just printing Page 1. One thing is that I
don't know how many pages I will have in the pdf, since my content is
populated dynamically.

Any ideas? If any one have a sample code that will be great.

Thank you

Jaysheel.

-
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]


-
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]


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



RE: printing page numbers

2005-02-16 Thread Jaysheel Bhavsar
Hi,
   Here is part of my xsl sheet it is working fine, I get it to display
page 1 of x. Now the problem I am running into is I cannot align my text
for some reason. I have tried end and right but my text page 1 of
x always stays on the left. Is there something I am missing. Is this
because its in the footer of the page?

--
fo:layout-master-set
!-- layout for the first page --
fo:simple-page-master
   master-name=test
   page-height=11in
   page-width=8.5in
   margin-bottom=0.25in
   margin-top=0.25in
   
 fo:region-before extent=1.5cm/
   fo:region-body margin-top=0.2in/

   fo:region-start extent=1.0in/
   fo:region-end extent=0.3in/
   
   fo:region-after extent='1.0cm'
region-name=footer/

/fo:simple-page-master
 /fo:layout-master-set

fo:page-sequence master-reference=test initial-page-number=1

!-- usage of page layout --
!-- header --
fo:static-content flow-name=footer
 fo:block font-family=Helvetica font-size=7pt
fo:inline text-align=end
Page fo:page-number/
of
fo:page-number-citation ref-id=last-page/
/fo:inline
 /fo:block
 /fo:static-content
 
fo:flow flow-name=xsl-region-body
fo:block
  xsl:apply-templates/
/fo:block

fo:block id=last-page/
/fo:flow

 /fo:page-sequence


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



RE: printing page numbers

2005-02-16 Thread Jaysheel Bhavsar
No that didn't work either, any other ideas?

Jaysheel.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 16, 2005 4:00 PM
To: [EMAIL PROTECTED]
Subject: RE: printing page numbers





Try out display-align ...



 

  Jaysheel

  Bhavsar To:
[EMAIL PROTECTED]

  [EMAIL PROTECTED]cc:

  ite.com Subject:  RE: printing
page numbers 
 

  02/16/2005 12:48

  PM

  Please respond to

  fop-user

 

 





Hi,
   Here is part of my xsl sheet it is working fine, I get it to display
page 1 of x. Now the problem I am running into is I cannot align my text
for some reason. I have tried end and right but my text page 1 of
x always stays on the left. Is there something I am missing. Is this
because its in the footer of the page?

--
fo:layout-master-set
!-- layout for the first page --
fo:simple-page-master
   master-name=test
   page-height=11in
   page-width=8.5in
margin-bottom=0.25in
margin-top=0.25in
   
  fo:region-before extent=1.5cm/
   fo:region-body margin-top=0.2in/

fo:region-start
extent=1.0in/
fo:region-end extent=0.3in/

fo:region-after extent='1.0cm'
region-name=footer/

/fo:simple-page-master
 /fo:layout-master-set

fo:page-sequence master-reference=test initial-page-number=1

!-- usage of page layout --
!-- header --
 fo:static-content
flow-name=footer
  fo:block font-family=Helvetica font-size=7pt
 fo:inline
text-align=end
 Page fo:page-number/
 of
 fo:page-number-citation ref-id=last-page/
 /fo:inline
  /fo:block
  /fo:static-content

 fo:flow
flow-name=xsl-region-body
fo:block
  xsl:apply-templates/
/fo:block

 fo:block
id=last-page/
/fo:flow

 /fo:page-sequence


-
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]


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



printing page numbers

2005-02-15 Thread Jaysheel Bhavsar
Hi,
  I was wondering if I can have Page 1 of 10  printed at the
bottom of the page instead of just printing Page 1. One thing is that I
don't know how many pages I will have in the pdf, since my content is
populated dynamically.

Any ideas? If any one have a sample code that will be great. 

Thank you

Jaysheel. 

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



RE: printing page numbers

2005-02-15 Thread Jaysheel Bhavsar
Dear Manoj,
  Can you explain what you code does? I am very new to XSL-FO. Can you
explain where I should place this code in my xsl sheet, what is
last-page
Is it a reserve word that keep counts of how many pages it has processed
at a given point? Also the code you sent me will it work as is?

Thank you.

Jaysheel.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 15, 2005 4:36 PM
To: [EMAIL PROTECTED]
Subject: Re: printing page numbers





Yes you can do that. You need to check usage for
fo:block id=last-page/ ,
fo:page-sequence 
 fo:page-number-citation  ref-id=last-page/


Thanks
Manoj



 

  Jaysheel

  Bhavsar To:
[EMAIL PROTECTED]

  [EMAIL PROTECTED]cc:

  ite.com Subject:  printing page
numbers 
 

  02/15/2005 01:29

  PM

  Please respond to

  fop-user

 

 





Hi,
  I was wondering if I can have Page 1 of 10  printed at the
bottom of the page instead of just printing Page 1. One thing is that I
don't know how many pages I will have in the pdf, since my content is
populated dynamically.

Any ideas? If any one have a sample code that will be great.

Thank you

Jaysheel.

-
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]


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



embedding fonts into all dynamically generate pdfs using coldfusion and fop.

2005-01-27 Thread Jaysheel Bhavsar
Hi all,
  I am very new to xsl-fop and to the world of xml and xsl. I am
currently working on creating dynamic pdf using coldfusion mx and FOP. I
am using Nate Nelson's tutorial published in ColdFusion Dev Journal.
Everything is working great, except I want to embed couple of fonts into
my pdf, and they are all generated real time. I have transformed the
.pfm files to .xml based on a tutorial found online. And I made changed
to the userconfig.xml file as well. Now I cannot figure out who to
include the userconfig.xml file into all the pdf that will be created.
Here is the code that I am using to create my pdfs.
-
CFSET MyStylesheet = style.xsl
cfset pdfFile = Result.pdf
cfset MyXml = Output.xml

!--- get contents of xml file and xsl file ---
!--- CFFILE ACTION=READ FILE=#expandpath(MyXml)#
VARIABLE=XMLFileContent ---
CFFILE ACTION=READ FILE=#expandpath(MyStylesheet)#
VARIABLE=XSLFileContent

!--- perform xml transformation with XMLFileContent agaisnt
XSLFileContent ---
CFSET TransformedXmlCode = XmlTransform(proposal, XSLFileContent)

!--- now invoke the FOP component - pass in transformed xml and pdf
file to be created ---
cfinvoke component=FOP method=ConvertStringToPDF
foString=#TransformedXMLCode# returnvariable=FOPByteArray

!--- No display PDF file to browser ---
cfscript
   //Retrieve the page context's response object
   context = getPageContext();
   context.setFlushOutput(false);
   response = context.getResponse().getResponse();
   out = response.getOutputStream();
   //Set the MIME type
   response.setContentType(application/pdf);
   //We must specify the content length but that's easy using the
   //ByteArrayOutputStream's size method
   response.setContentLength(FOPByteArray.size());
   //Write the output to the browser and flush (to actually send)
   out.write(FOPByteArray.toByteArray());
   out.flush();
   //Close the output stream object
   out.close();
/cfscript
--
and here is the fop.cfc file
-
cfcomponent
   !--- Initialize the FOP driver from xml.apache.org ---
   cfset variables.driver = CreateObject(java,
org.apache.fop.apps.Driver)
   cfset variables.lockname = CreateUUID()

   cffunction name=ConvertFileToPDF access=public
  cfargument name=foFile type=string required=true
  cfset var output =  /
  !--- Set up Java input source ---
  cfset var input = CreateObject(java,
org.xml.sax.InputSource)
  cfset input.init( ARGUMENTS.foFile)
  !--- Proceed with PDF generation ---
  cfset output = private_generatePDF(input)
  cfreturn output /
   /cffunction

   cffunction name=ConvertStringToPDF access=public
  cfargument name=foString type=string required=true
  !--- Set up Java input source ---
  cfset var reader = CreateObject(java, java.io.StringReader)
  cfset var input = CreateObject(java,
org.xml.sax.InputSource)
  cfset reader.init(foString)
  cfset input.init(reader)
  !--- Proceed with PDF generation ---
  cfset output = private_generatePDF(input)
  cfreturn output /
   /cffunction

   cffunction name=private_generatePDF access=private
  cfargument name=input type=any required=true
  !--- Output stream for writing PDF file ---
  cfset var output = CreateObject(java,
java.io.ByteArrayOutputStream)
  !--- Turn on the output stream ---
  cfset output.init()
  !--- Hook the FOP driver to the input/output ---
  cfset variables.driver.setInputSource(input)
  cfset variables.driver.setOutputStream(output)
  !--- Perform the actual PDF generation ---
  cfset variables.driver.run()
  cfreturn output /
   /cffunction
/cfcomponent

you can also take a look it at
http://photos.sys-con.com/story/res/45575/source.html

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



followup: embedding fonts into all dynamically generate pdfs using coldfusion and fop.

2005-01-27 Thread Jaysheel Bhavsar
Basically how do I perform the following task with what I have.

FOP -c userconfig.xml -xml InputXML.xml -xsl MultiLAng.xsl - pdf
MultiLang.pdf

-Original Message-
From: Jaysheel Bhavsar [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 27, 2005 10:39 AM
To: [EMAIL PROTECTED]
Subject: embedding fonts into all dynamically generate pdfs using
coldfusion and fop.

Hi all,
  I am very new to xsl-fop and to the world of xml and xsl. I am
currently working on creating dynamic pdf using coldfusion mx and FOP. I
am using Nate Nelson's tutorial published in ColdFusion Dev Journal.
Everything is working great, except I want to embed couple of fonts into
my pdf, and they are all generated real time. I have transformed the
.pfm files to .xml based on a tutorial found online. And I made changed
to the userconfig.xml file as well. Now I cannot figure out who to
include the userconfig.xml file into all the pdf that will be created.
Here is the code that I am using to create my pdfs.
-
CFSET MyStylesheet = style.xsl
cfset pdfFile = Result.pdf
cfset MyXml = Output.xml

!--- get contents of xml file and xsl file ---
!--- CFFILE ACTION=READ FILE=#expandpath(MyXml)#
VARIABLE=XMLFileContent ---
CFFILE ACTION=READ FILE=#expandpath(MyStylesheet)#
VARIABLE=XSLFileContent

!--- perform xml transformation with XMLFileContent agaisnt
XSLFileContent ---
CFSET TransformedXmlCode = XmlTransform(proposal, XSLFileContent)

!--- now invoke the FOP component - pass in transformed xml and pdf
file to be created ---
cfinvoke component=FOP method=ConvertStringToPDF
foString=#TransformedXMLCode# returnvariable=FOPByteArray

!--- No display PDF file to browser ---
cfscript
   //Retrieve the page context's response object
   context = getPageContext();
   context.setFlushOutput(false);
   response = context.getResponse().getResponse();
   out = response.getOutputStream();
   //Set the MIME type
   response.setContentType(application/pdf);
   //We must specify the content length but that's easy using the
   //ByteArrayOutputStream's size method
   response.setContentLength(FOPByteArray.size());
   //Write the output to the browser and flush (to actually send)
   out.write(FOPByteArray.toByteArray());
   out.flush();
   //Close the output stream object
   out.close();
/cfscript
--
and here is the fop.cfc file
-
cfcomponent
   !--- Initialize the FOP driver from xml.apache.org ---
   cfset variables.driver = CreateObject(java,
org.apache.fop.apps.Driver)
   cfset variables.lockname = CreateUUID()

   cffunction name=ConvertFileToPDF access=public
  cfargument name=foFile type=string required=true
  cfset var output =  /
  !--- Set up Java input source ---
  cfset var input = CreateObject(java,
org.xml.sax.InputSource)
  cfset input.init( ARGUMENTS.foFile)
  !--- Proceed with PDF generation ---
  cfset output = private_generatePDF(input)
  cfreturn output /
   /cffunction

   cffunction name=ConvertStringToPDF access=public
  cfargument name=foString type=string required=true
  !--- Set up Java input source ---
  cfset var reader = CreateObject(java, java.io.StringReader)
  cfset var input = CreateObject(java,
org.xml.sax.InputSource)
  cfset reader.init(foString)
  cfset input.init(reader)
  !--- Proceed with PDF generation ---
  cfset output = private_generatePDF(input)
  cfreturn output /
   /cffunction

   cffunction name=private_generatePDF access=private
  cfargument name=input type=any required=true
  !--- Output stream for writing PDF file ---
  cfset var output = CreateObject(java,
java.io.ByteArrayOutputStream)
  !--- Turn on the output stream ---
  cfset output.init()
  !--- Hook the FOP driver to the input/output ---
  cfset variables.driver.setInputSource(input)
  cfset variables.driver.setOutputStream(output)
  !--- Perform the actual PDF generation ---
  cfset variables.driver.run()
  cfreturn output /
   /cffunction
/cfcomponent

you can also take a look it at
http://photos.sys-con.com/story/res/45575/source.html

-
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]