for testing the PDFs generated with ASPOSE.pdf before I have to analyze them in regression tests for content and formats. Stepping through the forums and documents I did not find a good idea how to reach this.
So I would like to give an example and hope for good ideas how to open and analyze the PDFs accordingly.
I generated a test PDF with the required content as attached. My test requirement is: “<span style=“font:7.0pt “Times New Roman””>Image is
displayed left aligned and has caption below image”<!–[if gte mso 9]>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:HyphenationZone>21</w:HyphenationZone>
<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]>
As per your requirement, I can see that Image is appearing in resultant PDF file where its caption is displayed beneath it. I am afraid I am unable to understand the issue which you are facing. Can you please share some further details and also please share the code snippet which you are using. We will take a look and will reply accordingly.
Nayyer Shahbaz,<br><br>let me explain what I need to do:<br>For regulatory reasons the generated PDFs must fulfill several <b>formal </b>requirements. Some examples: appearance of images, right-to-left support, content of header and footer etc.<br>So the attached PDF is only an example which is generated by a regression test. I can analyze it manually, but the test shall do this for me.<br><br>I generate the PDF with aspose.pdf.generator (I plan to migrate later to the new aspose.pdf) and save it.<br>Currently I do the analysis with aspose.pdf.generator after saving.<br><br>I plan to re-open the saved file and do the analysis on it. I tried this with aspose.pdf.generator and with the new aspose.pdf but the without success. <br>What I need to know which capabilities aspose.pdf at all is offering to me for this task and how to reach this. <br><br>Thanks for your help<br>Gerd<br><br>
As per my understanding, you need to analyze the PDF file contents and as per your requirements, we suggest you to please try using Aspose.Pdf namespace as it offers the feature to create as well as manipulate existing PDF files. As per your requirements, you can use this API to open existing files, the number of images, properties (dimensions) of images, text contents inside PDF file, location of TextFragment, attachments etc inside PDF file. Please visit the following link for further information on
thanks for your respoonse. The overview ist excactly that what I was looking for.
The migration to the new namespace for the generation of PDFs is currently not possible due to my schedule. Is there a problem if the PDFs are generated by Aspose.Pdf.Generator and will be analyzed with Aspose.Pdf?
There should not be an issue while analyzing the PDF file generated with Aspose.Pdf.Generator namespace. In case you encounter any issue, please feel free to contact.