I am trying to import XML into a Dynamic PDF file to populate form value. The ImportXML and Save methods seem to work without error but when I open the destination PDF, it does not display the values that exist in the XML.
Hi Charles,
Thank you for sharing the sample code and template file.
I tried your sample code with the latest merged Aspose.Pdf for .NET v6.7.0 and it works fine. I would like to inform you that Aspose.Pdf for .NET and Aspose.Pdf.Kit for .NET have been merged into a single product and Aspose.Pdf.Kit for .NET has been discontinued as a separate product. All the features of Aspose.Pdf.Kit for .NET are available under Aspose.Pdf.Facades namespace of Aspose.Pdf for .NET v6.x. Please download and try the latest version of Aspose.Pdf for .NET v6.7 and check if you still face any issue. You can check the following documentation links to upgrade your code from Aspose.Pdf.Kit for .NET to the new merged Aspose.Pdf for .NET.
http://www.aspose.com/blogs/aspose-blogs/shahzad-latif/archive/2011/06/11/migrating-from-legacy-code-to-merged-aspose.pdf-for-.net.html
Please feel free to contact support in case you need any further assistance.
Sorry for the inconvenience,
Nausherwan,
Hi Charles,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
I have shared your sample code, template and resultant file with our development team to further analyze your issue. I will update you via this forum thread regarding any update against your issue.
Sorry for the inconvenience,
<span style=“font-family: “Tahoma”,“sans-serif”; font-size: 10pt;”>Hi Charles,
Thanks for your patience.
Please note that Extended usage rights remain in PDF document when using Aspose.Pdf for .NET in in licensed mode and in order to preserve the extended usage rights, PDF must be updated incrementally. For
that we must initialize Aspose.Pdf.Facades.Form with input file/stream ==
output file/stream. Otherwise output file/stream will be totally re-saved
and hence extended usage rights will become broken. Please try using the following code snippet to maintain the extended Rights feature when filling data inside PDF document.
The resultant PDF generated with Aspose.Pdf for .NET 7.2.0 is also attached.
[C#]
<!–[if gte mso 9]>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-US</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
</w:Compatibility>
<m:mathPr>
<m:mathFont m:val=“Cambria Math”/>
<m:brkBin m:val=“before”/>
<m:brkBinSub m:val="–"/>
<m:smallFrac m:val=“off”/>
<m:dispDef/>
<m:lMargin m:val=“0”/>
<m:rMargin m:val=“0”/>
<m:defJc m:val=“centerGroup”/>
<m:wrapIndent m:val=“1440”/>
<m:intLim m:val=“subSup”/>
<m:naryLim m:val=“undOvr”/>
</m:mathPr></w:WordDocument>
<![endif]–><!–[if gte mso 10]>
<![endif]–>
Aspose.Pdf.Facades.Form form = new Aspose.Pdf.Facades.Form("d:/pdftest/Source+Form.pdf", "d:/pdftest/Source+Form.pdf");
// Import XML
FileStream file = new FileStream("d:/pdftest/pdf.xml", FileMode.Open);
form.ImportXml(file);
file.Close();
// Save form
form.Save();
The issues you have found earlier (filed as PDFNEWNET-20907) have been fixed in Aspose.Pdf for .NET 7.2.0.
This message was posted using Notification2Forum from Downloads module by aspose.notifier.
(2)