You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (JIRA)" <ji...@apache.org> on 2018/03/05 16:59:00 UTC

[jira] [Commented] (PDFBOX-4141) Suppress control characters?

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

Tilman Hausherr commented on PDFBOX-4141:
-----------------------------------------

My first thought was to implement a callback feature like we recently did {{PDFRenderer}} for annotations. But you could also override {{writeCharacters}}, by checking for whatever characters you'd like to filter. If you like it, then you call the base class; if you don't, you do nothing.

> Suppress control characters?
> ----------------------------
>
>                 Key: PDFBOX-4141
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-4141
>             Project: PDFBox
>          Issue Type: Improvement
>          Components: Parsing
>            Reporter: Andreas Meier
>            Priority: Minor
>         Attachments: Test_with_MW.pdf, Test_with_MW.txt, Test_with_MW_AdobeReader_export.txt, Test_with_MW_linux.jpg, Test_without_MW.txt
>
>
> At the moment pdfbox extracts all types of characters.
> Therefore control characters that occur will also be extracted.
> Unfortunately some of these control characters might deform text.
> For example 'MESSAGE WAITING' (U+0095) [MW]
> I attached some files and a screenshot how text is printed when MESSAGE WAITING is present.
> Should PDFBox handle this type of characters? Maybe suppress them in PDFTextStripper?
> I know that PDFBox works correctly in this case, a feature to turn off or suppress special characters might produce better output than the default Setting unless some control characters are used for any further processing!?
> Feedback appreciated.
> What other programs do:
> a) ignore control characters (Okular PDF Viewer - KDE)
> b) exchange them  (Adobe Reader wrote a dot "." in place of MW)
> Regards
> Andreas



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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