pdf export problem

's Avatar

bartosz.tomczak

07 Jun, 2013 09:32 PM

here is what nodebox throws at me when I try to export my project to pdf:

java.lang.OutOfMemoryError: Java heap space
at com.itextpdf.text.pdf.ByteBuffer.append_i(ByteBuffer.java:187) at com.itextpdf.text.pdf.ByteBuffer.append(ByteBuffer.java:278) at com.itextpdf.text.pdf.ByteBuffer.formatDouble(ByteBuffer.java:496) at com.itextpdf.text.pdf.ByteBuffer.append(ByteBuffer.java:303) at com.itextpdf.text.pdf.ByteBuffer.append(ByteBuffer.java:293) at com.itextpdf.text.pdf.PdfContentByte.curveTo(PdfContentByte.java:735) at com.itextpdf.awt.PdfGraphics2D.followPath(PdfGraphics2D.java:1497) at com.itextpdf.awt.PdfGraphics2D.fill(PdfGraphics2D.java:620) at nodebox.graphics.Path.draw(Path.java:997) at nodebox.client.visualizer.GrobVisualizer.drawGrobs(Unknown Source) at nodebox.client.visualizer.GrobVisualizer.draw(Unknown Source) at nodebox.client.ObjectsRenderer$LinkedVisualizer.draw(Unknown Source) at nodebox.graphics.PDFRenderer.render(PDFRenderer.java:73) at nodebox.client.ObjectsRenderer.render(Unknown Source) at nodebox.client.NodeBoxDocument.exportToFile(Unknown Source) at nodebox.client.NodeBoxDocument.exportToFile(Unknown Source) at nodebox.client.NodeBoxDocument.doExport(Unknown Source) at nodebox.client.NodeBoxMenuBar$ExportAction.actionPerformed(Unknown Source) at javax.swing.AbstractButton.fireActionPerformed(Unknown Source) at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.setPressed(Unknown Source) at javax.swing.AbstractButton.doClick(Unknown Source) at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source) at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source) at java.awt.Component.processMouseEvent(Unknown Source) at javax.swing.JComponent.processMouseEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Container.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source)

any workarounds?

thanks

  1. Support Staff 1 Posted by Frederik De Ble... on 09 Jun, 2013 07:13 PM

    Frederik De Bleser's Avatar

    It looks like you're exporting something that's really big. Does PNG export
    work?

    F

  2. Support Staff 2 Posted by lucasnijs on 11 Jun, 2013 06:17 AM

    lucasnijs's Avatar

    Try scaling the whole thing. As Frederik says, usually if the document is way to big it does not work. If you want to know how big it is: connect a lookup node to the final output and type "bounds" as the key.

  3. 3 Posted by Bartosz Tomczak on 11 Jun, 2013 09:16 AM

    Bartosz Tomczak's Avatar

    Thanks for your replies. I was able to generate and export composition made
    from 1/2 control points (same .csv as input - just cut in half).
    Is there any way to increase the amount of memory jvm uses for nodebox?

  4. Support Staff 4 Posted by Frederik De Ble... on 11 Jun, 2013 10:48 AM

    Frederik De Bleser's Avatar

    Yes, you can increase the memory for NodeBox.

    1. Right-click the NodeBox application icon and choose "Show Package Contents"
    2. Navigate to the Contents folder and open Info.plist in a text editor (TextMate, Sublime, etc.)
    3. At the bottom, change the VMOptions. Currently they are set to:

          <string>-Xms128m -Xmx512m -XX:MaxPermSize=256m</string>

    * Xms is the initial (startup) memory. Change it to 512m for example
    * Xmx is the maximum size of memory. If you have lots of memory, you can change it to 4096m.
    - The max perm size is tricky, but no hurt in increasing it.

    So in the end, for big-memory setups, your line could look like this:

          <string>-Xms512m -Xmx4096m -XX:MaxPermSize=2048m</string>

    Now save the Info.plist file and notice the speed improvements!

    In a future version of NodeBox we will probably increase the initial memory parameters, since we notice more people running into artificial limits. We have to think about all our users and so settings that might work for you might not work for everyone, so we have to be a bit more conservative.

    Best,

    Frederik

    On 11 Jun 2013, at 11:16, Bartosz Tomczak <[email blocked]> wrote:

  5. 5 Posted by Bartosz Tomczak on 19 Jun, 2013 11:47 AM

    Bartosz Tomczak's Avatar

    Thank you, that is exactly the info I was looking for.
    The problem now, is that there is no such thing as "Show Package Contents"
    in the right click menu.
    I assume "NodeBox application icon" would be nodebox.exe (on win7 machine)?
    There are "extract" options ie. I can open the file in 7-zip but it shows 0
    files, 0 dirs...

    Best,

    Bartek

  6. Support Staff 6 Posted by Frederik De Ble... on 19 Jun, 2013 12:57 PM

    Frederik De Bleser's Avatar

    Hey,

    Sorry, those were the instructions for Mac OS X. On Windows, the VM options are hard-coded in nodebox.exe and cannot be changed. I could make a new .exe file that would have larger VM limits, but as mentioned, I'll have to look into the general use case.

    Best,

    Frederik

    On 19 Jun 2013, at 13:47, "Bartosz Tomczak" <[email blocked]> wrote:

  7. 7 Posted by Bartosz Tomczak on 19 Jun, 2013 01:20 PM

    Bartosz Tomczak's Avatar

    Hey,
    From what I've seen current memory consumption is rather conservative. In
    my humble opinion doubling current limits should not be a problem for most
    windows users.
    Anyway if you could make a custom version it would be greatly appreciated,
    thanks.

    Best,

    Bartek

  8. 8 Posted by Anonymous on 22 Nov, 2013 10:50 AM

    Anonymous's Avatar

    Hi there,
    I'm looking forward to a version of nodebox with more memory. I have been using the tool as an experimental source of graphic essence its great; I'm a very bad programmer but I'm skillful enought to manage nodebox with some ease.

    Anyways the tool gets out of memory easy when you dont care about rendering times. How we can get more memory?

    Thanks and keep the good work on.

  9. Support Staff 9 Posted by Frederik De Ble... on 30 Jun, 2014 11:58 AM

    Frederik De Bleser's Avatar

    I've added a GitHub Issue that tracks this.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

22 Feb, 2024 05:51 AM
22 Feb, 2024 01:11 AM
21 Feb, 2024 05:27 PM
21 Feb, 2024 04:49 PM
16 Feb, 2024 05:24 PM

 

06 Feb, 2024 04:45 AM
19 Jan, 2024 09:50 AM
13 Jan, 2024 03:47 AM
05 Jan, 2024 05:10 PM
05 Jan, 2024 04:54 PM
04 Jan, 2024 11:49 PM