Use PowerShell to extract string from PDF form and output to file

How do you make your own symbol when Detexify fails?

Does Doodling or Improvising on the Piano Have Any Benefits?

What is going on with 'gets(stdin)' on the site coderbyte?

Why is it that I can sometimes guess the next note?

Why is this estimator biased?

Need help understanding what a natural log transformation is actually doing and why specific transformations are required for linear regression

I'm the sea and the sun

Is aluminum electrical wire used on aircraft?

Does an advisor owe his/her student anything? Will an advisor keep a PhD student only out of pity?

Can I visit Japan without a visa?

Calculating total slots

Quoting Keynes in a lecture

Pre-mixing cryogenic fuels and using only one fuel tank

Is there an injective, monotonically increasing, strictly concave function from the reals, to the reals?

Temporarily disable WLAN internet access for children, but allow it for adults

Fear of getting stuck on one programming language / technology that is not used in my country

How does the math work for Perception checks?

What should you do if you miss a job interview (deliberately)?

Did arcade monitors have same pixel aspect ratio as TV sets?

Terse Method to Swap Lowest for Highest?

Strong empirical falsification of quantum mechanics based on vacuum energy density

Can I still be respawned if I die by falling off the map?

How to fade a semiplane defined by line?

What does "Scientists rise up against statistical significance" mean? (Comment in Nature)



Use PowerShell to extract string from PDF form and output to file














0















I have this code whereby the objective is to find all PDF files within a folder that have been modified within x days (as input by the user).



