Understanding The PDF DOM

Apr 29, 2011

I am writing an application that has to read and interpret data stored in some PDF files. The reading part is done but I am only able to get a dump of all the words on a page and not the format of the words. What I mean is that if I have to extract a table, I am getting the numbers in the table but not the markup which defines the table.

Further, there is some formatting used which displays a few of these numbers within parentheses (meaning that those numbers are negative) but the parentheses themselves are not part of the text. Hence, I am not able to distinguish between positive and negative numbers present in the PDF table!

How do you get the PDF markup along with the text? Is a PDF similar in structure to an XML with tags used to markup tables etc.? If not, then, is there a resource which describes the salient features of the PDF DOM? I am using VBA and the Acrobat library (AcroExch etc.)

View 4 Replies


ADVERTISEMENT

Understanding And Using Predicates

Dec 7, 2009

I am trying to use my first predicate and I generate the error:Method 'Public Function FindIndex(list As MyProgram.HTMLFiles) As Boolean' does not have the same signature as delegate 'Delegate Function Predicate(Of T)(obj As String) As Boolean'.[code]

View 12 Replies

Understanding RTF And Edit It

Mar 15, 2010

I have this RichTextbox in my vb.net form and I would like to when a user click a button, for example to embold the selected text, how would I do this.Also, I do NOT want to use the standard vb.net expressions such as RichTextBox1.SelectedText.Font.Bold = true. I want to do something like RichTextbox1.SelectedRTF="[bold]" & RichTextBox1.SelectedRTF & "[/bold]" or whatever RTF looks like.Can I just add the RTF options random places or can a RichTextBox return an error if the text is in wrong format. I'm mostly looking for info on how to work with RTF without using the standard vb expressions.

View 1 Replies

Understanding Use Of DWORD

Jun 16, 2010

My goal is to read a data streaming from a machine the streaming is divided in tre main parts,the first is a 10 byte array that declare the length of the second and third part.The second one, the header, is a 22 DWORD (*32bit) ( 88 byte ) structured of mixed data types.I can easly read the value inside this header when the DWORD contains just one information using something like: [code] My problem starts because some of these DWORD contains several indipendent informations, for example DWORD #4 [ channel 2 peaks 31..16] [channel 1 peaks 15..0].For what I understood the first 16 bits ( so 2 bytes) are used to store the information of the first channel , while the second 16 bits are used for the second channel, I tryed converting the first 2 byte with System.BitConverter.ToUInt16()but without success.Can someone explain me what to do and how these numbers are supposed to be stored?

View 6 Replies

Stuck Understanding OO Concepts?

Dec 14, 2010

so i have a class called FOOTBALL,then another 3 classes/forms that inherit FOOTBALL, they control score (SCOREBOX), possession (POSSBOX), and quarter (QUARTERBOX).the FOOTBALL class has 4 variables, "score" (array of 2 ints), "teams" (array of 2 strings), "possession" (boolean), and "quarter" (int)after that i have another form called MAINBOX, which creates new instances of the 3 classes (SCOREBOX, POSSBOX, and QUARTERBOX) (like this: private scoring = new SCOREBOX)... however they all technically create their own FOOTBALL classes, so I cannot connect them.

View 4 Replies

Understanding Event Statement?

May 29, 2009

I started out with VB.NET but now mostly do C#. I never really got to grips with events in VB. I'm trying to translate an old VB.NET program (from 2002) into C#. I've dealt with everything apart from statements such as these:

Public Event UpgradeProgress(ByVal strProgressString As String, _
ByVal strCurrentFile As String, ByVal intProgressPercent As Integer, _
ByVal lngTimeRemaining As Long, ByRef blnCancel As Boolean)

[code]....

View 4 Replies

Understanding In-memory Compiling

Feb 27, 2010

It is my understanding that in .Net 4.0, VB will have an in-memory compiler.

I have to admit I don't know a lot about the compilers so I'm trying to understand the advantage of this as compared to what we had before this. Also, will C# be coming out with the same type of compiler?

View 2 Replies

VS 2008 Understanding HtmlElementCollection?

