We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Bottom of text cut off using addText in PdfFileMend

I am unable to keep the font from getting cut off at the bottom. Any lowercase Y's or G's get cut off. I tried increasing the size of the box and reducing the font size to no avail. I have attached an example. I don't believe this is a problem with the font, because the evaluation only message at the top is getting cut off as well. I am also hoping to center this text in the document, an ideas on that are greatly appreciated.

Thanks, Adam

//specify input and output PDF file paths
String inputFile = "C:\\Untitled.pdf";
String outputFile = "C:\\Certificate.pdf";

//specify image file path
String imageName = "C:\\paul-signature.gif";

//create file streams for all of the files to be used in the example
FileInputStream inPdfStream = new FileInputStream(inputFile);
FileInputStream inImgStream = new FileInputStream(imageName);
FileOutputStream outputStream = new FileOutputStream(outputFile);

//create instance of PdfFileMend class
PdfFileMend mendor = new PdfFileMend(inPdfStream, outputStream);

//add image to the input PDF file on page number 1 at specified location
mendor.addImage(inImgStream, 1, 50, 50, 100, 100);

//create new FormattedText type object to add text in the PDF file
FormattedText ft = new FormattedText("Billy Magin Jones", new FontColor(0, 0, 0), "c:\\zcr_____.pfm", EncodingType.Winansi, true, 40);
//add text in the existing PDF file
//addText(FormattedTexttext, intpageNum, floatlowerLeftX, floatlowerLeftY, floatupperRightX, floatupperRightY)
mendor.addText(ft, 1, 100, 400, 600, 700);


//claose the PdfFileMend type object
mendor.close();
//close output file stream
outputStream.close();

Hi Adam,


Thanks for using our products.

I
have tested the scenario and I am able to reproduce the same problem. For the
sake of correction, I have logged it in our issue tracking system as PDFKITJAVA-33264. We
will investigate this issue in details and will keep you updated on the status
of a correction.

We
apologize for your inconvenience.

Nayyer,


Any update on the status of this issue? PDFKITJAVA-33264

Thanks, Adam

Hi Adam,


Thanks for your patience.

The development team has been busy resolving other priority issues and I am afraid the issue reported earlier is not yet resolved. Nevertheless, I have requested the team to share the ETA regarding its resolution. As soon as we have some definite updates regarding its resolution, we would be more than happy to update you with the status of correction. Please be patient and spare us little more time.

We are really sorry for this inconvenience.

The issues you have found earlier (filed as PDFKITJAVA-33264) have been fixed in Aspose.Pdf.Kit for Java 4.6.0.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.