Could not validate PDF/A after convert

Recently we purchase ASPOSE .NET, we are using that convert PDF to PDF/A, however, when I tried to validate to see whether the PDF is already PDF/A or not. Those already converted PDF sometime could not validated. PDF with a few pages is fine but not PDF with 20 or more pages.

Please advise this as soon as possible.

Hi Zhong,


Thanks for using our API’s.

Please share the resource PDF files which are failing during PDF to PDF/A conversion and also please share the code snippet which you are using, so that we can test the scenario in our environment. We are sorry for your inconvenience.

Please check attached PDF (already converted to PDF/A 1B), Here is the coding



if(pdfDocument.Validate(procDir + validateXml, PdfFormat.PDF_A_1B)){

bcompliance=true;

File.Copy(inDir+readmetext, outDir+readmetext, true);

}

else{

bcompliance=false;

pdfDocument.Convert(procDir + validateXml, PdfFormat.PDF_A_1B, ConvertErrorAction.None);

pdfDocument.Save(outDir + readmetext);

}

Hi Zhong,

Thanks for sharing the resource file.

I have tested the scenario using Aspose.Pdf for .NET 11.0.0 where I have used following code snippet and as per my observations, when running PDF/A_1b compliance check over resultant file, the compliance check is properly being passed. For your reference, I have also attached the image showing compliance check results and the resultant document generated over my end. Can you please try using latest release and share your findings.

[C#]

//
Create Document instance

Aspose.Pdf.Document pdfDocument = new Document(“c:/pdftest/14-8349_resp.authcheckdam.pd.pdf”);

pdfDocument.Convert(“c:/pdftest/14-8349_resp.authcheckdam.txt”, PdfFormat.PDF_A_1B, ConvertErrorAction.None);

// save the PDF document

pdfDocument.Save(“c:/pdftest/14-8349_resp.authcheckdam_PDF-A1b.pdf”);


<!–[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]>

/* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin-top:0in; mso-para-margin-right:0in; mso-para-margin-bottom:8.0pt; mso-para-margin-left:0in; line-height:107%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin;}

<![endif]–>

Thanks for your testing, I just replaced .NET component to 11.0.0, originally downloaded is 10.5.8.

I could validate one of PDF originally could not validated but still some could not validate. However, those converted PDF is said PDF/A compliance if I open using Acrobat Reader.

My understanding is the validate function may still have some issue but the conversion is good.

Thanks for your reply,

Zfang:
Thanks for your testing, I just replaced .NET component to 11.0.0, originally downloaded is 10.5.8.

I could validate one of PDF originally could not validated but still some could not validate. However, those converted PDF is said PDF/A compliance if I open using Acrobat Reader.

My understanding is the validate function may still have some issue but the conversion is good.

Thanks for your reply,

Hi Zhong,

Thanks for sharing the details. I have tested the scenario and have managed to reproduce the same issue that Document.Validate(…) method is failing when validating previously shared PDF/A_1b file. For the sake of correction, I have logged this problem as PDFNEWNET-39719 in our issue tracking system. We will further look into the details of this problem and will keep you posted with our findings. We are sorry for this inconvenience.

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