XFDF serializes all annotation types to RubberStamp

Product: WebViewer

Product Version: 10.2.3

Please give a brief summary of your issue:
XFDF serializes all annotation types to stamp

Please describe your issue and provide steps to reproduce it:
After trying to export annotations using:
const annotData = await core.exportAnnotations({ options: { fields: true, widgets: true, links: true } });

I notice the xfdf results always serializes the annotations as stamp regardless of the type. So it is always imported as a RubberStampAnnotation and I loose all vital properties of the original annotation.

For instance after adding a text widget, I got:

<?xml version=\"1.0\" encoding=\"UTF-8\" ?>
<xfdf xmlns=\"http://ns.adobe.com/xfdf/\" xml:space=\"preserve\">
	<pdf-info xmlns=\"http://www.pdftron.com/pdfinfo\" version=\"2\" import-version=\"4\"/>
	<fields/>
	<annots>
		<stamp page=\"0\" rect=\"295.200,716.578,375.200,734.960\" color=\"#56CAE5\" flags=\"print\" name=\"7JCE5GtnOEG7\" title=\"Guest\" subject=\"Free Text\" date=\"D:20230801132456+01'00'\" creationdate=\"D:20230801132438+01'00'\" TextColor=\"#111633\" FontSize=\"12\">
			<trn-custom-data bytes=\"{&quot;trn-auto-size-type&quot;:&quot;fixedWidth&quot;,&quot;dataLabel&quot;:&quot;1/individual/7JCE5GtnOEG7&quot;,&quot;trn-annot-type&quot;:&quot;TEXT&quot;,&quot;trn-annot-data&quot;:&quot;{}&quot;,&quot;trn-wrapped-text-lines&quot;:&quot;[\\&quot; Text \\&quot;]&quot;,&quot;customJson&quot;:&quot;{\\&quot;type\\&quot;:\\&quot;TEXT\\&quot;,\\&quot;assignee\\&quot;:{\\&quot;id\\&quot;:1,\\&quot;status\\&quot;:\\&quot;A\\&quot;,\\&quot;createdAt\\&quot;:\\&quot;2023-06-15T16:17:09.000Z\\&quot;,\\&quot;createdBy\\&quot;:\\&quot;SYSTEM\\&quot;,\\&quot;updatedAt\\&quot;:\\&quot;2023-06-16T16:46:21.000Z\\&quot;,\\&quot;updatedBy\\&quot;:\\&quot;SYSTEM\\&quot;,\\&quot;deletedAt\\&quot;:null,\\&quot;name\\&quot;:\\&quot;su\\&quot;,\\&quot;email\\&quot;:\\&quot;dsd@gmail.com\\&quot;,\\&quot;role\\&quot;:\\&quot;needs_to_sign\\&quot;,\\&quot;accessCode\\&quot;:null,\\&quot;customMessage\\&quot;:null,\\&quot;teamId\\&quot;:null,\\&quot;corporateId\\&quot;:null,\\&quot;color\\&quot;:\\&quot;#56cae5\\&quot;,\\&quot;recipientType\\&quot;:\\&quot;individual\\&quot;,\\&quot;order\\&quot;:1},\\&quot;required\\&quot;:true,\\&quot;readOnly\\&quot;:false}&quot;}\"/>
			<contents> Text</contents>
			<appearance xmlns=\"http://www.w3.org/1999/xhtml\">PD94b...</appearance>
			<imagedata>data:image/png;base64,....</imagedata>
			<defaultappearance>0 0.6 0.702 rg /LucidaConsole 12 Tf</defaultappearance>
			<defaultstyle>font: 'Lucida Console' 12pt; text-align: left; text-vertical-align: top; color: #111633</defaultstyle>
		</stamp>
	</annots>
	<pages>
		<defmtx matrix=\"1,0,0,-1,0,792\"/>
	</pages>
</xfdf>

Please provide a link to a minimal sample where the issue is reproducible:

1 Like

Would you be able to share the PDF that generate this XFDF?

1 Like