Free Support Forum -

Text Form Fields Top Gets Cut Off

I’m having a problem similar to the one in the attached file that was generated through your Aspose.Pdf.Kit C# demos (FillFields.aspx). Basically the top of the text is cut off when viewed and printed. It’s only if the field is selected that the text is properly displayed in the text field. I have custom code that has a similar issue. I have left off that PDF file and code due to privacy, and feel it is importatnt to share this post with other users. I am using Aspose.Pdf.Kit version 5.4.0 with C#/ASP.NET code. I am viewing the file using Adobe Reader X (10).

Hi Carlos,

I have reproduced this problem at my end using the latest version and logged it as PDFKITNET-25901 in our issue tracking system. Our team will look into this issue and you’ll be updated via this forum thread once it is resolved.

We’re sorry for the inconvenience.

Hi Shahzad,

We're experiencing a similar problem wherein the top part of the text in the generated PDF gets chopped off.

We're using Asdobe Reader 11 and Aspose.Pdf.Kit ver 5.6. I have attached the snapshot of how the chopped text looks in the generated pdf. However, if I open the pdf and manually enter data into it (no generation using Aspose), the text is OK.

Please let me know if you have any updates on this.

Hi Murali,

Thanks for contacting support.

Can you please share the source PDF file and the code snippet that you are using so that we can test the scenario at our end. We are sorry for your inconvenience.


Please find the below attached files:

which was generated while running the form(i.e. Generated File.pdf ) as well as PDF/XSLT files uploaded in Form(i.e. PTO-AIA-96_v08-12.pdf, PTO-AIA-96_v08-12.xml).

Aspose DLL version: 5.6

Here the ImportXml code:
private void ImportXml(string templatePdf, FileStream xml, string destFileName)

Aspose.Pdf.Kit.License pdfLicense = new Aspose.Pdf.Kit.License();
pdfLicense.SetLicense(HttpContext.Current.Server.MapPath (HttpContext.Current.Request.ApplicationPath + "/Aspose.Total.lic.xml"));

//Assign an input pdf file.
Aspose.Pdf.Kit.Form form = new Aspose.Pdf.Kit.Form(templatePdf, destFileName);

//Open an existed fdf file.
//System.IO.FileStream xmlInputStream = new FileStream(xml, FileMode.Open);
//Export all the pdf fields' value into the fdf file.

xml.Position = 0;


even you can reproduce this issue by passing default values in XSLT.
Note: Generated PDF is only having problem,manually if u open the PDF and enter the data in the fields working fine.


Hi Murali,

Thanks for sharing the resource files.

I have tested the scenario where I have tried using the code snippet which you have shared earlier to import XML data into PDF form, but I am afraid I am unable to see any information in resultant PDF document. I am able to notice the problem in Generated+file.pdf but it seems to be generated with GPL Ghostscript 8.15 (see attached image).

Can you please again try filling the form at your end and share your findings. We are sorry for your inconvenience.

Hi Shahbaz,

Thanks for your response.

The PDF templates used in the application are provided by the US Patent Office. You can download an empty PDF template from their site here:

I checked the document properties of AIA96.pdf and it matches to what you have mentioned in your reply.Nevertheless, we have this problem in other PDF templates that are generated using Acrobat Distiller 9.3.0 too.

Hi Murali,

I have again tested the scenario using Aspose.Pdf for .NET 7.6.0 where I have used aia0096.pdf as template PDF form, I am still unable to notice the issue. The text is properly appearing. Please take a look over the output PDF which is being generated over my end.


DataSet ds = new DataSet();<o:p></o:p>

ds.ReadXml(@"c:/pdftest/DataSetXml (1).xml");

XmlDataDocument dataXmlDoc = new XmlDataDocument(ds);

XslTransform xslTran = new XslTransform();

//FileStream outputXml = new FileStream();

string tempFile = "";

tempFile = @"c:\pdftest\out.xml";

FileStream outputXml = new FileStream(tempFile, FileMode.Create);

xslTran.Load("c:/pdftest/PTO-AIA-96_v08-12 (1).xml");

xslTran.Transform(dataXmlDoc, null, outputXml);

ImportXml(@"c:/pdftest/ aia0096 - Copy.pdf", outputXml);

private void ImportXml(string templatePdf, FileStream xml)


Aspose.Pdf.Facades.Form form = new Aspose.Pdf.Facades.Form();

//form.DestFileName = destFileName;

FileStream fs = new FileStream(templatePdf, FileMode.Open, FileAccess.ReadWrite);


xml.Seek(0, SeekOrigin.Begin);





Can you please try using the latest release version and in case the problem still persists, please share the sample project and some details regarding your working environment.

The issues you have found earlier (filed as ) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by MuzammilKhan