Hi,

I can't see the images (these were probably attachments, and not inline, this depends of the mail software) but I assume this text means the initial problem (from last month) has been solved :-)

Tilman

Am 05.03.2020 um 04:59 schrieb jd9...@rit.edu:
PDCIDFontType2:
I switched stripPage() to public so that I could call it. I received the following error:
java.lang.StringIndexOutOfBoundsException: begin 0, end -1, length 9
at java.base/java.lang.String.checkBoundsBeginEnd(String.java:3319)
...
from line 187 imageFilename = imageFilename.substring(0, pt) + "-marked-" + (page + 1) + ".png";

I didn't include an extension to my filename- when I added a period, I got nice cyan boxed characters!


DiacriticsType2.png



PDType1Font:
I added the additional elseif for PDSimpleFont- the characters and diacritic elements each have boxes!

diacriticsType1.png


Thank you, this is very helpful.






On Wed, Mar 4, 2020 at 2:50 PM Tilman Hausherr <thaush...@t-online.de <mailto:thaush...@t-online.de>> wrote:

    Am 04.03.2020 um 20:41 schrieb jd9...@rit.edu <mailto:jd9...@rit.edu>:
    > If flipAT is only initialized in stripPage then the issue might
    be that I
    > am not running DrawPrintTextLocations standalone, so the main
    function is
    > never called. I'm extending DrawPrintTextLocations and calling
    writeText
    > during a process similar to stripPage. It seems I would have to call
    > stripPage instead to initialize flipAT or initialize it myself?


    The best would be to call stripPage().

    The examples with a "main" are stand-alone. They are not part of the
    core pdfbox, and they were not written with the thought of being
    extended. Although you're of course welcome to do whatever you want -
    which carries risks :-)

    Tilman




    >
    >
    > On Wed, Mar 4, 2020 at 2:10 PM Tilman Hausherr
    <thaush...@t-online.de <mailto:thaush...@t-online.de>>
    > wrote:
    >
    >> Am 04.03.2020 um 19:03 schrieb jd9...@rit.edu
    <mailto:jd9...@rit.edu>:
    >>> I tried again with a true type font which should parse as
    PDCIDFontType2,
    >>> and receive
    >>> java.lang.NullPointerException
    >>> at
    >>>
    >>
    
org.apache.pdfbox.examples.util.DrawPrintTextLocations.showGlyph(DrawPrintTextLocations.java:132)
    >>> ...
    >>>
    >>> which takes me to line 83 : cyanShape =
    >>> this.flipAT.createTransformedShape(cyanShape);
    >>
    >> This would mean that flipAT is null. However flipAT is
    initialized when
    >> stripPage() is called. ???
    >>
    >> Tilman
    >>
    >>
    >>
    ---------------------------------------------------------------------
    >> To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org
    <mailto:users-unsubscr...@pdfbox.apache.org>
    >> For additional commands, e-mail: users-h...@pdfbox.apache.org
    <mailto:users-h...@pdfbox.apache.org>
    >>
    >>


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org
    <mailto:users-unsubscr...@pdfbox.apache.org>
    For additional commands, e-mail: users-h...@pdfbox.apache.org
    <mailto:users-h...@pdfbox.apache.org>


Reply via email to