Hi,
Hi Eli,
First of all, please make sure that you’re using the latest version at your end. You may download it from this link.
Secondly, if the latest version doesn’t resolve this issue either then please share the input PDF file along with the code snippet you’re using at your end, so we could test this issue over here. You’ll be updated with the status the earliest possible.
We’re sorry for the inconvenience.
Regards,
- I have the latest version, I’ve just downloaded the evaluation yesterday from your site-- 51002. Attached the input PDF3. CodePdfContentEditor pdfContent = new PdfContentEditor();pdfContent.BindPdf(fileName);pdfContent.ReplaceTextStrategy.ReplaceScope = ReplaceTextStrategy.Scope.REPLACE_ALL;pdfContent.ReplaceTextStrategy.IsRegularExpressionUsed = false;pdfContent.ReplaceTextStrategy.NoCharacterBehavior = ReplaceTextStrategy.NoCharacterAction.UseStandardFont;// This is the line that throws the exception - it works fine with English text, but failed on hebrew letters:pdfContent.ReplaceText(“here”, “שלום”);
Note that when changing the line:
Hi Eli,
I have reproduced this issue at my end and logged it as PDFKITNET-22662 in our issue tracking system. Our team will investigate it in detail and you’ll be updated via this forum thread once it is resolved.
We’re sorry for the inconvenience.
Regards,
Thank you.
Hi Eli,
As you know, this issue is logged recently, our team still needs to investigate it in detail. However, I have asked our development team to share the ETA of this issue. You’ll be updated with the response the earliest possible.
We’re sorry for the inconvenience.
Regards,
Thank you. I would like to know as soon as possible, because another solution might be to use aspose.word to modify the file and than export to PDF, so I need to know which direction to take, PDF of course, is the preferred method.
Hi Eli,
I would like to share with you that this issue will be resolved in our upcoming monthly release, which will be published early next month. You’ll be notified via this forum thread once it is published.
If you find any further questions, please do let us know.
Regards,
Hi, any news on this issue?
Hi Eli,
This issue is resolved in our upcoming release which will be published tomorrow. You’ll be notified via this forum thread once it is published.
If you have any further questions, please do let us know.
Regards,
The issues you have found earlier (filed as 22662) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by aspose.notifier.
No, this doesn’t solve the bug.
Hi Eli,
I have again tested this issue, with the file you shared earlier – 1test.pdf, but couldn’t reproduce it at my end; it works fine with Aspose.Pdf.Kit for .NET 5.2.0.
Are you having the problem with some other file or the same file with different contents? If so, please share the file you’re having problem with; we need to test that particular scenario at our end. Also, please share the file which is throwing ‘object reference not set to an instance of an object’ exception.
We’re sorry for the inconvenience and looking forward to help you out.
Regards,
Hi.
I’ve just spend half-a-day trying to understand why the exception occurs on some cases, but not always, and I think I’ve managed to narrow the problem, here are my conclusion:
- object ref’ exception - this occurs when you try to replace a word and a number together (‘word 123’) and the word is in Hebrew.
- IOException - this occurs only when trying to replace a word with a certain Hebrew letters (4 out of the 27 letters).
I hope the work I did will help you solve this issue ASAP, this is very urgent for me.
Thanks.
Attached a PDF example (although you can get the error on any PDF file).
Also, here is the code showing the first issue:
PdfContentEditor pdfContent = new PdfContentEditor();
pdfContent.BindPdf(fileName);
pdfContent.ReplaceTextStrategy.ReplaceScope = ReplaceTextStrategy.Scope.REPLACE_ALL;
pdfContent.ReplaceTextStrategy.IsRegularExpressionUsed = false;
// This line throws exception: ‘Object reference not set to an instance of an object’.
// looks like related to a word with space and a number (word space word works):
// pdfContent.ReplaceText(“Field3a”, “123 מילה”);
Here is the code showing the second issue:
// These are all the hebrew letters:
// Works:
//pdfContent.ReplaceText(“Field3a”, “א”);
//pdfContent.ReplaceText(“Field3a”, “ב”);
// ERROR ‘Not found appropriate font for the text’
// pdfContent.ReplaceText(“Field3a”, “ג”);
// Works:
//pdfContent.ReplaceText(“Field3a”, “ד”);
//pdfContent.ReplaceText(“Field3a”, “ה”);
//pdfContent.ReplaceText(“Field3a”, “ו”);
//pdfContent.ReplaceText(“Field3a”, “ז”);
//pdfContent.ReplaceText(“Field3a”, “ח”);
// ERROR
// pdfContent.ReplaceText(“Field3a”, “ט”);
// Works:
//pdfContent.ReplaceText(“Field3a”, “י”);
//pdfContent.ReplaceText(“Field3a”, “כ”);
//pdfContent.ReplaceText(“Field3a”, “ל”);
//pdfContent.ReplaceText(“Field3a”, “מ”);
//pdfContent.ReplaceText(“Field3a”, “נ”);
//pdfContent.ReplaceText(“Field3a”, “ס”);
//pdfContent.ReplaceText(“Field3a”, “ע”);
//pdfContent.ReplaceText(“Field3a”, “פ”);
//pdfContent.ReplaceText(“Field3a”, “צ”);
//pdfContent.ReplaceText(“Field3a”, “ק”);
//pdfContent.ReplaceText(“Field3a”, “ר”);
//pdfContent.ReplaceText(“Field3a”, “ש”);
//pdfContent.ReplaceText(“Field3a”, “ת”);
//pdfContent.ReplaceText(“Field3a”, “ך”);
//pdfContent.ReplaceText(“Field3a”, “ם”);
//pdfContent.ReplaceText(“Field3a”, “ן”);
// ERROR
// pdfContent.ReplaceText(“Field3a”, “ץ”);
// ERROR
// pdfContent.ReplaceText(“Field3a”, “ף”);
Hi Eli,
I have reproduced both of these issues and logged them as shown below:
PDFKITNET-23531 - Object reference not set exception
PDFKITNET-23532 - IOException
Our team will investigate these issues in detail and you’ll be notified via this forum thread once they’re resolved.
We’re sorry for the inconvenience.
Regards,
Any news on this issue? I’ve provided a very detailed information to reproduce it (and hopefully to solve it), as I need this functionality very urgent.
Hi Eli,
I’m sorry to inform you that this issue is not yet resolved. However, I have asked our development team to share the ETA. You’ll be updated as soon as we get a clear idea of the ETA.
We’re sorry for the inconvenience.
Regards,
Hi Eli,
Our team has looked into this issue in detail and I would like to inform you that the fix for these two issues will be available in our monthly release due at the end of March or early April 2011. You’ll be notified via this forum thread as soon as it is published.
We’re sorry for the inconvenience.
Regards,