New-object itextsharp causes an error

Hi, i am trying to use powershell to read a pdf document with the following code
[System.Reflection.Assembly]::LoadFrom(".\itextsharp.dll")
$reader = New-Object iTextSharp.text.pdf.PdfReader -ArgumentList ".\201408_issue.pdf"
for ($page = 1; $page -le $reader.NumberOfPages; $page++) {
$lines = [char[]]$reader.GetPageContent($page) -join "" -split "`n"
foreach ($line in $lines) {
if ($line -match 'test')
$matches[1]
I get an error though, has anyone encoutnered this? Thanks
New-Object : Exception calling ".ctor" with "1" argument(s): "Object reference not set to an instance
of an object."
At C:\PsScripts\test\PDFReader\PDFReader.ps1:2 char:11
+ $reader = New-Object iTextSharp.text.pdf.PdfReader -ArgumentList ".\201408_RIN_i ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [New-Object], MethodInvocationException
+ FullyQualifiedErrorId : ConstructorInvokedThrowException,Microsoft.PowerShell.Commands.NewObject
Command

PS C:\PsScripts\test\PDFReader> $error[0].Exception | Format-List * -Force
ErrorRecord : Exception calling ".ctor" with "1" argument(s): "Object reference not
set to an instance of an object."
StackTrace : at System.Management.Automation.DotNetAdapter.AuxiliaryConstructorInvo
ke(MethodInformation methodInformation, Object[] arguments, Object[]
originalArguments)
at
System.Management.Automation.DotNetAdapter.ConstructorInvokeDotNet(Type
type, ConstructorInfo[] constructors, Object[] arguments)
at
Microsoft.PowerShell.Commands.NewObjectCommand.CallConstructor(Type
type, ConstructorInfo[] constructors, Object[] args)
WasThrownFromThrowStatement : False
Message : Exception calling ".ctor" with "1" argument(s): "Object reference not
set to an instance of an object."
Data : {}
InnerException : System.NullReferenceException: Object reference not set to an instance
of an object.
at iTextSharp.text.pdf.PdfReader.ReadObjStm(PRStream stream,
IntHashtable map)
at iTextSharp.text.pdf.PdfReader.ReadDocObj()
at iTextSharp.text.pdf.PdfReader.ReadPdf()
TargetSite : System.Object AuxiliaryConstructorInvoke(System.Management.Automation.Met
hodInformation, System.Object[], System.Object[])
HelpLink :
Source : System.Management.Automation
HResult : -2146233087
Any meaning to you?

Similar Messages

  • How can I tell which object is causing my error

    How can I determine which object has the lock, and for brownie points, release it?
    The SP is using a view, are view read only by default in Oracle, so I can rule that out as the 'locker'?
    If not, I'd like to modify with the equivalent of WITH(NO_LOCK). How can I do this in Oracle?
    Error report:
    SQL Error: ORA-04021: timeout occurred while waiting to lock object
    ORA-06512: at "PVNG_RPT.RPT_POP_COMMON_ORDER_PATRON", line 5
    ORA-06512: at "PVNG_RPT.RPT_SP_ORDER_DETAIL", line 402
    04021. 00000 - "timeout occurred while waiting to lock object %s%s%s%s%s"
    *Cause:    While waiting to lock a library object, a timeout is occurred.
    *Action:   Retry the operation later.
    Many thanks
    DC

    That's the insert statement.....
    INSERT INTO
    Ahaaaaaaa,
    I have investigated moere and it looks like one of my American colleagues has been tinkering.
    I see RPT_POP_COMMON_ORDER_PATRON_1 and RPT_POP_COMMON_ORDER_PATRON_2 in the object tree.
    I've dropped _2 - Fine
    I'm trying to drop _1, but that's having a really good think about it......>= 3 mins so far.
    So, I guess that that points to RPT_POP_COMMON_ORDER_PATRON_1 being the culprit iof the lock, hence why it is struggling to be dropped.
    How can I drop a proc that has locks, essentially saying, "I don't care what you're doing - I want you out of my database and take your locks with you!". :)
    Thanks all
    DC

  • Get error when add new object in crystal report

    hi
    i have this error "You are attempting to use functionality that falls under the Crystal Decisions Report Creation API license. This system does not have a valid license, or the evaluation copy of the license has expired. Please contact Crystal Decisions to obtain a Report Creation API license."
    when i add new object in crystal report with vb.net
    ""CRReport.Sections.Item(ii).AddTextObject("new text", 1000, 0)
    i do same program for 3 months ago but i lost it work without error
    ihave a license key for crystal report
    use cr10 with vb.net 2005
    can help me
    thanks

    Also, check out the blog [Use of the Report Designer Component (RDC) in VS .NET|http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3414700)ID0468837450DB00359707053703393347End?blog=/pub/wlg/15939].
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup

  • Get an error when trying to add a new object!

    Post Author: zhaodifan
    CA Forum: Administration
    I was trying to add a new object from central management console and I got the following error:
    Retrieve Error
    There was an error while retrieving data from the server: Failed to read data from report file C:\WINNT\Temp\pres_report.rpt. Reason: Operation not yet implemented. File C:\WINNT\TEMP\tmpreport\~ci226c521bf2923e0.rpt.
    The report I am trying to add was running on a Linux box with the same version BusinessObjects Cyrstal 11 running. I want to move it to a Windows box... The report itself shouldn't have problems because it was running fine on the linux box...
    Also want you let you know that I don't know too much about Crystal Report and our Crystal Report admin quited his job last week! I will be very appreciated if anybody can give me any advice. Thank you!
    Difan

    If this is a Gmail account you might need to unlock by going here: https://accounts.google.com/DisplayUnlockCaptcha.

  • Can creating new object without object reference cause OutOfMemoryException

    I am getting OutOfMemoryException in my application. After looking at the logs and doing some analysis I think creating a new object and not attaching it to a reference is causing the issue.
    The simplified code is as below:
    void valuate(int tradeNum){
    new CaptureTrade().process(tradeNum); //1
    Will the above code called n number of times cause OutOfMemoryException?
    Should I use something like this instead:
    void valuate(int tradeNum){
    CaptureTrade ct = new CaptureTrade();
    ct.process(tradeNum); //2
    Can the first program cause OutOfMemoryException which can be rectified using the second piece of code?

    ashay wrote:
    I am getting OutOfMemoryException in my application. After looking at the logs and doing some analysis I think creating a new object and not attaching it to a reference is causing the issue.
    The simplified code is as below:
    void valuate(int tradeNum){
    new CaptureTrade().process(tradeNum); //1
    Will the above code called n number of times cause OutOfMemoryException?
    Should I use something like this instead:
    void valuate(int tradeNum){
    CaptureTrade ct = new CaptureTrade();
    ct.process(tradeNum); //2
    Can the first program cause OutOfMemoryException which can be rectified using the second piece of code?What happened when you tried it?

  • Create new object (measure) with IIF function on BW Olap universe:mdx error

    hello
    i have a universe based on a BEX query
    i want to create a new object (a measure) with the IIF(,,) function
    i created the following select:
    <EXPRESSION>IIF(@Select(Currency Type\CurrencyTypeCode)="10",@Select(Key Figures\RevenueGlobalCurrency),@Select(Key Figures\RevenueLocalCurrency))</EXPRESSION>
    defined as number
    where
    CurrencyTypeCode is a dimension (character format)
    RevenueGlobalCurrency and RevenueLocalCurrency are measure (number format)
    i always have a parse which is OK but
    when i want to  use the object on a webi report i always have an MDX error : ...invalid MDX with .... (WIS 10901)
    and advise ?
    Thanks

    Hi Didier,
    Thanks a lot for your help.
    Now it works : i do not understand why
    i explain:
    the correct syntaxe of my new measure is :
    <EXPRESSION>([Measures].[4FVLHG7OAJMNY9WC06X6JLOZQ], [0CURTYPE].[10])</EXPRESSION>
    it does not works with my "L01 currency type" BO dimension
    ([0CURTYPE].[LEVEL01])
    when i had :
    -my universe is based on a BW BEX query
    -my universe has been automaticaly generated with the assistant
    -the Currency Type Class was define as below:
           - 1 BO dimension object : L01 Currency Type =>
    [0CURTYPE].[LEVEL01]
           - 3 BO detail objects : L01 Currency Type techName =>
    [0CURTYPE].[LEVEL01].[TECH_NAME]
                                              L01 Currency Type Key =>
    [0CURTYPE].[LEVEL01].[[20CURTYPE]].[Value]
                                             L01 Currency Type Long Name =>
    [0CURTYPE].[LEVEL01].[[40CURTYPE]].[Value]
    i always had a wrong mdx syntax error on the webi report
    i updated the class with the follow
         - 1 BO dimension object : L01 Currency Type =>
    [0CURTYPE].[LEVEL01] (idem)
           - 3 BO detail objects : L01 Currency Type techName =>
    [0CURTYPE].[LEVEL01].[TECH_NAME]  (idem)
                                              L01 Currency Type Key =>
    [0CURTYPE].[LEVEL01].[NAME] (updated)
                                             L01 Currency Type Long Name =>
    [0CURTYPE].[LEVEL01].[DESCRIPTION] (updated)
    then it was working
    Then i tried to reproduce from scratch and now it also works with the previous version of the class.
    I do not understand anything
    Is there something like a cache file of the MDX query (in RSRT, cache mode is set to inactive for the bex query) ?
    ps: this is the same if a use webi under infoview (java) or webi rich client...
    Edited by: Frederic Nez on Jan 19, 2010 6:35 PM
    (edit : there is mistake in the post : objects are always between [] even if it is not dispay => change objects to code mode)

  • Getting ORA-20001: Creation of new object is not allowed: !!

    Hi Am getting ORA-20001: Creation of new object is not allowed while enabling constraints after importing the dumps from source to target datbase,can anyone assist me to fix this issue.

    Hi Osama/Mustafa,Thanks for your quick response,can you please explain me the following things-
    1)As i don't have privilege to run the DBA_XX views,am not able to run those queries-
    SELECT OWNER, TRIGGER_NAME, TRIGGER_BODY FROM DBA_TRIGGERS WHERE TRIGGER_TYPE IN ('AFTER EVENT', 'BEFORE EVETN') AND TRIGGERING_EVENT LIKE '%CREATE%';
    can you tell me what output it'll throw,based on this output how will we fix the issue.
    2)SELECT * FROM dba_sys_privs WHERE privilege = 'UNLIMITED TABLESPACE';
    why we need to check this privilege?as i don't have privilege to run this one in my db.
    3)select * from dba_source where upper(text) like upper('%Creation of new object is not allowed%');
    as i don't have privilege to run this one in my db,already i got the object name from my logfile
    and more you have quoted"This is an error of someone that coded purposely on your database, probably dba or a developer who has privilege and again it is in a database event trigger"
    4)can you explain me much more deeper about the root cause and as already sent note to my DBA,can you explain me the solution to fix this issue ?

  • Crystal report for visual studio 2010 data source object is not valid error

    Hello,
    I receive an "data source object is not valid" error when I want to print one CR document after setting an ADODB.Recordset on SetDataSource method of my report.
    On my developer station, this operation works without problem but on client station, I get this error.
    The redistributable package for client is installed on client side (CRRuntime_32bit_13_0_1.msi).
    Can someone help me?
    Thank you.

    Thank's for your answers
    Dim rsPkLst As ADODB.Recordset = Nothing
    Dim report As New crPickingList
    ' Fill ADODB.Recordset with SQL Statment
    If rsPkLst.RecordCount > 0 Then
          report.SetDataSource(rsPkLst) ' Error : The data source object is invalid
    EndIf
    This error appears during  "report.SetDataSource(rsPkLst)" instruction.
    ADODB drivers are already installed and my ADODB.Recordset is filled with good records.
    This project is an updated project from Visual Studio 2003 to Visual studio 2010 and the old version was running fine.
    Developer and client station runs under Windows XP SP3.
    On developer side I install CRforVS_13_0_1 (BuildVersion=13.0.1.220.Cortez_CR4VS).
    On client side I install CRRuntime_32bit_13_0_1.msi.
    Both stations use Microsoft .Net Framework 4.
    Move to ADO.NET is a solution but, for the moment, I do not have the time to change all applications from my company.
    (I get this error from all application updated from VS 2003 to VS 2010 developed since 2005)
    David.

  • My home page is google and it works but when I open a new tab it displays an error message :Firefox can't find the file at chrome://quick_start/content/index.ht

    I've made sure a dozen times that my home page is set correctly, and when I hit the home button next to the search bar it works and takes me right to google BUT whenever i open a new tab i get the error that my page cannot load and the web url that it keeps trying to remember is in the error message:
    Firefox can't find the file at chrome://quick_start/content/index.html.
    of course the last dot is not the url anymore but the end of the sentence for the error message, but i don't ever use chrome ever on my laptop only my cell so what is going on????? help fix god please!!!!!!

    Do you have the FastStart extension?
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem.
    *Switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance
    *Do NOT click the Reset button on the Safe Mode start window
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • Object variable not set (Error 91) in Input Enabled query

    Hello,
    I'm having the following issue.  I have created an input enabled query and included it in a planning workbook.  Every time I open the workbook or query, and I got to an input enabled cell, I get the error below:
    Object variable not set (Error 91)
    This client has not used planning workbooks before.  The system is on 7.10 SP10 for Bex Analyzer and SAP Gui 7.10 Patch Level 13. 
    I'm not finding any relevant so far in SDN.  Any help anyone can provide is greatly appreciated.
    Thanks,
    Senthil

    Hello,
    Just wanted to let you all know that this issue has been resolved after updating my SAP Gui to 7.2 Patch Level 4 (Patch Level 5 was causing some other issues so I decided to stay at Level 4).
    Thanks,
    Senthil

  • It will not parse! Creating a new object in the universe

    Hi, we have a universe and BO reports. They work fine for our clients. We are on BO XI r3.1. Now, one client captures an additional piece of info. They would like to report against this and add it high up on our drilling heirarchy. "Sure, no problem". For the following I was logged in as administrator.
    The additional data field is a 3 character code.
    1) We added an additional column to the actual database table.
    2) In Universe Designer, I refreshed universe structure and could see the additional column
    3) Created an object 'Acode' that refers to db.new_field
    4) Exported universe
    Maybe worth mentioning that I can see this object and use it in reports fine in Infoview.
    Now, I need to create a new object that will be one of 2 strings based on the 3 character code (Acode) i.e. the 'Atype' can be X or Y.
    Here's my code and it just will not parse:
    CASE
    WHEN @Select(AFolder\Acode) = 'CEL'
    THEN 'X'
    ELSE u2018Yu2019
    END
    Error I get is:
    Parse failed:Eception:DBD ODBC SQL Server driverStatement could not be prepared.State 42000
    I'd appreciate any help, believe me I have searched the forums!
    Thanks, Eddie

    Look at following SAP NOtes.
    1373739
    1184304
    Regards,
    Bashir Awan

  • Setting the name of a new object from a string

    Is there anyway I can set the object name of a newly created
    object from a string?
    eg.
    (the code below generates a compile time error on the
    variable declaration)
    public function addText(newTxt:String, txt:String,
    format:TextFormat):void {
    var
    this[newTxt]:TextField = new TextField();
    this[newTxt].autoSize = TextFieldAutoSize.LEFT;
    this[newTxt].background = true;
    this[newTxt].border = true;
    this[newTxt].defaultTextFormat = format;
    this[newTxt].text = txt;
    addChild(this[newTxt]);
    called using>
    addText("mytxt", "test text", format);
    I could then reference the object later on without using
    array notation using mytxt.border = false; for example
    There are many a time when I want to set the name of a new
    object from a string.
    In this example I have a function that adds a new text object
    to a sprite.
    The problem is, if I call the function more than once then
    two textfield objects will exist, both with the same name. (either
    that or the old one will be overwritten).
    I need a way of setting the name of the textfield object from
    a string.
    using
    var this[newTxt]:TextField = new TextField()
    does not work, If I take the "var" keyword away it thinks it
    a property of the class not an object.
    resulting in >
    ReferenceError: Error #1056: Cannot create property newTxt on
    Box.
    There must be a way somehow to declare a variable that has
    the name that it will take represented in a string.
    Any help would be most welcome
    Thanks

    Using:
    var this[newTxt]:TextField = new TextField()
    is the right approach.
    You can either incrment an instance variable so that the name
    is unique:
    newTxt = "MyName" + _globalCounter;
    var this[newTxt]:TextField = new TextField();
    globalCounter ++;
    Or store the references in an array:
    _globalArray.push(new TextField());
    Tracy

  • Photoshop CS4 for Mac What can cause the error: Plug-in failed to load - NO VERSION

    With Photoshop CS4 for Mac I install the Kodak Plug-in DIGITAL GEM Airbrush Professional v2.1.0. When Photoshop starts I get an error:
    Plug-ins that failed to load:
       DIGITAL GEM Airbrush Professional v2.1.0 NO VERSION -  - from the file “DigitalAIRProv2.plugin”Flash:
       Connections
       Kuler
    This plug-in works fine on my Mac Pro with Photoshop CS4 and OS 10.6 but fails on a new Macbook Air.
    Reinstalling the plug-in did not make any difference. What can cause this error?

    Thanks Chris, That was my first thought too but this same plug-in works on another installation of CS4. This is a Mac installation and the plug-in is Universal so it should work. Is there any other possible cause for this error? Would Photoshop refuse to load a plug-in in a low memory situation?
    Also, The Flash extensions:Connections and Kuler are working OK, I just copied a little more out of the System Info report than I needed to.

  • DESADV01 E1EDP07 segment per line item causes EDIFACT error

    When a Sales Order has the PO Number + Date populated, the subsequent outbound Delivery IDoc (DESADV01) contains a parent E1EDP07 segment for every child line item segment (E1EDP09).  For a SO without PO Date, the IDoc is created with a single E1EDP07 with multiple child E1EDP09 segments.  This is standard SAP - do you need to code around this?
    The first scenario causes an error in EDIFACT mapping, as a limit of 9 RFF segments is allowed (E1EDP07 is a level 1 segment).  Partner systems reject this.

    Hi,
    Segment field should be optional, so check the posting keys in OB41, check the GL account which hit this posting and check the FIeld status in OBC4 and make the segment field as optional.
    while posting the transactions you can check in more then Profit center and segment details will be updated in the postings.
    try out, this might help. check the new ledger document types also.
    Regards,
    Padma

  • Design and registration of new objects

    We have the following three objects:
    - Order, which contains:
    -- OrderStatus
    -- Vector: OrderStatusHistoryItem
    Whenever order.setStatus(newStatus) is called we would like to create a new OrderStatusHistoryItem and add that to the vector of history inside the Order.
    Our first guess was to put this in the setStatus method of the Order object, so that noone would bypass the adding to history. But... When creating the OrderStatusHistoryItem inside the Order we of course get an error from TopLink, saying that the object was not registered in the UOW.
    Is there some way that we can tell TopLink that this relationship should be registered automatically on commit? If not, what would be the best way to design this? Of course we do not want to expose our domain layer to the internals of TopLink. Would a factory be the best way to handle registration upon creation?
    Thanks,
    Anders,

    Anders,
    New objects created and attached to working copies will be discovered during commit cycle and added to the persistent model including the appropriate INSERT. The only issue you will have is that you must make sure that setStatus(newStatus) is ONLY called on working copies read from or registered with a UnitOfWork. If this is true you should be able to create the new OrderStatusHistoryItem within the setStatus method and add it to the collection without registering it in the UnitOfWork.
    Doug

Maybe you are looking for

  • How to use java code in netui

    Hi all, i want to use <input type="checkbox" name="active" value="1" <%=( appraiser.getActive()).equals("1") )?" checked ":""%>> Yes</td> in netui like <netui:checkBox dataSource="{actionForm.active}" /> but until now, i can find how to solve this pr

  • Director 11 line.count problem?

    Hi all. My name is Natassa and this is my first time here! I am not new with Director, but can't figure out the following! There seems to be something wrong when working with text members regarding the line.count property. In our project, i parse thr

  • Poor video quality of finished product

    Hi all, I have produced an mp4 file using imovie 08, in which I changed the MP4 settings in various ways such as setting the frame rate to 59.94 fps (as used by my Sanyo Xacti camcorder) the resolution to 640 x 480 and the data rate to 10,000 kbps. S

  • Exe:   Missing DocumentConnectionPool MBean

    WLP 8.1.4, stream mode portal access. I get a few: java.rmi.RemoteException: EJB Exception:; nested exception is: java.rmi.RemoteException: java.sql.SQLException: Missing DocumentConnectionPool MBean from application configuration; nested exception i

  • Best TV Tuner for iMac

    I'm curious on the fastest, most reliable, and best quality TV Tuner for the iMac available. I would like some feedback on a few you may have purchased or any information you've heard. Thanks for reading this I appreciate your time.