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

  • SEARCH
  • Home
  • 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 9044667
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T11:02:39+00:00 2026-06-16T11:02:39+00:00

I am creating Shipping Label using iTextSharp. What I am doing is Creating a

  • 0

I am creating Shipping Label using iTextSharp.

What I am doing is Creating a Label in PDF so I can format it in any way I want and then send it to my THERMAL PRINTER.

My problem is, My labels are of size 4×6 (standard shipping label). These are the labels which we see on UPS & Fedex Packages. How Can i make my PDF exactly fit within 4×6 inches? currently It is printing in regular A4 document.

I am using following:

Dim document As New Document()
document.SetPageSize(PageSize.A4_LANDSCAPE)
  • 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-06-16T11:02:40+00:00Added an answer on June 16, 2026 at 11:02 am

    Set a Custom Page Size:

    Dim pgSize As New iTextSharp.text.Rectangle(myWidth, myHeight) 
    Dim doc As New iTextSharp.text.Document(pgSize, leftMargin, rightMargin, topMargin, bottomMargin)
    

    iTextSharp uses 72 pixels per inch, so if you know the height and width of your desired page size in inches, just multiply those numbers by 72 to get myWidth and myHeight.

    https://stackoverflow.com/a/2503476/102937

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i'm creating a shopping website using c# and asp.net and i want to use
For example, say I'm creating a table which stores promo codes for a shipping
i'm creating a shopping website that will sell computer parts using MVP and asp.net.
I have created a custom shipping module following the below two tutorials http://techportal.inviqa.com/2011/06/09/creating-a-custom-magento-shipping-method/ http://www.magentocommerce.com/wiki/5_-_modules_and_development/shipping/create-shipping-method-module
I am creating a custom shopping cart, and need to send data from the
I am creating a demo shopping cart in android for this i am using
I have a simple form for shipping options and I am using javascript to
Hello I am creating an application where I can store data in a Hashmap
I have been given access to the new shipping api, when creating an app
I’m creating a shopping website by using asp.net and c#. So I need my

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.