I thought I posted this before, but I can’t find it now. We have a complex form (over 200 fields) that we are filling (HFCA for medical billing), and we discovered that if we optimize resources on a document containing fields, the document is silently corrupted by replacing some fields with other fields, so that info is incorrectly duplicated in multiple locations. We have to wait until after a form as been flattened, and even then, I am somewhat nervous to use this feature.
Hi Joseph,
This is a purchased/licensed product, so all I can send you is a link to a sample download: http://www.pdfsmartforms.com/SmartForm_CMS1500_02_12_TRIAL.pdf
Hi Joseph,
Can you post the code you used? I am thinking that it might be a problem of the order in which commands are issued. Thanks.
Hi Joseph,
I have used the following code snippet with Aspose.Pdf for .NET 9.2.1.
// load source PDF
Document doc = new Document("c:/pdftest/SmartForm_CMS1500_02_12_TRIAL.pdf");
doc.OptimizeResources(new Document.OptimizationOptions()
{
LinkDuplcateStreams = true,
RemoveUnusedObjects = true,
RemoveUnusedStreams = true
});
// save updated document
doc.Save("c:/pdftest/SmartForm_CMS1500_02_12_TRIAL_Optimized.pdf");