May 25, 2012

I'm confused on the results of this code. The results extracts the tag "div" but why isn't the results containing the word "Yoga"? Shouldn't the result have only one element because it should exit the for loop after finding the first element? The results show hundreds of elements

Dim ElementCollection2 As HtmlElementCollection = WebBrowser1.Document.GetElementsByTagName("div")
For Each curElement As HtmlElement In ElementCollection2

[code].....

View 4 Replies

Annotating Some Code And Understanding What Arrays Are Doing?

Dec 1, 2011

I wanted to know what the main areas are and what the array is actually doing in the code. I know that dim is declaring the variables, but how do i exactly explain this code line by line.

PS: the areas in red are the main areas im trying to understand annotate.

Public Class Form1
Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label1.Click
End Sub

[code]....

View 4 Replies

Homework - Net Abstract Class Understanding?

Dec 28, 2011

If i have a class called A and a class called B, if B inherits A that means A is the super class and B is the subclass. I have been asked to describe why class A is not an abstract class but as i see it class A is an abstract class A, as it has been created for Class B to use in the future, is it something to do with Class B not being able to access the fields in Class A as although they are private by default?

[Code]...

View 3 Replies

Multithreading - Understanding The Way Application.Run() Works?

Nov 4, 2010

As far as I understand from the docs, it seems that Application.Run() starts a message loop on the current thread, which in turns enables it to process user input (Is that right?).The overloaded version Application.Run(Form) basically does the same, only it exists when the form closes, and it shows the form by default.timer ticks after 20mns, and has to execute say approx. 15 tasks one by one, every time creating an instance of a progress dialog, initially hidden in the taskbar.

View 1 Replies

Understanding AndAlso - Get A Runtime Error?

Oct 5, 2011

Looking at the following code snippet in VS2008 (this is from the SBS book)

Dim HumanAge As Integer = 0
If HumanAge <> 0 And 7 / HumanAge <= 1 Then
MsgBox("1 dog year or older")[code]....

I expect to get a runtime error, because And evaluates both conditions, which is why in this case AndAlso should be the better operator to use. When I try this code there is no difference in behavior between 'And' & 'AndAlso'. In neither case I get a
runtime error, not even when I flip the conditions around. Is this by design, a lucky accident, or do I just not get it?

View 5 Replies

Understanding ItemsSource And DataContext In A DataGrid?

Jun 14, 2010

UPDATE: See the bottom of this question for what I did to solve the problem.I'm trying to understand how the ItemsSource and DataContext properties work in a Silverlight Toolkit DataGrid. I'm currently working with dummy data and trying to get the data in the DataGrid to update when the value of a combo box changes.

View 2 Replies

Understanding Object Aggregation And Databases

Aug 24, 2010

I have a situation in a program I'm writing where I'm not sure of the best way of coding a couple of objects and was hoping for a few pointers.I am using VB.NET 2003, so F/wrk v1.1. My business is horticultural in nature and I'm trying to help streamline the business with a new order fulfillment app.In my program, I have products. Some products don't have any component parts, but others are made up of a selection of plants.For example: we sell a trowel, which obviously doesn't have any component parts. But we also sell a large vegetable garden, which is made up of, say, 20 rocket plants, 30 salad plants, 5 spring onions, etc.[code]I believe the ProductContents table is technically referred to as a 'join table'?

I have written the classes in VB.NET which load, save, edit the Products and the Plants. I also have Manager classes which store collections of these objects (ProductMgr, PlantMgr).I have dealt with situations before with join tables where there are only two columns which are both FKs and both make up a composite PK (ie - to express a one-to-many relationship). This is pretty straightforward (using my product/plant tables as an example) because when I load an individual Product from the database, I also run a second SELECT query which returns any PlantIDs associated with that PlantID from ProductContents. I store that in an array of integers within the Product object. I can then load Plants from the PlantMgr object based on the PlantIDs stored in this array. I kind-of do the reverse when I save the Product to the database, I run a second INSERT query which updates the ProductContents table with the Plants associated with the Product.Where I'm getting stuck is with the inclusion of the extra 'Quantity' column. I can no longer store the PlantIDs in an array of Integers because I also need to store the Quantity associated with that Plant. I also can't use the PlantMgr object any more (to express which Plants are in each Product) because it also doesn't include any information about Quantity.I was just wondering if there is a standard way of handling this kind of situation, where I have a 'join table' which also includes extra columns as well as the two columns that identify the join.

