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

Free Support Forum - aspose.com

FormField Font is not availiable in Flattened PDF

I have a PDF with several Form fields on it. I am calling Form.FlattenAllFields to merge the Field text in the PDF. However, when I open the PDF in Adobe Acrobat Pro and go to edit the flattened text, I get an error.

"Warning! Since the original font is not availiable, a substituted font for editing is used. Any changes to the text of the original font willplace a new font dependancy upon the document."

Essentially, the font the field is set to in Aspose when if filling the field is "TimesRoman". I have confirmed that in code. The rest of the document is set to "TimesNewRoman" confirmed in Adobe Acrobat Pro.

It seems the font that is applied to the text when the fields are flattened is not an accessable font. Is there any way to use Aspose to tell the PDF to either embed the font or use a standard font that will not produce this error?

FYI, the reason I can not have this error is that a machine is reading this PDF and is throwing an error becuase it can not handle the missing font.

Hi Michael,

Please share the sample input PDF file with us along with the code snippet you’re using at your end. Also, please share how you created the original PDF file. We’ll look into the issue at our end and you’ll be updated accordingly.

We’re sorry for the inconvenience.
Regards,



The attached PDF was created in Adobe Acrobat Pro 9.0.

Here is the code to fill the form fields.

MemoryStream pdfHeaderPageMemoryStream = new MemoryStream();

Assembly currentAssembly = Assembly.GetExecutingAssembly();

Stream pdfTemplate = currentAssembly.GetManifestResourceStream("RouteSheetTemplate.pdf");

Form pdfForm = new Form(pdfTemplate, pdfHeaderPageMemoryStream);

pdfForm.FillField(@"txtFileName", opcJob.FileName);

switch (opcJob.RoutingInstruction)

{

case RoutingInstruction.x85x11_Trifold:

pdfForm.FillField(@"txtRoutingInstructions", "8.5 x 11 Tri-fold");

break;

default:

pdfForm.FillField(@"txtRoutingInstructions", "None");

break;

}

switch (opcJob.RoutingInstruction)

{

case RoutingInstruction.x85x11_Trifold:

pdfForm.FillField(@"txtFormCode", @"Plain White Paper");

break;

default:

pdfForm.FillField(@"txtFormCode", "None");

break;

}

switch (opcJob.MailingPackage)

{

case MailingPackage.AFIC10:

pdfForm.FillField(@"txtMailingPackage", @"AFIC10");

break;

default:

pdfForm.FillField(@"txtMailingPackage", @"None");

break;

}

switch (opcJob.GuntherJobName)

{

case GuntherJobName.ADSLTRS:

pdfForm.FillField(@"txtGuntherJobName", @"LTRS");

break;

default:

pdfForm.FillField(@"txtGuntherJobName", @"None");

break;

}

pdfForm.FillField(@"txtDate", DateTime.Now.ToShortDateString());

pdfForm.FlattenAllFields();

pdfForm.Save();

return pdfHeaderPageMemoryStream;

Hi Michael,

We’re looking into this issue at our end, however in the meanwhile, can you please share your output file with us, so we could compare it with our output file?

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

Here is the output file.

Hi Michael,

Thank you very much for sharing the file with us. We’ll further investigate this issue and update you accordingly.

We’re sorry for the inconvenience. If you have any further questions, please do let us know.
Regards,

Has there been any progress on this issue?

Hi Machael,

We’re still investigating this issue at our end. I have logged it as PDFKITNET-16575 in our issue tracking system. You’ll be informed via this forum thread once it is resolved.

We’re sorry for the inconvenience.
Regards,

Hi Machael,

We have further investigated this issue at our end, but couldn’t reproduce it. Can you please share a small sample project which can help us reproduce the issue at our end? Also, please share the snapshots to elaborate how you reproduce the error and where it occurs.

We’re sorry for the inconvenience.
Regards,

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