Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 342403
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T10:48:02+00:00 2026-05-12T10:48:02+00:00

i am writing some code in vb.net that will be generating a pdf file.

  • 0

i am writing some code in vb.net that will be generating a pdf file. i am going to be placing text and images in the pdf file. instead of doing trial and error on positioning the text and images using the pixel coordinates, i would like to be able to know exactly the coordinates of something on a pdf file. so for example i would like to move my mouse over a pdf file and it will automatically display the pixel coordinates of where the mouse is.

question is, is there a tool in vb.net or something else that will show me example the coordinates of where my mouse is?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T10:48:02+00:00Added an answer on May 12, 2026 at 10:48 am

    I suspect that by the time you implement a tool to do this, you could have completed it through the trail and error method.

    When I had to do this same thing (using iTextSharp like you are) I started by attempting to write text to an arbitrary position on the form, say x = 100 and y = 100. When I saw where it ended up on the PDF, I adjusted. After doing this a bit you get a sense of what coordinates the next point should be at.

    TIP #1:
    Remember that 0, 0 references the bottom left of your document. As these numbers increase your position goes up and to the right in the document.

    TIP #2:
    Think about how the content on your PDF lines up on the vertical and horizontal axes. Find these values and declare them as constants in your program and reference these constants on your code. This cuts down on the number of points you need to find and makes you program more readable.

    For example, on the document I’m building is a form with text with a number of lines that runs horizontally (think common y-axis values) and boxes that line up vertically (think common x-axis values).

    So I determined y-axis locations for the lines and declared them like this (in C#):

    const float Line1Y = 200f;
    const float Line2Y = 150f;
    //etc.
    

    I also determined the x-axis locations for the boxes and declared their x-axis values like this:

    const float Column1X = 100f;
    const float Column2X = 200f;
    //etc.
    

    In my code when it came time to position my elements, I referred to the constants like this:

    content.SetTextMatrix(Column1X, Line1Y);
    content.SetTextMatrix(Column2X, Line1Y);
    content.SetTextMatrix(Column1X, Line2Y);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 175k
  • Answers 175k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer here is a little trick that i just figured out… May 12, 2026 at 3:07 pm
  • Editorial Team
    Editorial Team added an answer What object contains a field called 'username'? You are likely… May 12, 2026 at 3:07 pm
  • Editorial Team
    Editorial Team added an answer Integer types are the most confusing in C/C++ compilers. In… May 12, 2026 at 3:07 pm

Related Questions

I am using VB.NET and I am trying to come up with some algorithm
FYI - I am a mainframer that moved to the .NET world a couple
I am writing some code in VB.NET that uses a switch statement but in
I am writing a library in VB.NET in which I have added, among others,

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.