I change my code passing the byte array instead of file path to the
PdfReader and, now, the app works properly.
Thank you,
Francesca
2013/9/16 <itext-questions-requ...@lists.sourceforge.net>
> Send iText-questions mailing list submissions to
> itext-questions@lists.sourceforge.net
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> or, via email, send a message with subject or body 'help' to
> itext-questions-requ...@lists.sourceforge.net
>
> You can reach the person managing the list at
> itext-questions-ow...@lists.sourceforge.net
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of iText-questions digest..."
>
>
> Today's Topics:
>
> 1. Re: java.lang.NoClassDefFoundError: java.nio.MappedByteBuffer
> is a restricted class. Please see the Google App Engine
> developer's guide for more details. (Michael Demey)
> 2. xmlWorker: TABLE inside DIV are truncated (roboboot)
> 3. Re: xmlWorker: TABLE inside DIV are truncated (roboboot)
> 4. Re: xmlWorker: TABLE inside DIV are truncated (iText mailing list)
> 5. Print PDF over web application without choose the printer
> (Fred Duarte)
> 6. Re: Print PDF over web application without choose the printer
> (iText mailing list)
> 7. Unable to parse unicode characters in Xmlworker (raghuveerk)
> 8. Re: Unable to parse unicode characters in Xmlworker (iText Info)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 12 Sep 2013 12:03:34 +0200
> From: Michael Demey <michael.de...@itextpdf.com>
> Subject: Re: [iText-questions] java.lang.NoClassDefFoundError:
> java.nio.MappedByteBuffer is a restricted class. Please see the
> Google
> App Engine developer's guide for more details.
> To: Post all your questions about iText here
> <itext-questions@lists.sourceforge.net>
> Message-ID: <52319176.5010...@itextpdf.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Hi Franscesca,
>
>
> I guess that you're using a path parameter somewhere in your code. Most
> likely when reading an existing PDF with PdfReader. If you are not,
> could you post your entry point, your code or the entire stack trace?
>
> If you do use PdfReader(String): Due to the way that Google App Engine
> handles its filesystem, you can't use the constructor of PdfReader that
> uses the path. You'll have to read the bytes of the file first and then
> pass the byte array to the Reader.
>
> This problem was brought up a week or two ago and we're looking into a
> way to keep the functionality in iTextG while it still works on GAE
> without creating a separate build for GAE.
>
> This is not going to be finished for the next release. This difference
> between Android and GAE in the iTextG port will be documented on the
> next release.
>
>
> Kind regards,
> Micha?l.
>
>
> Op 12/09/2013 11:09, Francesca Stagnaro schreef:
> > Hi,
> > I have downloaded the last version of itext for gae (5.4.3).
> > When I deploy my web-app with itext on my local server the creation of
> > pdf files works properly, but when I deploy on Google Cloud I have this
> > error:
> >
> >
> > java.lang.NoClassDefFoundError: java.nio.MappedByteBuffer is a
> restricted class. Please see the Google App Engine developer's guide for
> more details.
> >
> > I read that there is a patch for the older versions of itext, can I use
> > the same patch for 5.4.3 version?
> > Thanks,
> > Francesca
> >
> >
> >
> >
> >
> >
> >
> ------------------------------------------------------------------------------
> > How ServiceNow helps IT people transform IT departments:
> > 1. Consolidate legacy IT systems to a single system of record for IT
> > 2. Standardize and globalize service processes across IT
> > 3. Implement zero-touch automation to replace manual, redundant tasks
> >
> http://pubads.g.doubleclick.net/gampad/clk?id=51271111&iu=/4140/ostg.clktrk
> >
> >
> >
> > _______________________________________________
> > iText-questions mailing list
> > iText-questions@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/itext-questions
> >
> > iText(R) is a registered trademark of 1T3XT BVBA.
> > Many questions posted to this list can (and will) be answered with a
> reference to the iText book: http://www.itextpdf.com/book/
> > Please check the keywords list before you ask for examples:
> http://itextpdf.com/themes/keywords.php
> >
>
>
>
>
> ------------------------------
>
> Message: 2
> Date: Fri, 13 Sep 2013 05:11:53 -0700 (PDT)
> From: roboboot <rbattist...@acm.org>
> Subject: [iText-questions] xmlWorker: TABLE inside DIV are truncated
> To: itext-questions@lists.sourceforge.net
> Message-ID: <1379074313500-4659145.p...@n4.nabble.com>
> Content-Type: text/plain; charset=us-ascii
>
> Using the 5.4.3 version of xmlWorker, I noted that TABLES inside DIV (for
> an
> XHTML file) are truncated at the end of the page in the final PDF.
>
> Any idea? Is it a bug or my mistake?
>
> thx
>
>
>
> --
> View this message in context:
> http://itext-general.2136553.n4.nabble.com/xmlWorker-TABLE-inside-DIV-are-truncated-tp4659145.html
> Sent from the iText - General mailing list archive at Nabble.com.
>
>
>
> ------------------------------
>
> Message: 3
> Date: Fri, 13 Sep 2013 08:07:49 -0700 (PDT)
> From: roboboot <rbattist...@acm.org>
> Subject: Re: [iText-questions] xmlWorker: TABLE inside DIV are
> truncated
> To: itext-questions@lists.sourceforge.net
> Message-ID: <1379084869650-4659146.p...@n4.nabble.com>
> Content-Type: text/plain; charset=us-ascii
>
> A very simple patch to this problem is to rename the DIV tag into another
> fake name. In that manner xmlWorker ignore the tag and therefore it does
> not
> truncate the table.
>
> It works for me.
>
>
>
>
>
>
>
> --
> View this message in context:
> http://itext-general.2136553.n4.nabble.com/xmlWorker-TABLE-inside-DIV-are-truncated-tp4659145p4659146.html
> Sent from the iText - General mailing list archive at Nabble.com.
>
>
>
> ------------------------------
>
> Message: 4
> Date: Fri, 13 Sep 2013 17:14:12 +0200
> From: iText mailing list <i...@1t3xt.info>
> Subject: Re: [iText-questions] xmlWorker: TABLE inside DIV are
> truncated
> To: Post all your questions about iText here
> <itext-questions@lists.sourceforge.net>
> Message-ID: <52332bc4.6020...@1t3xt.info>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> On 9/13/2013 5:07 PM, roboboot wrote:
> > A very simple patch to this problem is to rename the DIV tag into another
> > fake name. In that manner xmlWorker ignore the tag and therefore it does
> not
> > truncate the table.
> >
> > It works for me.
> OK, I've added this to the ticket.
>
>
>
> ------------------------------
>
> Message: 5
> Date: Fri, 13 Sep 2013 17:26:28 -0400
> From: Fred Duarte <fduar...@gmail.com>
> Subject: [iText-questions] Print PDF over web application without
> choose the printer
> To: itext-questions@lists.sourceforge.net
> Message-ID:
> <
> cae3t4ah3h5slwrtuqejq68fzvah+7ahlgwrangesh4-u9rb...@mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Dear Everybody:
>
> I have done some research about How to print a PDF document using some of
> java libraries but currently I do not have the best way to print this PDF
>
> This is the case we have a lot of PDF document generated by many systems,
> these are stored in Alfresco then we use a Java Download using Mule or
> Servlet technology both made the same because it download the file as a
> stream to the client
>
> - My First research was using itext, on the applet client we receive the
> stream and the I overwrite this file and add some printings command to this
> file it work well but I can not choose the printer and we need to add some
> iframe to all applications in order to manage the process.
>
> - My second research was using Jzebra, it work well but it use bitmap
> technology to print a PDF and it impact to the original file size, for
> example my file is 134 KB but when I tried to print it launch the file to
> the spool with 54.1 MB, but some time do not print all documents
>
> Both research have some problems, I like to as you experience what will be
> the better solution to manage PDF print on web application without printing
> dialog (My all printer are setting on my database a it is passed to the
> client application)
>
> I like to know more about how to manage this problem.
>
> --
> Thanks in advance
> Fred Duarte
> -------------- next part --------------
> An HTML attachment was scrubbed...
>
> ------------------------------
>
> Message: 6
> Date: Sat, 14 Sep 2013 10:59:21 +0200
> From: iText mailing list <i...@1t3xt.info>
> Subject: Re: [iText-questions] Print PDF over web application without
> choose the printer
> To: Post all your questions about iText here
> <itext-questions@lists.sourceforge.net>
> Message-ID: <52342569.9020...@1t3xt.info>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> On 9/13/2013 11:26 PM, Fred Duarte wrote:
> > Dear Everybody:
> >
> > I have done some research about How to print a PDF document using some
> > of java libraries but currently I do not have the best way to print
> > this PDF
>
> If you want to print a PDF from a browser without a dialog box (in
> general, not limited to iText), please forget about your requirement,
> because what you want is considered a vulnerability, an undesired
> security hazard.
>
> If you want to select a printer, please take a look at the JavaScript
> for Acrobat reference.
>
> You can list printers like this:
>
> var l = app.printerNames.length;
> for ( var i = 0; i < l; i++)
> console.println("(" + (i+1) + ") " + app.printerNames[i]);
>
> Once you know what printer you want to print to, you can change the
> print parameters like this:
>
> var pp = this.getPrintParams();
> pp.interactive = pp.constants.interactionLevel.automatic;
> pp.printerName = "hp officejet d series";
> this.print(pp);
>
> I assume you have sufficient information on how to introduce JavaScript
> into a PDF using iText. There are different examples on how to do that
> on the iText site.
>
>
>
> ------------------------------
>
> Message: 7
> Date: Sat, 14 Sep 2013 20:08:59 -0700 (PDT)
> From: raghuveerk <veeru.kanakamed...@gmail.com>
> Subject: [iText-questions] Unable to parse unicode characters in
> Xmlworker
> To: itext-questions@lists.sourceforge.net
> Message-ID: <1379214539744-4659151.p...@n4.nabble.com>
> Content-Type: text/plain; charset=UTF-8
>
> I was trying to convert a HTML file to PDF using XMLWorker of iText API.
> The
> HTML content is obtained during runtime from freemarker template (attached
> here) by passing a datamap. The obtained HTML content is converted to
> string
> and finally to inputstream as shown in below method.
>
>
> private ByteArrayOutputStream convertToPDF(Document document,
> String pathToTemplate, Map<String, String> dataMap)
> throws FileNotFoundException, IOException,
> DocumentException,
> TemplateException {
>
> ClassTemplateLoader ctl = new
> ClassTemplateLoader(getClass(), "/");
> StringWriter sWriter = new StringWriter();
> Configuration cfg = new Configuration();
> ByteArrayOutputStream baos = new ByteArrayOutputStream();
>
> cfg.setTemplateLoader(ctl);
> Template templateToProcess =
> cfg.getTemplate(pathToTemplate);
> templateToProcess.process(dataMap, sWriter);
>
> PdfWriter writer = PdfWriter.getInstance(document, baos);
> document.open();
>
> System.out.println("sWriter.toString()"+sWriter.toString());
> byte[] barray = sWriter.toString().getBytes();
> ByteArrayInputStream bais = new
> ByteArrayInputStream(barray);
>
> // convert the HTML with the built-in convenience method
> XMLWorkerHelper.getInstance().parseXHtml(writer, document,
> bais);
>
> document.close();
>
> return baos;
> }
>
> The outputstream that was returned from above method is then used to
> display
> the PDF document in browser. I am able to generate the PDF successfully.But
> then I will have to show few checkboxes, realizing that XMLWorker doesn't
> support input fields I switched to Unicode ballot box character(?).
> However,
> the XML Worker parser ignores these characters. I have tried to copy the
> character itself as well as few other codes in template. Please refer to
> the
> attached template and PDF files. Any quick help is appreciated!
> test.ftl <
> http://itext-general.2136553.n4.nabble.com/file/n4659151/test.ftl>
> output.pdf
> <http://itext-general.2136553.n4.nabble.com/file/n4659151/output.pdf>
>
> Ballot box
> reference:http://www.fileformat.info/info/unicode/char/2610/index.htm
>
>
>
>
> --
> View this message in context:
> http://itext-general.2136553.n4.nabble.com/Unable-to-parse-unicode-characters-in-Xmlworker-tp4659151.html
> Sent from the iText - General mailing list archive at Nabble.com.
>
>
>
> ------------------------------
>
> Message: 8
> Date: Mon, 16 Sep 2013 09:50:29 +0200
> From: iText Info <i...@1t3xt.info>
> Subject: Re: [iText-questions] Unable to parse unicode characters in
> Xmlworker
> To: itext-questions@lists.sourceforge.net
> Message-ID: <5236b845.3050...@1t3xt.info>
> Content-Type: text/plain; charset="utf-8"
>
> Op 15/09/2013 5:08, raghuveerk schreef:
> > The outputstream that was returned from above method is then used to
> display
> > the PDF document in browser. I am able to generate the PDF
> successfully.But
> > then I will have to show few checkboxes, realizing that XMLWorker doesn't
> > support input fields I switched to Unicode ballot box character(?).
> However,
> > the XML Worker parser ignores these characters. I have tried to copy the
> > character itself as well as few other codes in template. Please refer to
> the
> > attached template and PDF files
> I looked at the PDF file (see attached screen shot) and I see that you
> only use Helvetica (the standard Type 1 font). As you (should) know, that
> font doesn't know how to draw a check box. In other words: XML Worker
> isn't ignoring the character, it's just that you don't provide iText
> with a font that knows that character.
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: screenshot.png
> Type: image/png
> Size: 30185 bytes
> Desc: not available
>
> ------------------------------
>
>
> ------------------------------------------------------------------------------
> LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
> 1,500+ hours of tutorials including VisualStudio 2012, Windows 8,
> SharePoint
> 2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack
> includes
> Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
> http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
>
> ------------------------------
>
> _______________________________________________
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
>
> iText(R) is a registered trademark of 1T3XT BVBA
>
> End of iText-questions Digest, Vol 88, Issue 13
> ***********************************************
>
------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples:
http://itextpdf.com/themes/keywords.php