On Apr 7, 2013 7:03 AM, <[email protected]> wrote:
> > users Digest 7 Apr 2013 12:03:00 -0000 Issue 650 > > Topics (messages 3467 through 3476) > > Re: pdfbox 1.8 corrupts file > 3467 by: Maruan Sahyoun > > Re: PDType1Font - Can't read the embedded type1C font > 3468 by: Kevin Brown > > PDFBox to check validity of links and bookmarks (some external)? > 3469 by: Kevin Brown > 3470 by: Kevin Brown > > Encryption in Apache pdfbox > 3471 by: Bonnie Keith > 3472 by: "Andreas Lehmkühler" > > Error when using monospaced Fonts > 3473 by: Juan Carlos Castilla > 3474 by: Maruan Sahyoun > > Re: Rubber Stamp/saving error > 3475 by: Tasha Keppler > 3476 by: "Andreas Lehmkühler" > > Administrivia: > > --------------------------------------------------------------------- > To post to the list, e-mail: [email protected] > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > ---------------------------------------------------------------------- > > > Hi, > > we are already aware of the issue. Please see PDFBOX-1551. > > BR > > Maruan Sahyoun > > Am 04.04.2013 um 19:50 schrieb Buzzy Spain <[email protected]>: > > > Hi all, > > > > I was hoping to upgrade to pdfbox 1.8.0 but all of the documents which I > create with pdfbox appear to be corrupt. Any help understanding this would > be greatly appreciated. > > > > I have attached the source and result documents. The example is as > simple as I can think to make it. > > > > code: (file paths changed) > > > > PDDocument testDoc = PDDocument.load("HelloWorld.pdf"); > > testDoc.save("HelloWorldSaved.pdf"); > > > > When I try to read the result document in acrobat I get an error "The > file is damaged and could not be repaired.". When opening in evince, I see > the text below in the console. > > > > Error: PDF file is damaged - attempting to reconstruct xref table... > > Error: Couldn't find trailer dictionary > > Error: Couldn't read xref table > > Error: PDF file is damaged - attempting to reconstruct xref table... > > Error: Couldn't find trailer dictionary > > Error: Couldn't read xref table > > > > > > Thanks, > > Buzzy > > > > > > > You're still awesome, but I'm still getting this when I use > PDFPageContentStream.setFont() on a bunch of PDFs. Did the fix go into > 1.8? > > > > > On Thu, Jan 10, 2013 at 2:31 PM, Kevin Brown <[email protected]> wrote: > > > You are awesome. > > > > On Wed, Jan 9, 2013 at 2:19 AM, Andreas Lehmkuehler <[email protected]> > > wrote: > > > Hi, > > > > > > Am 31.12.2012 17:06, schrieb Kevin Brown: > > > > > >> Andreas, is this looking like it might make the 1.8 release? :) > > > > > > I won't promise it, but I guess it will. :-) > > > > > > > > >> On Wed, Dec 26, 2012 at 6:22 PM, Andreas Lehmkuehler < > [email protected]> > > >> wrote: > > >>> > > >>> Hi, > > >>> > > >>> Am 19.12.2012 18:52, schrieb Kevin Brown: > > >>> > > >>>> Did you, or did anyone else, figure this out? I'm getting the same > > >>>> issue with some PDFs, but a different font: > > >>>> > > >>>> org.apache.pdfbox.pdmodel.font.PDType1Font <init> > > >>>> INFO: Can't read the embedded type1C font MNJOCJ+Palatino-Bold > > >>>> > > >>>> This is with 1.7.1 > > >>> > > >>> > > >>> We improved the Type1C support recently, see [1] for further details. > > >>> > > > SNIP > > > > > > > > >>> BR > > >>> Andreas Lehmkühler > > >>> [1] https://issues.apache.org/jira/browse/PDFBOX-1473 > > > > > > > > > BR > > > Andreas Lehmkühler > > > > > > > Has anyone done this? Just curious to see before I dive in. If not, are > there any other free or freeish libraries that could help? > > I see there's at least one product which looks like it can do the job. > > http://www.debenu.com/products/desktop/debenu-pdf-aerialist/features/audit-bookmarks-and-links/ > > Could one use something like this? > > http://java2s.com/Open-Source/Java/PDF/PDFBox-1.4.0/org/apache/pdfbox/examples/pdmodel/GoToSecondBookmarkOnOpen.java.htm > > Sorry, guess I should just try it out. But do share if you have any > thoughts or experiences with this kind of thing? > > > On Thu, Apr 4, 2013 at 4:01 PM, Kevin Brown <[email protected]> wrote: > > > Has anyone done this? Just curious to see before I dive in. If not, are > > there any other free or freeish libraries that could help? > > > > I see there's at least one product which looks like it can do the job. > > > http://www.debenu.com/products/desktop/debenu-pdf-aerialist/features/audit-bookmarks-and-links/ > > > > > > > > > > > > Are any encryption algorithms contained in pdfbox? If so, what are they? > > Does pdfbox make use of or make calls to encryption in another product > such as the JRE? If so, what are they? > > I need details for export/import classification purposes. > > Thanks! > > ----------------------------------------------------------------------- > Bonnie Keith > Export Compliance Technology Analyst - Legal Division > Tel: (919) 531-7206 ▪ Mobile: (919) 218-2497 ▪ [email protected] > SAS Institute Inc., SAS Campus Drive, Cary, NC 27513 > www.sas.com/US > SAS® … THE POWER TO KNOW® > > > Hi, > > I had to moderate your posting through manually. Be sure to be subscribed > to the > mailing correctly [1], otherwise you won't get any/all answers. > > Bonnie Keith <[email protected]> hat am 4. April 2013 um 23:24 > geschrieben: > > Are any encryption algorithms contained in pdfbox? If so, what are they? > > > > Does pdfbox make use of or make calls to encryption in another product > such as > > the JRE? If so, what are they? > > > > I need details for export/import classification purposes. > Have a look at the bottom of [2], maybe that is what your are looking for. > > > Thanks! > > > > ----------------------------------------------------------------------- > > Bonnie Keith > > Export Compliance Technology Analyst - Legal Division > > Tel: (919) 531-7206 ▪ Mobile: (919) 218-2497 ▪ [email protected] > > SAS Institute Inc., SAS Campus Drive, Cary, NC 27513 > > www.sas.com/US > > SAS® … THE POWER TO KNOW® > > > BR > Andreas Lehmkühler > > [1] http://pdfbox.apache.org/mail-lists.html > [2] http://pdfbox.apache.org/download.html > > > Hi, I need to load some Ubuntu fonts in a PDF but I'm having problems when > trying to load monospaced ones. Using pdfbox-1.8.0, I wrote this snippet: > > > -------------------------------------------------------------------------------------------- > import java.io.IOException; > import org.apache.pdfbox.pdmodel.PDDocument; > import org.apache.pdfbox.pdmodel.PDPage; > import org.apache.pdfbox.pdmodel.edit.PDPageContentStream; > import org.apache.pdfbox.pdmodel.font.PDFont; > import org.apache.pdfbox.pdmodel.font.PDTrueTypeFont; > > public class PDFTest > { > > public static void main (String [] args) throws IOException > { > PDDocument document = null; > try > { > document = new PDDocument (); > PDPage page = new PDPage (); > document.addPage (page); > PDFont font = PDTrueTypeFont.loadTTF (document, > "D:\\UbuntuMono-R.ttf"); > > 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 ("d:\\Hello World.pdf"); > document.close (); > } > catch (Exception e) > { > e.printStackTrace (); > } > } > } > > -------------------------------------------------------------------------------------------- > > And here is the error I'm getting: > > > -------------------------------------------------------------------------------------------- > java.lang.ArrayIndexOutOfBoundsException: 5 > at > > org.apache.pdfbox.pdmodel.font.PDTrueTypeFont.loadDescriptorDictionary(PDTrueTypeFont.java:409) > at > > org.apache.pdfbox.pdmodel.font.PDTrueTypeFont.loadTTF(PDTrueTypeFont.java:201) > at > > org.apache.pdfbox.pdmodel.font.PDTrueTypeFont.loadTTF(PDTrueTypeFont.java:177) > at > > org.apache.pdfbox.pdmodel.font.PDTrueTypeFont.loadTTF(PDTrueTypeFont.java:158) > at > > org.apache.pdfbox.pdmodel.font.PDTrueTypeFont.loadTTF(PDTrueTypeFont.java:145) > at > > org.apache.pdfbox.pdmodel.font.PDTrueTypeFont.loadTTF(PDTrueTypeFont.java:132) > at es.datisa.informes.test.PDF.PDFTest.main(PDFTest.java:21) > > -------------------------------------------------------------------------------------------- > > Trying with other monospaced (like DejaVuSansMono.ttf from windows fonts) > shows the same error. If I try with another Ubuntu Font (not mono) > everything is ok... > > Any idea or suggestion? > > Thanks! > > Hi, > > although PDFBOX-1335 fixed some of the loading issues there seems to be an > issue with monospaced fonts as you correctly spotted. Could you cease an > issue at [1] so we track that? > > BR > Maruan Sahyoun > > [1] https://issues.apache.org/jira/browse/PDFBOX > > > Am 05.04.2013 um 13:26 schrieb Juan Carlos Castilla < > [email protected]>: > > > Hi, I need to load some Ubuntu fonts in a PDF but I'm having problems > when > > trying to load monospaced ones. Using pdfbox-1.8.0, I wrote this snippet: > > > > > -------------------------------------------------------------------------------------------- > > import java.io.IOException; > > import org.apache.pdfbox.pdmodel.PDDocument; > > import org.apache.pdfbox.pdmodel.PDPage; > > import org.apache.pdfbox.pdmodel.edit.PDPageContentStream; > > import org.apache.pdfbox.pdmodel.font.PDFont; > > import org.apache.pdfbox.pdmodel.font.PDTrueTypeFont; > > > > public class PDFTest > > { > > > > public static void main (String [] args) throws IOException > > { > > PDDocument document = null; > > try > > { > > document = new PDDocument (); > > PDPage page = new PDPage (); > > document.addPage (page); > > PDFont font = PDTrueTypeFont.loadTTF (document, > > "D:\\UbuntuMono-R.ttf"); > > > > 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 ("d:\\Hello World.pdf"); > > document.close (); > > } > > catch (Exception e) > > { > > e.printStackTrace (); > > } > > } > > } > > > -------------------------------------------------------------------------------------------- > > > > And here is the error I'm getting: > > > > > -------------------------------------------------------------------------------------------- > > java.lang.ArrayIndexOutOfBoundsException: 5 > > at > > > org.apache.pdfbox.pdmodel.font.PDTrueTypeFont.loadDescriptorDictionary(PDTrueTypeFont.java:409) > > at > > > org.apache.pdfbox.pdmodel.font.PDTrueTypeFont.loadTTF(PDTrueTypeFont.java:201) > > at > > > org.apache.pdfbox.pdmodel.font.PDTrueTypeFont.loadTTF(PDTrueTypeFont.java:177) > > at > > > org.apache.pdfbox.pdmodel.font.PDTrueTypeFont.loadTTF(PDTrueTypeFont.java:158) > > at > > > org.apache.pdfbox.pdmodel.font.PDTrueTypeFont.loadTTF(PDTrueTypeFont.java:145) > > at > > > org.apache.pdfbox.pdmodel.font.PDTrueTypeFont.loadTTF(PDTrueTypeFont.java:132) > > at es.datisa.informes.test.PDF.PDFTest.main(PDFTest.java:21) > > > -------------------------------------------------------------------------------------------- > > > > Trying with other monospaced (like DejaVuSansMono.ttf from windows fonts) > > shows the same error. If I try with another Ubuntu Font (not mono) > > everything is ok... > > > > Any idea or suggestion? > > > > Thanks! > > > Hi, > > Has anyone encountered this error (I'm using psfbox in a vb.netapplication): > > org.apache.pdfbox.exceptions.COSVisitorException: class configured for > MessageDigest(provider: SUN)cannot be found. > > What does this mean? What can I do to correct it? > > Thanks for your help! > > Tasha > > > -----Original Message----- > From: Tasha Keppler [mailto:[email protected]] > Sent: Tuesday, March 26, 2013 4:40 PM > To: [email protected] > Subject: Rubber Stamp/saving error > > Hi all, > > I'm trying to create a rubber stamp using pdfbox in a vb.net application. > Since I'm new at using this tool, I tried programming loading a PDF and > then saving as a different name. I'm getting this error: > > > org.apache.pdfbox.exceptions.COSVisitorException: class configured for > MessageDigest(provider: SUN)cannot be found. > > Can you point me in the right direction for troubleshooting? Let me know > if you need more information. > > Thanks! > > Tasha > > > Hi, > > Am 05.04.2013 17:43, schrieb Tasha Keppler: > >> Hi, >> >> Has anyone encountered this error (I'm using psfbox in a vb.netapplication): >> > Most of us are using PDFBox in a java based environment, so that it might > be hard to find an .NET expert to answer your question. > > org.apache.pdfbox.exceptions.**COSVisitorException: class configured for >> MessageDigest(provider: SUN)cannot be found. >> >> What does this mean? What can I do to correct it? >> > What version of PDFBox are you using? > > Did you build the .NET version of your own or do you use a precompiled > version > from elsewhere? > > The exception sounds like an encryption/decryption issue. Are the > bouncycastle-DLLs on your path? > > Thanks for your help! >> >> Tasha >> > > BR > Andreas Lehmkühler > > > >

