[jira] [Commented] (FOP-2616) Extra blank page gets created even though the content fits in previous page

2016-07-27 Thread Ramnikunj Prajapati (JIRA)

[ 
https://issues.apache.org/jira/browse/FOP-2616?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15396903#comment-15396903
 ] 

Ramnikunj Prajapati commented on FOP-2616:
--

[~pascal.san...@takoma.fr] [~psancho] Did you find any solution or root cause  
for this?

> Extra blank page gets created even though the content fits in previous page
> ---
>
> Key: FOP-2616
> URL: https://issues.apache.org/jira/browse/FOP-2616
> Project: FOP
>  Issue Type: Bug
> Environment: windows 7, Java 1.8
>Reporter: Ramnikunj Prajapati
> Attachments: InternetBill.pdf, InternetBill.xml, 
> InternetBillwithBlankPageError.pdf, InternetBillwithBlankPageError.xml, 
> JavaCodePDF.java, MakeBill.xsl, logo.jpg, readme.txt
>
>
> Hi,
> We are creating a pdf out of a xml using xsl and FOP library. We have set 
> header and footer for all pages. We have a coupon which needs to be 
> positioned at the bottom of last page of pdf and when the coupon is in the 
> bottom the footer text should not appear. If the data in the current page is 
> more to accommodate in one page than the extra data and coupon should be 
> shifted to the next page. The condition for coupon is that it should always 
> be placed in bottom of last page. We found an issue where if the data in the 
> body is about 36-39 lines which fits the current page with coupon still an 
> extra blank page gets added with the header.
> For reference please check the xsl, sample xml and pdf  which is placed in 
> this google drive folder: https://goo.gl/4Pwqev Please read the readme file 
> for more info



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FOP-2616) Extra blank page gets created even though the content fits in previous page

2016-07-11 Thread Ramnikunj Prajapati (JIRA)

[ 
https://issues.apache.org/jira/browse/FOP-2616?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15370507#comment-15370507
 ] 

Ramnikunj Prajapati commented on FOP-2616:
--

[~pascal.san...@takoma.fr] [~psancho] Did you find any solution for this?

> Extra blank page gets created even though the content fits in previous page
> ---
>
> Key: FOP-2616
> URL: https://issues.apache.org/jira/browse/FOP-2616
> Project: FOP
>  Issue Type: Bug
> Environment: windows 7, Java 1.8
>Reporter: Ramnikunj Prajapati
> Attachments: InternetBill.pdf, InternetBill.xml, 
> InternetBillwithBlankPageError.pdf, InternetBillwithBlankPageError.xml, 
> JavaCodePDF.java, MakeBill.xsl, logo.jpg, readme.txt
>
>
> Hi,
> We are creating a pdf out of a xml using xsl and FOP library. We have set 
> header and footer for all pages. We have a coupon which needs to be 
> positioned at the bottom of last page of pdf and when the coupon is in the 
> bottom the footer text should not appear. If the data in the current page is 
> more to accommodate in one page than the extra data and coupon should be 
> shifted to the next page. The condition for coupon is that it should always 
> be placed in bottom of last page. We found an issue where if the data in the 
> body is about 36-39 lines which fits the current page with coupon still an 
> extra blank page gets added with the header.
> For reference please check the xsl, sample xml and pdf  which is placed in 
> this google drive folder: https://goo.gl/4Pwqev Please read the readme file 
> for more info



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FOP-2616) Extra blank page gets created even though the content fits in previous page

2016-06-29 Thread Pascal Sancho (JIRA)

[ 
https://issues.apache.org/jira/browse/FOP-2616?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15355187#comment-15355187
 ] 

Pascal Sancho commented on FOP-2616:


see menu under [More] button above.

> Extra blank page gets created even though the content fits in previous page
> ---
>
> Key: FOP-2616
> URL: https://issues.apache.org/jira/browse/FOP-2616
> Project: FOP
>  Issue Type: Bug
> Environment: windows 7, Java 1.8
>Reporter: Ramnikunj Prajapati
>
> Hi,
> We are creating a pdf out of a xml using xsl and FOP library. We have set 
> header and footer for all pages. We have a coupon which needs to be 
> positioned at the bottom of last page of pdf and when the coupon is in the 
> bottom the footer text should not appear. If the data in the current page is 
> more to accommodate in one page than the extra data and coupon should be 
> shifted to the next page. The condition for coupon is that it should always 
> be placed in bottom of last page. We found an issue where if the data in the 
> body is about 36-39 lines which fits the current page with coupon still an 
> extra blank page gets added with the header.
> For reference please check the xsl, sample xml and pdf  which is placed in 
> this google drive folder: https://goo.gl/4Pwqev Please read the readme file 
> for more info



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FOP-2616) Extra blank page gets created even though the content fits in previous page

2016-06-28 Thread Ramnikunj Prajapati (JIRA)

[ 
https://issues.apache.org/jira/browse/FOP-2616?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15353478#comment-15353478
 ] 

Ramnikunj Prajapati commented on FOP-2616:
--

[~psancho] We are using FOP version 2.0 and we are generating pdf 
programmatically using Java code. We referred to sample java code provided on 
FOP site for creating pdf using XSL and XML. 


Here goes the java code: 

import java.io.File;
import java.io.OutputStream;
import javax.xml.transform.Result;
import javax.xml.transform.Source;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.sax.SAXResult;
import javax.xml.transform.stream.StreamSource;
import org.apache.avalon.framework.configuration.Configuration;
import org.apache.avalon.framework.configuration.DefaultConfigurationBuilder;
import org.apache.fop.apps.FOUserAgent;
import org.apache.fop.apps.Fop;
import org.apache.fop.apps.FopFactory;
import org.apache.fop.apps.FopFactoryBuilder;
import org.apache.fop.apps.MimeConstants;

