We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Problem to read a 15 digit

Hello , in Attachement I have a pdf file from a customer.

The file is in Ocr , so we could read this , If we copy and paste the Digits after the ARKEY
we get this correct 110450100003620.
But after the Aspose we have a problem in the SQL Database we see that the digits atre not correct
–> 1104501000 3620
The last 0 is a space , what could here be the problem and how I could solve this one ?

Thanks for any help

Hi Kristof,

I’m afraid, I couldn’t understand the query. Could you please elaborate a little bit? Are you trying to extract the text from the PDF? Which component are you using? Could you please share the code snippet with us as well? We’ll further investigate this issue and guide you accordingly.

We’re sorry for the inconvenience.
Regards,

Hello we use the PDF complete .

The problem is when we snipp the Barcode from the pdf whe have the correct digits .when we do this with aspose the last 0 will be a space .

Otherwise we don’t have the problem to read any pdf just onthis kind of documents

Hi Kristof,

Could you please share the name and the version of the component as well? Also, please provide the code snippet you’re using at your end. I would like to share that this information helps us focus on your particular issue and reproduce the problem using your particular scenario.

We’re sorry for the inconvenience and appreciate your cooperation.
Regards,

Hello we have the Aspose.pdf.kit

The Aspose.pdf is version 3.9.0.0 and the aspose.pdf.kit is version 3.3.0.0
Hereby a little code we use , because we have a lot of code that aspose use in our Application .

public class FilePropertyInfoPdf : FilePropertyInfo
{
public FilePropertyInfoPdf(UploadFileStream uploadFileStream, String fullPath)
: base(uploadFileStream, fullPath)
{
if (String.IsNullOrEmpty(fullPath))
throw new ArgumentNullException(“fullPath”, String.Format(Exceptions.ParameterIsNullOrEmpty, “FullPath”));

if (!File.Exists(fullPath))
throw new FileNotFoundException(String.Format(Exceptions.FileNotFound, fullPath), fullPath);

this.m_license = new Aspose.Pdf.Kit.License();
this.m_license.SetLicense(Configurations.AsposeLicenseFile);
this.m_document = new Aspose.Pdf.Kit.PdfFileInfo(fullPath);
this.m_fullPath = fullPath;
}

private String m_fullPath;
private Aspose.Pdf.Kit.License m_license;
private Aspose.Pdf.Kit.PdfFileInfo m_document;

public override String Author
{
get { return this.m_document.Author; }
}

public override String Category
{
get { return String.Empty; }
}

public override String Comments
{
get { return String.Empty; }
}

public override String Company
{
get { return String.Empty; }
}

public override String Content
{
get
{
try
{
return ExtractContent(this.m_fullPath);
}

catch (Exception ex)
{
TraceHelper.WriteException(ex);
return String.Empty;
}
}
}

public static string ExtractContent(string filePath)
{
Aspose.Pdf.Kit.PdfExtractor pdfExtractor = new Aspose.Pdf.Kit.PdfExtractor();
pdfExtractor.BindPdf(filePath);
pdfExtractor.ExtractText();
pdfExtractor.GetText(filePath + “.sdx”);

//We must use encoding, otherwise chars like ä, é … will not be visualized correctly: string content = File.ReadAllText(filePath + “.sdx”);
string content = File.ReadAllText(filePath + “.sdx”, System.Text.Encoding.Default);

File.Delete(filePath + “.sdx”);

return content;
}

public override String Keywords
{
get { return this.m_document.Keywords; }
}

public override String LastSavedBy
{
get { return String.Empty; }
}

public override String Manager
{
get { return String.Empty; }
}

public override String Subject
{
get { return this.m_document.Subject; }
}

public override String Title
{
get { return this.m_document.Title; }
}

public override IDictionary<String, String> UserDefinedProperties
{
get
{
Dictionary<String, String> userDefinedProperties = new Dictionary<String, String>();
return userDefinedProperties;
}
}

public override DateTime UtcContent
{
get
{
if (String.IsNullOrEmpty(this.m_document.CreationDate))
return DateTime.MaxValue;

if (this.m_document.CreationDate.Length >= 16)
{
DateTime result = DateTime.MaxValue;
DateTime.TryParseExact(this.m_document.CreationDate.Substring(0, 16), “D:yyyyMMddHHmmss”, CultureInfo.InvariantCulture, DateTimeStyles.None, out result);
return result;
}
else
return DateTime.MaxValue;
}
}

public override DateTime UtcLastPrinted
{
get { return DateTime.MaxValue; }
}

public override DateTime UtcLastSaved
{
get
{
if (String.IsNullOrEmpty(this.m_document.ModDate))
return DateTime.MaxValue;

if (this.m_document.ModDate.Length >= 16)
return DateTime.ParseExact(this.m_document.ModDate.Substring(0, 16), “D:yyyyMMddHHmmss”, CultureInfo.InvariantCulture);
else
return DateTime.MaxValue;
}
}

}

