Hi, All,
The following code is from Aspsose documentation http://www.aspose.com/documentation/.net-components/aspose.pdf-for-.net/add-page-number-in-a-pdf-file-facades.html. And I need them. But there is compiler error (see purple colored) when I copied them to my .NET IDE
Imports Aspose.Pdf
Imports Aspose.Pdf.Facades
Imports Aspose.Pdf.Color
...
'open document
Dim fileStamp As New PdfFileStamp("input.pdf", "output.pdf")
'get total number of pages
Dim totalPages As Integer = New PdfFileInfo("input.pdf").NumberOfPages 'here is said "Number of page is ambiguous because multiple kinds of members with this name exist in class 'Aspose.Pdf.Facades.PdfFileInfo'"
'create formatted text for page number
Dim formattedText As New FormattedText("Page # Of " & totalPages, Color.Blue, Color.Gray, Aspose.Pdf.Facades.FontStyle.Courier, EncodingType.Winansi, False, 14) 'Here is said Gray is not a member of Aspose.Pdf.Color
'set starting number for first page; you might want to start from 2 or more
fileStamp.StartingNumber = 1
'add page number
fileStamp.AddPageNumber(formattedText, 0)
'save updated PDF file
fileStamp.Close()
Please help
Thanks
sxia
Hello Samuel,
Thanks for using our products.
The issues has already been logged as <!–[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:DontVertAlignCellWithSp/>
<w:DontBreakConstrainedForcedTables/>
<w:DontVertAlignInTxbx/>
<w:Word11KerningPairs/>
<w:CachedColBalance/>
<w:UseFELayout/>
</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-qformat:yes;
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:10.0pt;
mso-para-margin-left:0in;
line-height:115%;
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]–><span style=“font-size:10.0pt;line-height:115%;
font-family:“Arial”,“sans-serif”;mso-fareast-font-family:“Times New Roman”;
mso-ansi-language:EN-US;mso-fareast-language:ZH-CN;mso-bidi-language:AR-SA”>PDFNEWNET-29615 in our issue tracking system and its HotFix will be included in next release version of Aspose.Pdf for .NET 6.1.0 (which is expected to be out in a day or tow). Please be patient and wait for the hotfix. In case you still face any problem or you have any further query, please feel free to contact. We apologize for your inconvenience.
The issues you have found earlier (filed as 29615) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by aspose.notifier.(8)