Free Support Forum - aspose.com

Footer is not generating properly in PDF at Oracle Application Server

Hi,

We are using the Java Apose pdf kit file (aspose-pdf-kit-3.6.0.jar) for adding the page numbers and footer. it's working fine at testing directly in Linux environment (Standalone application). it's not generating properly when deploy application into the oracle Application server.

tested file is attached.

Used the below mentioned code for adding the Footer and Page Numbers into the PDF file.

String inFile = "D:\\AGILE.pdf";
String FooterFile = "D:\\Footer_x2010_xlsx.pdf";
String outFile = "D:\\Page_x2010_xlsx.pdf";
String stampFile = "D:\\Stamped_x2010_xlsx.pdf";

String footerText = "001 A Admin 12/15/2010";
String footerNotes = "This is a sample file";

int footerAttrSize = 7;
int footerNotesSize = 6;
int pageNumberSize = 6;

com.aspose.pdf.kit.License license = new com.aspose.pdf.kit.License();
license.setLicense(new FileInputStream("d:\\Aspose.Total.Java.lic"));
PdfFileStamp fileStamp;

fileStamp = new PdfFileStamp(inFile, FooterFile);

FormattedText footerText_format = new FormattedText(footerText, new FontColor(250, 0, 0), FontStyle.Courier, EncodingType.Winansi, false, new Integer(footerAttrSize));
FormattedText footerText_notes = new FormattedText(footerNotes, new FontColor(250, 0, 0), FontStyle.Courier, EncodingType.Winansi, false, new Integer(footerNotesSize));
fileStamp.addFooter(footerText_format, 15);
fileStamp.addFooter(footerText_notes, 5);

fileStamp.close();

PdfFileInfo fileInfo = new PdfFileInfo(FooterFile);
int totalPages = fileInfo.getNumberofPages();
fileInfo.clearInfo();

PdfFileStamp fileStamp12 = new PdfFileStamp(FooterFile, outFile);
FormattedText ft = new FormattedText("Page # of " + totalPages, new FontColor(250, 0, 0), FontStyle.CourierBold, EncodingType.Winansi, false, new Integer(pageNumberSize));

fileStamp12.addPageNumber(ft, 1);
fileStamp12.close();

PdfFileStamp fileStamp1 = new PdfFileStamp(outFile, stampFile);
Stamp logoStamp = new Stamp();
logoStamp.bindLogo(new FormattedText("Preliminary", new FontColor(90, 90, 90), FontStyle.TimesRoman, EncodingType.Winansi, false, 50));
logoStamp.setOrigin(200, 300);
logoStamp.isBackground(false);
logoStamp.setOpacity(0.5f);

logoStamp.setRotation(30);

fileStamp1.addStamp(logoStamp);
fileStamp1.close();

Regards,

Aravind

source file is attached.

Hi Dale,

Could you please also share some details regarding the issues you’re facing while generating PDF file on Oracle server?

We’re sorry for the inconvenience.
Regards,

Hi Shahzad,


In Oracle Application server, it is not throwing any error. first we are converting the xlsx to pdf file and then adding the footer details into it. It’s working fine when we convert the xls to pdf . if we convert the 2010 xlsx to pdf file, it’s not generating properly.

we have tested it directly in Linux server as a standalone application , it working file. if we deploy the same application into Oracle Application server, footer is not generating properly.


Please let me know,if you need any other details.

Regards,
Dale

Hi Dale,

Thank you very much for sharing more details. We’ll further investigate the issue at our end and you’ll be updated with the results accordingly.

We’re sorry for the inconvenience.
Regards,

Appreciate if I get an update. As mentioned earlier we are missing release dates continuously.

Hi Dale,

I’m sorry to share with you that we’re still trying to reproduce the issue at our end. I’m afraid, we can only provide a resolution or suggest some workaround once we’re able to understand the issue after reproducing it at our end. Please spare us some time, so we could further investigate it.

We’re sorry for the inconvenience.
Regards,

Hi Dale,

This issue requires further investigation. I have logged this issue as PDFKITJAVA-30069 in our issue tracking system. Please spare us some time for detailed investigation and you’ll be updated with the results the earliest possible.

We’re sorry for the inconvenience and appreciate your cooperation.
Regards,

Any updates? You can provided debug jars as you team did before.

Hi Dale,

I need to discuss with our development team whether we’ll be able to provide a similar build in this case as well. You’ll be updated with the status shortly.

Regards,

Hi Dale,

We have prepared a debug build for further analysis of this issue. Please download the build from this link. You need to set the path to the log file as shown below:


PdfFileStamp fileStamp = new PdfFileStamp(inFile, FooterFile);

fileStamp.setLog(“c:\work\test\fileStamp.log”);


Please note that the directory where this file will be stored must exist. The file will be created automatically. Please share the log file with us, so we could further investigate the issue at our end and guide you accordingly.

Regards,