Want to buy Aspose.Pdf.Kit and have some questions about it

Hi all,

i'm using the evaluation edition to test aspose controls to choose for a project of our company. But we are receiving following error "Index and length must refer to a location within the string.
Parameter name: length" (I am attaching a sample file)

And it is some what slow while loading the file i.e.

PdfFileInfo pdfFile = new PdfFileInfo(strCopy);

Can you please tell us why it is so.

Krish....

Hi,

Thank you for considering Aspose.

Please make sure the 'strCopy' be the string/stream represent of an absolute file name, as following:

string strCopy = @"d:\4633_1.PDF"; // "d://4633_1.PDF";<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

PdfFileInfo pdfFile = new PdfFileInfo(strCopy);

Please refer to our online documentation about PdfFileInfo Constructor.

Thanks,

Hi

Thanks for prompt email, Can you also please suggest me on how to resolve the error "Index and length must refer to a location within the string.
Parameter name: length"

Thanks

Krish...

Hi Krish,

I have tested the issue with the file you provided, and I couldn't find any issue. It loads quickly and there is no "index and length ..." related error. Can you please share with us how you're specifying the file path?

We appreciate your patience and cooperation.

Regards,

Hi,

Sorry for that I must have misunderstood your question, but I cannot reproduce the error. And in my testing, the above code works (with the attached pdf ) properly. Could you please also share the code which cause the problem to us? and tell us which version of Aspose.Pdf.Kit you are using?

Thanks,

Hi

I am sorry as I didn't explained where exatly the issue is coming.

pdfFile = new PdfFileInfo(location of file);

if (pdfFile.CreationDate != null) --> here i am getting that exception.

Thanks

Krish...

I am using Aspose.Pdf.Kit 3.3.0.0

Hi Krish,

I have tested the issue again and successfully displayed the CreationDate. I used Aspose.Pdf.Kit 3.3.

Do you think you can provide some more related information that can be helpful to resolve the issue? i.e. OS version or anything else.

We appreciate your cooperation.

Regards,

Hi

We are running the code in Windows Server 2003, .net framework 2003. In our code we are also using many other 3 rd party DLLS like DSO.DLL, Interwoven WorkSite API etc. In server Adobe 7.0 is installes. We are getting this problem only for few PDF's.

The server time is in GMT. I hope this information helps you to find the reason for this issue.

Thanks

Krish...

Hi I got the problem.

I observerd one thing is some time the veluw returun consist of 'Z' and some not. We are getting ssue here.

Now we will resolve it. Thank you for your help.

KrishN:

I observerd one thing is some time the veluw returun consist of 'Z' and some not. We are getting ssue here.

Now we will resolve it. Thank you for your help.

Hi Krish,

Does that mean it is working fine at your end now? Or do we need to investigate the issue further to help you out?

Regards,

Hi Felix,

Yes it is running fine but only small information is needed, is creation date and modification date allways starts with "D:" for example "D:20080430171853Z"

here the issue is some times we are getting Z and some not

So how you're converting it into standard date format. I am following the below procedure Please let me know whether any simple way is there

strCreationDate = pdfFile.CreationDate.ToString();

iYear = Convert.ToInt32(strCreationDate.Substring(2, 4));

iMonth = Convert.ToInt32(strCreationDate.Substring(6, 2));

iDate = Convert.ToInt32(strCreationDate.Substring(8, 2));

iHour = Convert.ToInt32(strCreationDate.Substring(10, 2));

iMin = Convert.ToInt32(strCreationDate.Substring(12, 2));

iSec = Convert.ToInt32(strCreationDate.Substring(14, 2));

if (strCreationDate.Length == 16)

{

}

if (strCreationDate.Length > 16)

{

if (strCreationDate.Substring(16, 1).Equals("Z") || strCreationDate.Substring(16, 0) == null)

{

}

else

{

iChgHour = Convert.ToInt32(strCreationDate.Substring(17, 2));

iChgMin = Convert.ToInt32(strCreationDate.Substring(20, 2));

if (strCreationDate.Substring(16, 1).Equals("+"))

{

iHour = iHour - iChgHour;

iMin = iMin - iChgMin;

}

if (strCreationDate.Substring(16, 1).Equals("-"))

{

iHour = iHour + iChgHour;

iMin = iMin + iChgMin;

}

}

}

DateTime createDate = new DateTime(iYear, iMonth, iDate, iHour, iMin, iSec);

String strCreatedDate = Convert.ToString(createDate.ToString(strDateFormat));

Hi,

Please follow this link: <A href="https://forum.aspose.com/t/128791</A></P> <P>Hope that helps.</P> <P>Thanks,</P>