Provided you really need the medication - no, it shouldn't be hard. In fact the doctor who treated you for the broken leg should have given you a prescription (not necessarily for that specific pain medicatio - but for some kind of pain medication).
Having said that, a doctor won't just give you a prescription just because you ask for it. You have to show that you need it and the doctor has to agree that you need it. Doctors are responsible for preventing prescription medication abuse and addictions - this is especially true when it comes to pain relief medication and certain other medications that are widely abused.
Keep in mind that the doctor won't necessarily give you a prescription for the exact medication you're asking for. You need pain medication in general - you don't need tramadol specifically. Needing / wanting a specific pain medication is generally a sign of an addiction rather than a real need.