[jira] [Commented] (PDFBOX-3890) The operator Tz is not available when creating new PDF using PDPageContentStream

2017-08-09 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/PDFBOX-3890?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16120246#comment-16120246
 ] 

ASF subversion and git services commented on PDFBOX-3890:
-

Commit 1804587 from [~tilman] in branch 'pdfbox/branches/2.0'
[ https://svn.apache.org/r1804587 ]

PDFBOX-3890: add horizontal scaling

> The operator Tz is not available when creating new PDF using 
> PDPageContentStream
> 
>
> Key: PDFBOX-3890
> URL: https://issues.apache.org/jira/browse/PDFBOX-3890
> Project: PDFBox
>  Issue Type: Improvement
>  Components: PDModel
>Affects Versions: 2.0.7
>Reporter: Jose Novacho
> Fix For: 2.0.8, 3.0.0
>
>
> When creating new PDF file using the _PDPageContentStream_ there is no option 
> to set horizontal text spacing. The horizontal text spacing operator (Tz) is 
> implemented in 
> _org.apache.pdfbox.contentstream.operator.text.SetTextHorizontalScaling_ but 
> that's not possible to use when creating new PDF.
> Minimal working example:
> {code:java}
> PDDocument document = new PDDocument();
> PDPage page = new PDPage();
> document.addPage( page );
> PDFont font = PDType1Font.HELVETICA_BOLD;
> PDPageContentStream contentStream = new PDPageContentStream(document, page);
> contentStream.beginText();
> contentStream.setFont( font, 12 );
> contentStream.moveTextPositionByAmount( 100, 700 );
> contentStream.drawString( "Hello World" );
> contentStream.endText();
> contentStream.close();
> document.save( "Hello World.pdf");
> document.close();
> {code}
> The workaround at this moment is to use 
> _PDPageContentStream.appendRawCommands("50 Tz");_
> But this method is deprecated.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-3890) The operator Tz is not available when creating new PDF using PDPageContentStream

2017-08-09 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/PDFBOX-3890?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16120247#comment-16120247
 ] 

ASF subversion and git services commented on PDFBOX-3890:
-

Commit 1804588 from [~tilman] in branch 'pdfbox/trunk'
[ https://svn.apache.org/r1804588 ]

PDFBOX-3890: add horizontal scaling

> The operator Tz is not available when creating new PDF using 
> PDPageContentStream
> 
>
> Key: PDFBOX-3890
> URL: https://issues.apache.org/jira/browse/PDFBOX-3890
> Project: PDFBox
>  Issue Type: Improvement
>  Components: PDModel
>Affects Versions: 2.0.7
>Reporter: Jose Novacho
> Fix For: 2.0.8, 3.0.0
>
>
> When creating new PDF file using the _PDPageContentStream_ there is no option 
> to set horizontal text spacing. The horizontal text spacing operator (Tz) is 
> implemented in 
> _org.apache.pdfbox.contentstream.operator.text.SetTextHorizontalScaling_ but 
> that's not possible to use when creating new PDF.
> Minimal working example:
> {code:java}
> PDDocument document = new PDDocument();
> PDPage page = new PDPage();
> document.addPage( page );
> PDFont font = PDType1Font.HELVETICA_BOLD;
> PDPageContentStream contentStream = new PDPageContentStream(document, page);
> contentStream.beginText();
> contentStream.setFont( font, 12 );
> contentStream.moveTextPositionByAmount( 100, 700 );
> contentStream.drawString( "Hello World" );
> contentStream.endText();
> contentStream.close();
> document.save( "Hello World.pdf");
> document.close();
> {code}
> The workaround at this moment is to use 
> _PDPageContentStream.appendRawCommands("50 Tz");_
> But this method is deprecated.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org