public class JavaCodePDF{
 public static void main(String s[]) 
 {
try
{
String xmlPath = s[0];
String xslPath = s[1];
String pdfPath = s[2];
System.out.println("Preparing PDF...");
  
File xmlFile = new File(xmlPath);
File xsltFile = new File(xslPath);
File pdfFile = new File(pdfPath);

System.out.println("Input XML (" + xmlFile + ")");
System.out.println("Output PDF (" + pdfFile + ")");

FopFactoryBuilder fopFactoryBuilder = new FopFactoryBuilder(new 
File(".").toURI()).setStrictFOValidation(false);
final FopFactory fopFactory = fopFactoryBuilder.build();

FOUserAgent foUserAgent = fopFactory.newFOUserAgent();
  
// Setup output
OutputStream out = new java.io.FileOutputStream(pdfFile);
out = new java.io.BufferedOutputStream(out);
try 
{  
Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, 
foUserAgent, out);   
TransformerFactory factory = 
TransformerFactory.newInstance();
Transformer transformer = factory.newTransformer(new 
StreamSource(xsltFile)); 
transformer.setParameter("versionParam", "2.0");
Source src = new StreamSource(xmlFile);
Result res = new SAXResult(fop.getDefaultHandler());
// Start XSLT transformation and FOP processing
transformer.transform(src, res);
} 
finally 
{
out.close();
}
System.out.println("Success!");
}
catch(Exception expMsg)
{
System.out.println(expMsg.getMessage());
}   
}
 }



> Extra blank page gets created even though the content fits in previous page
> ---
>
> Key: FOP-2616
> URL: https://issues.apache.org/jira/browse/FOP-2616
> Project: FOP
>  Issue Type: Bug
> Environment: windows 7, Java 1.8
>Reporter: Ramnikunj Prajapati
>
> Hi,
> We are creating a pdf out of a xml using xsl and FOP library. We have set 
> header and footer for all pages. We have a coupon which needs to be 
> positioned at the bottom of last page of pdf and when the coupon is in the 
> bottom the footer text should not appear. If the data in the current page is 
> more to accommodate in one page than the extra data and coupon should be 
> shifted to the next page. The condition for coupon is that it should always 
> be placed in bottom of last page. We found an issue where if the data in the 
> body is about 36-39 lines which fits the current page with coupon still an 
> extra blank page gets added with the header.
> For reference please check the xsl, sample xml and pdf  which is placed in 
> this google drive folder: https://goo.gl/4Pwqev Please read the readme file 
> for more info



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FOP-2616) Extra blank page gets created even though the content fits in previous page

2016-06-28 Thread Ramnikunj Prajapati (JIRA)

[ 
https://issues.apache.org/jira/browse/FOP-2616?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15352648#comment-15352648
 ] 

Ramnikunj Prajapati commented on FOP-2616:
--

Hey I didn't find any option to attach files to this issue that's why added 
external link. Can you tell me how to attach files?

> Extra blank page gets created even though the content fits in previous page
> ---
>
> Key: FOP-2616
> URL: https://issues.apache.org/jira/browse/FOP-2616
> Project: FOP
>  Issue Type: Bug
> Environment: windows 7, Java 1.8
>Reporter: Ramnikunj Prajapati
>
> Hi,
> We are creating a pdf out of a xml using xsl and FOP library. We have set 
> header and footer for all pages. We have a coupon which needs to be 
> positioned at the bottom of last page of pdf and when the coupon is in the 
> bottom the footer text should not appear. If the data in the current page is 
> more to accommodate in one page than the extra data and coupon should be 
> shifted to the next page. The condition for coupon is that it should always 
> be placed in bottom of last page. We found an issue where if the data in the 
> body is about 36-39 lines which fits the current page with coupon still an 
> extra blank page gets added with the header.
> For reference please check the xsl, sample xml and pdf  which is placed in 
> this google drive folder: https://goo.gl/4Pwqev Please read the readme file 
> for more info



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FOP-2616) Extra blank page gets created even though the content fits in previous page

2016-06-28 Thread Pascal Sancho (JIRA)

[ 
https://issues.apache.org/jira/browse/FOP-2616?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15352564#comment-15352564
 ] 

Pascal Sancho commented on FOP-2616:


Please, further info is needed:
 - provide an XSL-FO file, rather than a xml+xslt pair, as short as possible, 
reproducing the issue
 - FOP version
 - attach files (XSL-FO and PDF) to the issue rather than an external link.

> Extra blank page gets created even though the content fits in previous page
> ---
>
> Key: FOP-2616
> URL: https://issues.apache.org/jira/browse/FOP-2616
> Project: FOP
>  Issue Type: Bug
> Environment: windows 7, Java 1.8
>Reporter: Ramnikunj Prajapati
>
> Hi,
> We are creating a pdf out of a xml using xsl and FOP library. We have set 
> header and footer for all pages. We have a coupon which needs to be 
> positioned at the bottom of last page of pdf and when the coupon is in the 
> bottom the footer text should not appear. If the data in the current page is 
> more to accommodate in one page than the extra data and coupon should be 
> shifted to the next page. The condition for coupon is that it should always 
> be placed in bottom of last page. We found an issue where if the data in the 
> body is about 36-39 lines which fits the current page with coupon still an 
> extra blank page gets added with the header.
> For reference please check the xsl, sample xml and pdf  which is placed in 
> this google drive folder: https://goo.gl/4Pwqev Please read the readme file 
> for more info



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)