Issue when converting XFA to Acroform

Hi, we are having issues with the conversion of XFA to Acroform. in Aspose.PDF:

the Java code we are executing is:

Document pdfDocument = new Document(sourceName);
pdfDocument.getForm().setType(FormType.Standard);
pdfDocument.save(targetName);			

I am attaching the source file TillRon.pdf and the resulting file TillRonMedSign.pdf.

As you will see, the font in the file changes, the layout jumps about, the text string ‘Kansligrupp 7 Rgn Sthlm’ is removed from the source document, ‘Saknummer 517’ is added to page 2 in TillRonMedSign.pdf

The reason we are converting to AcroForm is that text stamps do not work in Aspose on XFA documents.

 textStamp.setRotate(Rotation.on90);
// set text properties
textStamp.getTextState().setFont(FontRepository.findFont("Arial"));
textStamp.getTextState().setFontSize(12.0F);
	        
textStamp.setXIndent(pageWidth-32);
textStamp.setVerticalAlignment(VerticalAlignment.Center);
	        
for (int Page_counter = 1; Page_counter <= pdfDocument.getPages().size(); Page_counter++) {
            // add stamp to all pages of PDF file
            pdfDocument.getPages().get_Item(Page_counter).addStamp(textStamp);
}

Please advise.

Regards,
Stefan
TillRonMedSign.pdf (317.1 KB)

TillRon.pdf (328.6 KB)

@tefan57

Would you please share which version of the API are you using? Also, it looks like the output PDF that you shared has further been modified with another software. Can you please confirm if this is created with Aspose.PDF for Java?

Hi,

Aspose-pdf-23.4

The file TillRon.pdf was created by Adobe AEM in XFA format.

We are seeking to replace AEM entirely, but will be forced to work with documents generated by AEM for a period of time.

All we need to do with these documents is place a text stamp on the right margin.

This is the reason we are converting to AcroForm.

Please let us know if you know of alternate ways to place TextStamps on XFA that does not involve converting them to AcroForm.

Regs,
Stefan

This problem is related to PDFJAVA-41959.

Could you please check the status?

Regs,
Stefan

@tefan57

We are afraid that the earlier logged ticket has not been resolved yet due to other issues in the queue logged prior to it.

Furthermore, we have been working on implementing a new engine for XFA to Acroform Conversion in the API. A ticket as PDFJAVA-43337 has been logged for your specific case as well. We will let you know as soon as the issue is fixed. We apologize for your inconvenience caused due to this issue.

Hi,

Thanks for the reply.

Do you know of any workaround for the problem?

Is there any other technique that allows for stamping of a single line of text on an XFA?

How close are you to to finalizing the new XFA to AcroForm engine?

Regs,
Stefan

@tefan57

We are afraid that we cannot share any timeline or reliable at the moment as the ticket is still under the phase of the investigation. As soon as we make some progress towards its resolution, we will let you know in this forum thread. We apologize for the inconvenience.

Hi, any updates?`

Regs,
Stefan

@tefan57

Sadly, no updates are available at the moment. The tickets could not get fully investigated yet due to other issues in the queue. Nevertheless, your concerns were already recorded and we have updated the ticket information again for your follow up. As soon as we have some news about their fixes or ETA, we will inform you. We are sorry for the inconvenience.

The issues you have found earlier (filed as PDFJAVA-41959) have been fixed in Aspose.PDF for Java 24.2.