pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Hewson <j...@jahewson.com>
Subject Re: What does appendRawCommands do?
Date Thu, 15 Jan 2015 19:08:08 GMT
I just realise I didn’t answer this question:

> Is appendRawCommands creating the bullet points?

Yes, \u0095 results in a bullet point. Note that in Unicode, U+0095 is not the bullet character,
but is the ASCII control character for “message waiting”. But PDFBox 1.8 does not use
Unicode, it uses WinAnsiEncoding where 0x0095 is the “bullet” character.

WinAnsiEncoding  is specific to PDF, but it’s based on http://en.wikipedia.org/wiki/Windows-1250
<http://en.wikipedia.org/wiki/Windows-1250>

If you switch to PDFBox 2.0 Trunk, you can forget about all this and just use Unicode via
the new .showText() API.

-- John

> On 15 Jan 2015, at 07:37, Vorpahl,Lucinda <vorpahl.lucinda@heb.com> wrote:
> 
> I have the following lines of code for creating my PDF but I'm not sure what the appendRawCommands
is doing.
> 
> contentStream.drawString("\u0095 Some standard text here");
> contentStream.appendRawCommands("12 TL T*");
> contentStream.drawString("\u0095 More basic text here, ");
> contentStream.appendRawCommands("T*");
> contentStream.drawString("  Additional stuff here");
> contentStream.appendRawCommands("T*");
> contentStream.drawString("\u0095 You know what is here  ");
> contentStream.appendRawCommands("T*");
> contentStream.drawString("  Yep.");
> contentStream.appendRawCommands("T*");
> contentStream.drawString("\u0095 One more line");
> contentStream.appendRawCommands("T*");
> contentStream.drawString("\u0095 Last line");
> 
> This is the output:
> 
> 
> *         Some standard text here
> 
> *         More basic text here,
> 
> Additional stuff here
> 
> *         You know what is here
> 
> Yep.
> 
> *         One more line
> 
> *         Last line
> 
> Is appendRawCommands creating the bullet points?
> Why does the first line have "12 TL T*" and the rest only have "T*"
> 
> Thanks in advance,
> Lucy Vorpahl
> 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message