Hi Nausherwan,
I used ver 7.3 and I am getting this following error at the license check.
The subscription included in this license allows free upgrades until 25 Apr 2012, but this version of the product was released on 28 Aug 2012. Please renew the subscription or use a previous version of the product.
Hence kindly can you send me the latest license for v7.3.
I skipped the license check.
I am getting the following error.
System.InvalidCastException was unhandled
Message="Unable to cast object of type '.' to type '.'."
Source="Aspose.Pdf"
StackTrace:
at ..()
at ..()
at Aspose.Pdf.Page.( )
at Aspose.Pdf.Page.( )
at Aspose.Pdf.Page.get_Number()
at LearningProject.Form1.button7_Click(Object sender, EventArgs e) in E:\SaravananD on 10.237.78.54\LearningVCProjects\LearningProject\LearningProject\Form1.cs:line 436
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at LearningProject.Program.Main() in E:\SaravananD on 10.237.78.54\LearningVCProjects\LearningProject\LearningProject\Program.cs:line 18
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:
Code Part:
private void button7_Click(object sender, EventArgs e)
{
Document outputPDF = new Document(@"E:\pdftest\201208291000028.PDF");
foreach (Page pdfpage in outputPDF.Pages)
{
outputPDF.Pages.Delete(pdfpage.Number);
Document PortPDF = new Document(@"E:\pdftest\multilayer.PDF");
Page PortPage = PortPDF.Pages[1];
outputPDF.Pages.Insert(pdfpage.Number, PortPage);
outputPDF.Save(@"E:\pdftest\201208291000028.PDF");
}
}
for your reference I am attaching the PDF files
Please use this PDF files otherwise take some sample file and run the above code.
Kindly reply to my email with solution.
Thanks & Regards,
P. Saravanan.