public class FilePropertyInfoUnknown : FilePropertyInfo
{
public FilePropertyInfoUnknown(UploadFileStream uploadFileStream, String fullPath)
: base(uploadFileStream, fullPath)
{
if (String.IsNullOrEmpty(fullPath))
throw new ArgumentNullException(“fullPath”, String.Format(Exceptions.ParameterIsNullOrEmpty, “FullPath”));

if (!File.Exists(fullPath))
throw new FileNotFoundException(String.Format(Exceptions.FileNotFound, fullPath), fullPath);

m_fullPath = fullPath;
}

private string m_fullPath;

public override String Author
{
get { return String.Empty; }
}

public override String Category
{
get { return String.Empty; }
}

public override String Comments
{
get { return String.Empty; }
}

public override String Company
{
get { return String.Empty; }
}

public override String Content
{
get { return ExtractContent(this.m_fullPath); }
}

public static string ExtractContent(string filePath)
{
String content = “”;
return content;
}

public override String Keywords
{
get { return String.Empty; }
}

public override String LastSavedBy
{
get { return String.Empty; }
}

public override String Manager
{
get { return String.Empty; }
}

public override String Subject
{
get { return String.Empty; }
}

public override String Title
{
get { return String.Empty; }
}

public override IDictionary<String, String> UserDefinedProperties
{
get { return null; }
}

public override DateTime UtcContent
{
get { return DateTime.MaxValue; }
}

public override DateTime UtcLastPrinted
{
get { return DateTime.MaxValue; }
}

public override DateTime UtcLastSaved
{
get { return DateTime.MaxValue; }
}
}

public class FilePropertyInfoOutlook : FilePropertyInfo
{
public FilePropertyInfoOutlook(UploadFileStream uploadFileStream, String fullPath)
: base(uploadFileStream, fullPath)
{
if (String.IsNullOrEmpty(fullPath))
throw new ArgumentNullException(“fullPath”, String.Format(Exceptions.ParameterIsNullOrEmpty, “FullPath”));

if (!File.Exists(fullPath))
throw new FileNotFoundException(String.Format(Exceptions.FileNotFound, fullPath), fullPath);

this.m_license = new Aspose.Network.License();
this.m_license.SetLicense(Configurations.AsposeLicenseFile);
this.m_message = Aspose.Network.Outlook.MapiMessage.FromFile(fullPath);
this.m_fullPath = fullPath;

}

private string m_fullPath;
private Aspose.Network.License m_license;
private Aspose.Network.Outlook.MapiMessage m_message;

public override String Author
{
get { return this.m_message.SenderName; }
}

public override String Category
{
get { return String.Empty; }
}

public override String Comments
{
get { return this.m_message.InternetMessageId; } // DO NOT ALTER THIS, as this is used for check on double values
}

public override String Company
{
get { return String.Empty; }
}

public override String Content
{
get
{
return this.m_message.Body;
}
}

public static string ExtractContent(string filePath)
{
String content = “”;
if (LicenseInfo.GetMainActivationKey().LicenseType != ApplicationType.Desktop)
{
var message = Aspose.Network.Outlook.MapiMessage.FromFile(filePath);
content = message.Body;
}
return content;
}

public override String Keywords
{
get { return String.Empty; }
}

public override String LastSavedBy
{
get { return String.Empty; }
}

public override String Manager
{
get { return String.Empty; }
}

public override String Subject
{
get { return this.m_message.Subject; }
}

public override String Title
{
get { return String.Empty; }
}

public override IDictionary<String, String> UserDefinedProperties
{
get { return null; }
}

public override DateTime UtcContent
{
get
{
Aspose.Network.Outlook.MapiProperty mailProperty = this.m_message.Properties[Aspose.Network.Outlook.MapiPropertyTag.PR_CLIENT_SUBMIT_TIME];

try
{
return mailProperty.GetDateTime();
}
catch
{
return DateTime.MinValue;
}
}
}

public override DateTime UtcLastPrinted
{
get { return DateTime.MaxValue; }
}

public override DateTime UtcLastSaved
{
get { return DateTime.MaxValue; }
}

}
}