View 1 Replies

Understanding Why FTP Upload Doesn't Work?

Apr 3, 2012

I'm trying to figure out why the following VB.Net code seems unable to upload a file to my ISP's FTP server, since it doesn't report any error but I'm not getting the notification e-mail I'm supposed to receive once a file has been uploaded.So I launched the free Fiddler proxy on 127.0.0.1:7777, but it doesn't report any activity, even with its "Capture FTP Requests" option checked:[code]Is there a way to watch the FTP session to understand why the file seems to be uploaded successfully but I'm getting no success notification?

View 4 Replies

Understanding Xml - Saving, Loading, Manipulating?

Aug 15, 2009

a member mentioned, xml is similar to a txt file. txt files, i can manipulate quite well. so, if this is the case, it should not be to complicated to do as the thread title describes . that, of course is, if you already know how to even create an xml file. i do not. any and all input/suggestions welcomed, links for xml noobing welcomed as well.

i like: VB General google fast cars username password

View 11 Replies

VS 2010 : Understanding A Tick Method?

Nov 27, 2011

I am working on a project, but the latest enhancement to it has me stumped currently. Here is what the class enhancement asks for:

Modify class time to provide a Tick method that increments the time by one second. Also provide methods IncrementMinute to increment the minute and methods IncrementHour to increment the Hour. The Trick method, the IncrementMinute method and the IncrementHour method should be called when you click the Add 1 to Second button, the Add 1 to Minute button and the Add 1 to Hour button, respectively. Be sure to test the following cases:

A) Incrementing into the next minute.

B) Incrementing into the next hour.

C) Incrementing into the next day (that is, 11:59:59 PM to 12:00:00 AM).

Here is my GUI:

The reason I am confused is currently my program already increments the seconds, minutes, and hours correctly (as shown in pic) for Cases A, B, C. But, I haven't added a Tick method which is what the enhancement to the class Time calls for. Here are the 2 classes I have so far:Time Class that the Tick method is supposed to be added to

Public Class Time
' declare Integer instance variables for the hour, minute and second
Private hourValue As Integer ' 0 - 23
Private minuteValue As Integer ' 0 - 59

[code]....

View 2 Replies

.net - Understanding AddHandler And Pass Delegates And Events

Mar 17, 2010

I am using AddHandler to wire a function to a control's event that I dynamically create:

[Code]...

This code is generating a run-time exception stating: Unable to cast object of type 'MyEventHandlerDelegate' to type 'System.EventHandler' What am I not understanding about System.Delegate even though AddHandler takes as an argument of type "System.Delegate"? What Type does "EventHandler need to be to cast to a type that AddHandler can accept?

View 3 Replies

C# - Understanding Floating Point Limitations In Calculations

Jan 12, 2011

How to determine when floating point limitations will cause errors in your calculations. For example the following code.
CalculateTotalTax = function (TaxRate, TaxFreePrice) {
return ((parseFloat(TaxFreePrice) / 100) * parseFloat(TaxRate)).toFixed(4);
};

I have been unable to input any two values that have caused for me an incorrect result for this method. If I remove the toFixed(4) I can infact see where the calculations start to lose accuracy (somewhere around the 6th decimal place). Having said that though, my understanding of floats is that even small numbers can sometimes fail to be represented or have I misunderstood and can 4 decimal places (for example) always be represented accurately.

MSDN explains floats as such... This means they cannot hold an exact representation of any quantity that is not a binary fraction (of the form k / (2 ^ n) where k and n are integers). Now I assume this applies to all floats (inlcuding those used in javascript). How can one determine if any specific method will be vulnerable to errors in floating point operations, at what precision will those errors materialize and what inputs will be required to produce those errors?