[void][Reflection.Assembly]::LoadWithPartialName('Microsoft.VisualBasic')
$title = 'PDF Last Modified'
$msg = 'Days prior:'
$text = [Microsoft.VisualBasic.Interaction]::InputBox($msg, $title)
$headers = @{Expression={$_.CreationTime};Label="File Created";width=25}, `
@{Expression={$_.LastWriteTime};Label="File Edited";width=25}, `
@{Expression={"{0}" -f $_.FullName.Split("")[-2]};Label="Folder";width=30}, `
@{Expression={$_.Name};Label="File Name";width=50}
Get-ChildItem -Path .. -Recurse -Filter *.pdf | Where-Object {$_.lastwritetime -gt (Get-Date).AddDays(-$text)} | sort LastWriteTime -descending | format-table $headers | out-file PDFOutput-$(get-date -f yyyy-MM-dd).txt -width 300


There are two improvements that I'd like to make.




  1. Each of those PDF files is actually a form, and at the bottom of that form is a string of numbers which identify where that form needs to go. I know that I need to use itextsharp.dll to parse the PDF file; I'd like to include in the output file after "File Name" a header "Destination" and include that string from the PDF form.


  2. On the initial VB-Input window, it asks how many day prior that the script should search. I'd like to add a second input that asks for any search parameters for the title, so if the user inputs, say, "receipt", the script finds any file titled receipt.pdf (wildcards either side of it, so it would find laptop-receipt-2015-11-17.pdf).



Any help much appreciated!









share







New contributor




Deano411 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

























    0















    I have this code whereby the objective is to find all PDF files within a folder that have been modified within x days (as input by the user).



    [void][Reflection.Assembly]::LoadWithPartialName('Microsoft.VisualBasic')
    $title = 'PDF Last Modified'
    $msg = 'Days prior:'
    $text = [Microsoft.VisualBasic.Interaction]::InputBox($msg, $title)
    $headers = @{Expression={$_.CreationTime};Label="File Created";width=25}, `
    @{Expression={$_.LastWriteTime};Label="File Edited";width=25}, `
    @{Expression={"{0}" -f $_.FullName.Split("")[-2]};Label="Folder";width=30}, `
    @{Expression={$_.Name};Label="File Name";width=50}
    Get-ChildItem -Path .. -Recurse -Filter *.pdf | Where-Object {$_.lastwritetime -gt (Get-Date).AddDays(-$text)} | sort LastWriteTime -descending | format-table $headers | out-file PDFOutput-$(get-date -f yyyy-MM-dd).txt -width 300


    There are two improvements that I'd like to make.




    1. Each of those PDF files is actually a form, and at the bottom of that form is a string of numbers which identify where that form needs to go. I know that I need to use itextsharp.dll to parse the PDF file; I'd like to include in the output file after "File Name" a header "Destination" and include that string from the PDF form.


    2. On the initial VB-Input window, it asks how many day prior that the script should search. I'd like to add a second input that asks for any search parameters for the title, so if the user inputs, say, "receipt", the script finds any file titled receipt.pdf (wildcards either side of it, so it would find laptop-receipt-2015-11-17.pdf).



    Any help much appreciated!









    share







    New contributor




    Deano411 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.























      0












      0








      0








      I have this code whereby the objective is to find all PDF files within a folder that have been modified within x days (as input by the user).



      [void][Reflection.Assembly]::LoadWithPartialName('Microsoft.VisualBasic')
      $title = 'PDF Last Modified'
      $msg = 'Days prior:'
      $text = [Microsoft.VisualBasic.Interaction]::InputBox($msg, $title)
      $headers = @{Expression={$_.CreationTime};Label="File Created";width=25}, `
      @{Expression={$_.LastWriteTime};Label="File Edited";width=25}, `
      @{Expression={"{0}" -f $_.FullName.Split("")[-2]};Label="Folder";width=30}, `
      @{Expression={$_.Name};Label="File Name";width=50}
      Get-ChildItem -Path .. -Recurse -Filter *.pdf | Where-Object {$_.lastwritetime -gt (Get-Date).AddDays(-$text)} | sort LastWriteTime -descending | format-table $headers | out-file PDFOutput-$(get-date -f yyyy-MM-dd).txt -width 300


      There are two improvements that I'd like to make.




      1. Each of those PDF files is actually a form, and at the bottom of that form is a string of numbers which identify where that form needs to go. I know that I need to use itextsharp.dll to parse the PDF file; I'd like to include in the output file after "File Name" a header "Destination" and include that string from the PDF form.


      2. On the initial VB-Input window, it asks how many day prior that the script should search. I'd like to add a second input that asks for any search parameters for the title, so if the user inputs, say, "receipt", the script finds any file titled receipt.pdf (wildcards either side of it, so it would find laptop-receipt-2015-11-17.pdf).



      Any help much appreciated!









      share







      New contributor




      Deano411 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.












      I have this code whereby the objective is to find all PDF files within a folder that have been modified within x days (as input by the user).



      [void][Reflection.Assembly]::LoadWithPartialName('Microsoft.VisualBasic')
      $title = 'PDF Last Modified'
      $msg = 'Days prior:'
      $text = [Microsoft.VisualBasic.Interaction]::InputBox($msg, $title)
      $headers = @{Expression={$_.CreationTime};Label="File Created";width=25}, `
      @{Expression={$_.LastWriteTime};Label="File Edited";width=25}, `
      @{Expression={"{0}" -f $_.FullName.Split("")[-2]};Label="Folder";width=30}, `
      @{Expression={$_.Name};Label="File Name";width=50}
      Get-ChildItem -Path .. -Recurse -Filter *.pdf | Where-Object {$_.lastwritetime -gt (Get-Date).AddDays(-$text)} | sort LastWriteTime -descending | format-table $headers | out-file PDFOutput-$(get-date -f yyyy-MM-dd).txt -width 300


      There are two improvements that I'd like to make.




      1. Each of those PDF files is actually a form, and at the bottom of that form is a string of numbers which identify where that form needs to go. I know that I need to use itextsharp.dll to parse the PDF file; I'd like to include in the output file after "File Name" a header "Destination" and include that string from the PDF form.


      2. On the initial VB-Input window, it asks how many day prior that the script should search. I'd like to add a second input that asks for any search parameters for the title, so if the user inputs, say, "receipt", the script finds any file titled receipt.pdf (wildcards either side of it, so it would find laptop-receipt-2015-11-17.pdf).



      Any help much appreciated!







      powershell pdf





      share







      New contributor




      Deano411 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.










      share







      New contributor




      Deano411 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.








      share



      share






      New contributor




      Deano411 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 51 secs ago









      Deano411Deano411

      1




      1




      New contributor




      Deano411 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      Deano411 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      Deano411 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















          0






          active

          oldest

          votes











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "3"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });






          Deano411 is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1416552%2fuse-powershell-to-extract-string-from-pdf-form-and-output-to-file%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          Deano411 is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          Deano411 is a new contributor. Be nice, and check out our Code of Conduct.













          Deano411 is a new contributor. Be nice, and check out our Code of Conduct.












          Deano411 is a new contributor. Be nice, and check out our Code of Conduct.
















          Thanks for contributing an answer to Super User!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1416552%2fuse-powershell-to-extract-string-from-pdf-form-and-output-to-file%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Couldn't open a raw socket. Error: Permission denied (13) (nmap)Is it possible to run networking commands...

          VNC viewer RFB protocol error: bad desktop size 0x0I Cannot Type the Key 'd' (lowercase) in VNC Viewer...

          Why not use the yoke to control yaw, as well as pitch and roll? Announcing the arrival of...