Absolute text position in PDFBox [duplicate]





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







3
















This question already has an answer here:




  • Apache PDFBox: How can I specify the position of the texts I'm outputting

    1 answer




I'm trying to create a pdf document in java using the PDFBox libraries and for now, I am positioning the text using newLineAtOffset(x, y); but I would prefer to position using an absolute position, rather than the relative.



Is there any way to use an absolute position or a have to stay with the relative one?



Thank you in advance for any help you can give me










share|improve this question













marked as duplicate by mkl java
Users with the  java badge can single-handedly close java questions as duplicates and reopen them as needed.

StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Jan 3 at 21:10


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.



















  • Not sure if it's what you're looking for but here is something related about positioning text

    – Frakcool
    Jan 3 at 13:56


















3
















This question already has an answer here:




  • Apache PDFBox: How can I specify the position of the texts I'm outputting

    1 answer




I'm trying to create a pdf document in java using the PDFBox libraries and for now, I am positioning the text using newLineAtOffset(x, y); but I would prefer to position using an absolute position, rather than the relative.



Is there any way to use an absolute position or a have to stay with the relative one?



Thank you in advance for any help you can give me










share|improve this question













marked as duplicate by mkl java
Users with the  java badge can single-handedly close java questions as duplicates and reopen them as needed.

StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Jan 3 at 21:10


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.



















  • Not sure if it's what you're looking for but here is something related about positioning text

    – Frakcool
    Jan 3 at 13:56














3












3








3









This question already has an answer here:




  • Apache PDFBox: How can I specify the position of the texts I'm outputting

    1 answer




I'm trying to create a pdf document in java using the PDFBox libraries and for now, I am positioning the text using newLineAtOffset(x, y); but I would prefer to position using an absolute position, rather than the relative.



Is there any way to use an absolute position or a have to stay with the relative one?



Thank you in advance for any help you can give me










share|improve this question















This question already has an answer here:




  • Apache PDFBox: How can I specify the position of the texts I'm outputting

    1 answer




I'm trying to create a pdf document in java using the PDFBox libraries and for now, I am positioning the text using newLineAtOffset(x, y); but I would prefer to position using an absolute position, rather than the relative.



Is there any way to use an absolute position or a have to stay with the relative one?



Thank you in advance for any help you can give me





This question already has an answer here:




  • Apache PDFBox: How can I specify the position of the texts I'm outputting

    1 answer








java pdf pdfbox






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jan 3 at 13:53









Eduardo LondoñoEduardo Londoño

257




257




marked as duplicate by mkl java
Users with the  java badge can single-handedly close java questions as duplicates and reopen them as needed.

StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Jan 3 at 21:10


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.









marked as duplicate by mkl java
Users with the  java badge can single-handedly close java questions as duplicates and reopen them as needed.

StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Jan 3 at 21:10


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.















  • Not sure if it's what you're looking for but here is something related about positioning text

    – Frakcool
    Jan 3 at 13:56



















  • Not sure if it's what you're looking for but here is something related about positioning text

    – Frakcool
    Jan 3 at 13:56

















Not sure if it's what you're looking for but here is something related about positioning text

– Frakcool
Jan 3 at 13:56





Not sure if it's what you're looking for but here is something related about positioning text

– Frakcool
Jan 3 at 13:56












1 Answer
1






active

oldest

votes


















1














You are starting at (0,0) after calling contents.beginText();. Thus if you want to work with absolute positions only, then put only one (absolute) positioning in a contents.beginText();contents.endText(); segment.






share|improve this answer
























  • Can't believe I didn't think of that. Thank you very much!

    – Eduardo Londoño
    Jan 3 at 15:48


















1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














You are starting at (0,0) after calling contents.beginText();. Thus if you want to work with absolute positions only, then put only one (absolute) positioning in a contents.beginText();contents.endText(); segment.






share|improve this answer
























  • Can't believe I didn't think of that. Thank you very much!

    – Eduardo Londoño
    Jan 3 at 15:48
















1














You are starting at (0,0) after calling contents.beginText();. Thus if you want to work with absolute positions only, then put only one (absolute) positioning in a contents.beginText();contents.endText(); segment.






share|improve this answer
























  • Can't believe I didn't think of that. Thank you very much!

    – Eduardo Londoño
    Jan 3 at 15:48














1












1








1







You are starting at (0,0) after calling contents.beginText();. Thus if you want to work with absolute positions only, then put only one (absolute) positioning in a contents.beginText();contents.endText(); segment.






share|improve this answer













You are starting at (0,0) after calling contents.beginText();. Thus if you want to work with absolute positions only, then put only one (absolute) positioning in a contents.beginText();contents.endText(); segment.







share|improve this answer












share|improve this answer



share|improve this answer










answered Jan 3 at 15:22









Tilman HausherrTilman Hausherr

10.4k42760




10.4k42760













  • Can't believe I didn't think of that. Thank you very much!

    – Eduardo Londoño
    Jan 3 at 15:48



















  • Can't believe I didn't think of that. Thank you very much!

    – Eduardo Londoño
    Jan 3 at 15:48

















Can't believe I didn't think of that. Thank you very much!

– Eduardo Londoño
Jan 3 at 15:48





Can't believe I didn't think of that. Thank you very much!

– Eduardo Londoño
Jan 3 at 15:48





Popular posts from this blog

android studio warns about leanback feature tag usage required on manifest while using Unity exported app?

SQL update select statement

WPF add header to Image with URL pettitions [duplicate]