Hi Kristof,

Thank you for the details.

Well, you are using older versions of the products. I would like to inform you that Aspose.Pdf for .NET and Aspose.Pdf.Kit for .NET have been merged into a single product and Aspose.Pdf.Kit for .NET has been discontinued as a separate product. All the features of Aspose.Pdf.Kit for .NET are available under Aspose.Pdf.Facades namespace of Aspose.Pdf for .NET v6.x. Please download and try the latest version of Aspose.Pdf for .NET v6.6 and check if you still face any issue. You can check the following documentation links to upgrade your code from Aspose.Pdf.Kit for .NET to the new merged Aspose.Pdf for .NET.

http://www.aspose.com/blogs/aspose-blogs/shahzad-latif/archive/2011/06/11/migrating-from-legacy-code-to-merged-aspose.pdf-for-.net.html

http://www.aspose.com/documentation/.net-components/aspose.pdf-for-.net/migration-from-aspose-pdf-kit.html

If you still face any issue, please create a sample application and post it here. We will check it and get back to you.

Sorry for the inconvenience,

Hello thanks for the information .

But I have still one question left … 6months ago we payed for the new version , do we get any free update because it’s only 6 months ago that we payed a lot .
Thx for overviewing this issue

Hi Kristof,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Well, you can use any version of the product which is released within your license expiry date (the license expiry is for the period of one year after the purchase). Now, if you have purchased the license of Aspose.Pdf for .NET 6 months ago, you can download and use the latest version of Aspose.Pdf for .NET v6.6 with your current license.

Please feel free to contact support in case you need any further assistance,

Thank You & Best Regards,

Hello , Thanks for respose .

Do we have to change our source code when we implement this new version also ?
Could you see or deliver me the link where I could download the latest version.
Hereby the body of our Invoice , this is buyed the 6th Mai .
INVOICE
Invoice Number: 110506084707
Invoice Date: Friday, May 6, 2011
Ship To: Koenraad Meganck Bill To: Koenraad Meganck
MEGA-doc
Schipstraat 2
Sint lievens Esse
Oost-Vlaanderen
9555
Belgium
054515253
MEGA-doc
Schipstraat 2
Sint lievens Esse
Oost-Vlaanderen
9555
Belgium
054515253
Order Details:
# Product SKU Pricing Plan Yr(s) Quantity Unit
Price
Subtotal
Price
1 Aspose.Total APDNTODO Developer OEM Subscription 1 1 $5,997.00 $5,997.00
Sub Total $5,997.00
Discount 40%
Sub Total $3,599.00
Total $3,599.00
Customer PO Number Ship Via Payment Method Currency
kristof@mega-doc.com Credit Card USD
Thank you for considering Aspose!
Proudly generated

Hi Kristof,

Please download the latest version of Aspose.Pdf for .NET from the following location:

http://www.aspose.com/community/files/51/.net-components/aspose.pdf-for-.net/entry355147.aspx

To update your source code (from Aspose.Pdf.Kit to Aspose.Pdf for .NET), please check the below links with details:

http://www.aspose.com/blogs/aspose-blogs/shahzad-latif/archive/2011/06/11/migrating-from-legacy-code-to-merged-aspose.pdf-for-.net.html

Please feel free to contact support in case you need any further assistance,

Thank You & Best Regards,