View 5 Replies

C# - Understanding Ownerdrawn Listbox + OwnerDrawVariable Property

Jul 23, 2010

I have this code for an ownerdrawn list box that is repainting too frequently. It seems to be related to trying to scroll an event with a different height than normal. Here is the 'smallest code to reproduce the problem' that can be pasted into a blank form (erase the designer file) - VB version (c# of course does the same thing):

[Code]...

View 3 Replies

Understanding Eprom Emulator Command String

Sep 19, 2011

I'm working with an eprom emulator in trying to understand the command string write instructions. Here is what I have. [code] From what I know, the values in hex need to be converted to decimal first. What I'm not sure about is the checksum value needed. The instructions say Checksum =(1 byte truncated addition of all the above).

View 4 Replies

Shared - Understanding Access Modifiers In .Net With List ( Of Object)?

Mar 29, 2011

I've recently been updating a lot of my code to comply with proper n-tier architecture and OO programming, following examples from a book.I'm starting to get problems now because I don't fully understand the access modifiers.If I run the following code I get an error at the line

Dim clientFamilyDataAccessLayer As New ClientFamilyDAO

in the BLL at the point it creates an instance of the DAL. The full error message is: "The type initializer for 'ClientFamilyDAO' threw an exception. ---> System.NullReferenceException: Object reference not set to an instance of an object."

How do I use these function to create a list of ClientFamily objects that I can then work with?On my UI layer I'm creating a list of objects; ClientFamilies

Dim listOfClientFamilies As List(Of ClientFamily) = ClientFamily.GetClientFamiliesByKRM(selectedEmployee.StaffNumber)

This is the function in the BLL

Public Shared Function GetClientFamiliesByKRM(ByVal krmStaffNumber As Integer) As List(Of ClientFamily)
Dim clientFamilyDataAccessLayer As New ClientFamilyDAO
Return clientFamilyDataAccessLayer.GetClientFamiliesByKRM(krmStaffNumber)
End Function

and this is function in the DAL

Public Function GetClientFamiliesByKRM(ByVal staffNumber As Integer) As List(Of ClientFamily)
Dim currentConnection As SqlConnection = New SqlConnection(_connectionString)
Dim currentCommand As New SqlCommand

[code]....

View 1 Replies

Understanding Length Of An Array - Follow The Execution In The Immediate Window?

Sep 21, 2011

I have the following statement: ReDim lsDataMergeStart(lsDataMergeRange.Length)When I follow the execution in the immediate window, I get the following results: lsDataMergeRangeLength =1 lsDataMergeStart = 2 Why?





View 12 Replies

Understanding When To Use Classes - Return The Information Back To Form1?

Aug 16, 2010

I have such a bad habbit of cramming all my code into one form. But i dont know when i should write a class. or dont really understand how to return the information back to form1. when should i even use a class? for example i have some code here

[Code]...

View 10 Replies

Office Automation :: Understanding "imports" For Vsto / Excel

Jul 19, 2011

explain the use of "imports" at the top of each module. i am stumbling through development of an excel app in vsto and learning as i go.

in my project references i have added references and imported namespaces of everything that looks relevant to excel and office. am i then to add "imports" to the top of each module where relevant.

[code...]

before i added the imports microsoft.office.interop.excel i had no access to xldirection method. what other import namespaces(????) are needed and in what modules?

i have a couple of books that i am referring to, but none seem to start at the beginning and explain what this imports does / is for.

View 2 Replies

Understanding Others Project - Contains Many Directories - Many Asp Pages, Aspx Pages, Jsp Pages, Xml Pages, Css Pages

Jan 17, 2010

My boss has given me an asp.net web application that was done by his former employee. Now my boss has no contact with that employee. He wants me to make some changes in that web application. I went through the application. There is no documentation present for that application . Its a huge application. It contains many directories. I think it was a team work. It has many asp pages, aspx pages, jsp pages, xml pages, css pages, etc... How to understand other person or team's website or web application that was written in asp or asp.net and vb or vb.net?

View 4 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved