Right-aligned text is cut off

The text generated in this file is cut off on the last column when it is right-aligned.

Hi Micah,

Thank you very much for considering Aspose.

I have seen the PDF file and noticed the issue. Can you please share the code snippet with us, so that we could see that how you're trying to do this? This will help us understand the problem better and help you out.

We're sorry for the inconvenience.

Regards,

private void CreateShippingList(Order OrderOf, ClientPackagingDocumentInfo ClientPackagingDocumentInfoOf)
{
Aspose.Pdf.Kit.Form shippingList;
EventLog log;
string sLog = ConfigurationSettings.AppSettings["eventLog"];

StringBuilder strRx = new StringBuilder();
StringBuilder strPatientDesc = new StringBuilder();
StringBuilder strQtys = new StringBuilder();
StringBuilder strMeasures = new StringBuilder();


Aspose.Pdf.Kit.License license = new Aspose.Pdf.Kit.License();
license.SetLicense("Aspose.Pdf.Kit.lic");

try
{
System.IO.Directory.CreateDirectory(ClientPackagingDocumentInfoOf.DestinationPath + OrderOf.ShipmentNumber + "\\");
shippingList = new Aspose.Pdf.Kit.Form(ClientPackagingDocumentInfoOf.SourcePathAndFilename, ClientPackagingDocumentInfoOf.DestinationPath + OrderOf.ShipmentNumber + "\\" + ClientPackagingDocumentInfoOf.PdfTemplateFileName);

shippingList.FillField("pharmaName", OrderOf.PharmacyAddressInfo.AddressName);

string strPharmAddr = StringUtils.GetCompleteAddress(OrderOf.PharmacyAddressInfo.AddressLine1, OrderOf.PharmacyAddressInfo.City, OrderOf.PharmacyAddressInfo.State, OrderOf.PharmacyAddressInfo.Zip);

shippingList.FillField("pharmAddr", strPharmAddr);

foreach (OrderItem oi in OrderOf.OrderItems)
{

strRx.Append(oi.Rx);
strRx.AppendLine(" ");
strRx.AppendLine(" ");

strPatientDesc.Append(oi.DrugName);
strPatientDesc.AppendLine("");
strPatientDesc.AppendLine("");

strQtys.Append(oi.Qty);
strQtys.AppendLine(" ");
strQtys.AppendLine(" ");

strMeasures.Append(oi.Measure);
strMeasures.AppendLine(" ");
strMeasures.AppendLine(" ");

}

shippingList.FillField("rxs", strRx.ToString());
shippingList.FillField("patients", strPatientDesc.ToString());
shippingList.FillField("qtys", strQtys.ToString());
shippingList.FillField("measures", strMeasures.ToString());
shippingList.FlattenAllFields();
shippingList.Save();


}
catch (Exception e)
{
log = new EventLog();
log.Source = sLog;
log.WriteEntry(e.Message, EventLogEntryType.Error);
throw new System.Exception(e.Message);

}
}

Hi Micah,

Thank you very much for sharing the code with us. In fact, I'll need a little more help from your side to understand the problem clearly. The PDF file you shared is the final output file, however in order to find out the reason of this problem we'll require the input file as well. Can you please share the input PDF with us? I mean, the file with the original form in which the values are filled.

We would really appreciate your cooperation and we're sorry for the inconvenience.

Regards,

Here is the input.

Hi Micah,

I have logged this issue as PDFKITNET-9496 in our issue tracking system. Our team will be looking into the matter and you'll be updated accordingly. Also, I would require some more information from your side and I hope this will help us understand the problem better.

As you're trying to flatten all the fields in the form after filling them. If you don't flatten the fields and just fill the form i.e. comment this line shippingList.FlattenAllFields();, does this happen in that case too?

We're sorry for the inconvenience.

Regards,

No, it doesn’t happen if I don’t flatten the fields.

The issues you have found earlier (filed as 9496) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.