Drawj2d 1.4.0 released
Drawj2d 1.4.0 released
Please use this forum topic for comments about these releases.
Tagging the release 1.4.0
resources/ Adapt to version 1.4.0
doc/,resources/ Adapt doc to version 1.4.0
call command textappend (not textcontinue)
The command will be called textappend (not textcontinue).
The second vote goes to the "info label width" to get the width before writing. That would be useful for detecting column width in tables. The next release of drawj2d will introduce the command info: font Lines bold 5 pen 0.3 m 10 10 set txt {underlined bold text} set width_mm [info label.width $txt] label $txt BL mr [mm 0 1] linerel [mm $width_mm 0]
The second vote goes to the "info label width" to get the width before writing. That would be useful for detecting column width in tables. The next release of drawj2d will introduce the command info: font Lines bold 5 pen 0.3 m 10 10 set txt {underlined bold text} set width_mm [info label.width $txt] label $txt BL mr [mm 0 1] linerel [mm $width_mm 0]
add info command
font type "Lines" bold: increase stroke width
So if there was a way to control the thickness of the lines in those fonts, maybe as a scale factor. That would be great. The next release of drawj2d will introduce a new font style pen for Lines / LinesMono fonts. It is equivalent to the plain (upright) style, but the thickness of the lines is taken from the pen stroke width (at the moment the font is changed to Lines). Example: pen 0.55 font Lines pen text {really bold text}
new style "pen" for Lines font
remove --type rmapi
add textcontinue command (justify)
The next release of drawj2d will introduce a command textcontinue (or just textc). It will append text to the previous paragraph written by the text command (or an earlier textcontinue command, but not to labels). Example input m 5 10 font {Libertinus Serif} text {Drawj2d creates } justify font Lines bold textcontinue {technical line drawings} font {Libertinus Serif} plain textcontinue { in vector format (pdf, svg, ...). The command line program reads a text file that describes the drawing. The input...
The next release of drawj2d will introduce a command textcontinue (or just textc). It will append text to the previous paragraph written by the text command (or an earlier textcontinue command, but not to labels). Example input m 5 10 font {Libertinus Serif} text {Drawj2d creates } justify font Lines bold textcontinue {technical line drawings} font {Libertinus Serif} plain textcontinue { in vector format (pdf, svg, ...). The command line program reads a text file that describes the drawing. The input...
add textcontinue command
Not sure which issue you are referring to. To run drawj2d cd into the directory where you have unzipped drawj2d files and then run drawj2d -Tscreen doc/example.hcl On the command line you should see a few lines ... Welcome to Drawj2d Copyright (c) A. Vontobel, 2014-2024 Version 1.3.4 Mode: JRE Preview: doc/example.hcl ... and a windows should open showing the same content as in doc/out-example.pdf. Hitting the Esc key closes the preview window.
Thanks for the information. Drawj2d still uses "reMarkable .lines file, version=5" . This might (or might not) be an issue for the shader colours. For the record: The relevant drawj2d code is in these two files - net/sf/jtikz/ReMarkablePage.java: rmColour and rmPen - net/sf/jtikz/RemarkableGraphics2D.java: linecolour() For testing purposes it should be enough to adapt, compile and run the single file net/sf/jtikz/ReMarkablePage.java. It has no dependencies other than the java runtime. The main()...
enhance dxf support (entity face3d)
font Lines bold and font LinesMono bold should work: I'll have to explain the parameters for label in the manual. BL (base line) and BLC (base line continue) are indeed hard to guess... It would be really nice to have a tool to interpret markdown or at least a subset of it. The implementation for text is quite rudimentary. A few ideas: - Maybe we would need a command "append text (write)" that just continues writing (knowing xLeft, text coloumn width and the current position) but does line breaks....
font Lines bold and font LinesMono bold should work: I'll have to explain the parameters for label in the manual. BL (base line) and BLC (base line continue) are indeed hard to guess... It would be really nice to have a tool to interpret markdown or at least a subset of it. The implementation for text is quite rudimentary. A few ideas: - Maybe we would need a command "append text (write)" that just continues writing (knowing xLeft, text coloumn width and the current position) but does line breaks....
Currently drawj2d does not remember where the last writing operation ended. That could be implemented (in net/sf/drawj2d/cmd/API.java ) for the commands label, texlabel and text. A new command textpos could return that position. May I ask what the intention is? Do you want to change the font properties (e.g. bold)? Then we might need to remember the x position "here before text" as well, for the carriage return ... For a short text without line breaks you can use the BLC (base line continue) parameter...
Currently drawj2d does not remember where the last writing operation ended. That could be implemented (in net/sf/drawj2d/cmd/API.java ) for the commands label, texlabel and text. A new command textpos could return that position. May I ask what the intention is? Do you want to change the font properties (e.g. bold)? Then we might need to remember the x position "here before text" as well, for the carriage return ... For a short text without line breaks you can use the BLC (base line continue) parameter...
Currently drawj2d does not remember where the last writing operation ended. That could be implemented (in net/sf/drawj2d/cmd/API.java ) for the commands label, texlabel and text. A new command textpos could return that position. May I ask what the intention is? Do you want to change the font properties (e.g. bold)? Then we might need to remember the x position "here before text" as well, for the carriage return ... For a short text without line breaks you can use the BLC (base line continue) parameter...
Currently drawj2d does not remember where the last writing operation ended. That could be implemented (in net/sf/drawj2d/cmd/API.java ) for the commands label, texlabel and text. A new command textpos could return that position. May I ask what the intention is? Do you want to change the font properties (e.g. bold)? Then we might need to remember the x position "here before text" as well, for the carriage return ... For a short text without line breaks you can use the BLC (base line continue) parameter...
Currently drawj2d does not remember where the last writing operation ended. That could be implemented (in net/sf/drawj2d/cmd/API.java ) for the commands label, texlabel and text. A new command textpos could return that position. May I ask what the intention is? Do you want to change the font properties (e.g. bold)? Then we might need to remember the x position "here before text" as well, for the carriage return ... For a short text without line breaks you can use the BLC (base line continue) parameter...
Currently drawj2d does not remember where the last writing operation ended. That could be implemented (in net/sf/drawj2d/cmd/API.java ) for the commands label, texlabel and text. A new command textpos could return that position. May I ask what the intention is? Do you want to change the font properties (e.g. bold)? Then we might need to remember the x position "here before text" as well, for the carriage return ... For a short text without line breaks you can use the BLC (base line continue) parameter...
Thanks for your contribution! (Sorry for the delay. The message was erroneously classified as spam.)
Fachwerk* /build: jar of current svn source. Ant javac target 1.8
Fachwerk3D: improve parsing of background dxf (support Face3d entity)
Fachwerk(2D): improve parsing of background dxf (avoid parsing error)
Fachwerk*: update dxf parser (as in drawj2d 1.3.4)
I am not sure if it is even possible to implement. To my knowledge the rm lines format (version 5) does not support groups directly. It has lines consisting of multiple segments. If a shape is drawn with a single line it gets selected like an object. Hatches (for general shapes) cannot be drawn with a single line. Also I am not aware of a "lift pen" attribute for line segments. Thus I would not know how to create a single object for hatches. By the way. It would be an interesting task to develop...
Drawj2d does not support drawing on different layers. I guess it would actually require too much work to implement (for a feature I do not use personally). May I ask what is your use case?
You are welcome
Your observation is correct: The block/endblock commands do not put the line segments into an object that can only be selected as a whole (as a block) on the reMarkable. Drawj2d actually just draws subsequent line segments. As a work-around to get a single object you can use the polygon command. font Lines set A " 5 5" set B "30 10" set C "20 40" m 20 20 block line $A $B $C $A label {Line segments are selectable} endblock m 20 70 block polygon $A $B $C label {Polygon is selectable} endblock The command...
Examples_reMarkable_ShapesLib
Examples_reMarkable_ShapesLib
Examples_reMarkable_ShapesLib
Thanks, your welcome. I often work with old scanned drawings. These are always black lines on white background. This is the main reason I implemented an algorithm to convert raster images to a rM line representation. It's also the reason I did not care much about colours (it would have been grey only next to black and white at that rM2 time anyway). Is there an option or method to preserve colors or choose a specific color (like white) when converting PNG or SVG images to rmdoc? When converting PNG...
reMarkable
The supported pen colours for notebooks with colours on the rMpro are listed above. In the hcl file you can use them like this: font Lines m 15 10 pen blue text {Some text in blue.} pen red linerel 50 0; # a red line If you just convert a pdf (or svg) to a notebook using the following command on the command line: echo image my.pdf | drawj2d -Trmdoc then the colours are only applied if they match exactly the supported colour definition. Use the exact red-green-blue (rgb) values for the colours when...
The supported pen colours for notebooks with colours on the rMpro are listed above. In the hcl file you can use them like this: font Lines m 15 10 pen blue text {Some text in blue.} pen red linerel 50 0; # a red line If you just convert a pdf (or svg) to a notebook using the following command on the command line: echo image my.pdf | drawj2d -Trmdoc then the colours are only applied if they match exactly the supported colour definition. Use the exact red-green-blue (rgb) values for the colours when...
Forgot to mention in the release notes: --deprecate --type rmapi (will be removed) rMAPI supports - rm - rmdoc (since version 0.2.7) Thus the old output type (zip file with old style metadata) is not needed anymore. Due to a recent rM cloud API change you will need an up to date version of rmapi.
On my rM2 (3.14.1.9) it is black indeed. On the rmPro (3.14.3.0) it is gray. Let's see if an update (to the rM2) software will fix it. The lightgray is quite special. Even when using the fineliner (as drawj2d does) it gets darker when overlapping. Thanks for reporting, it is useful! I have not yet digged deep to find out how colours work. Orange is missing, there is a second black colour (no. 9). Also I don't know about the shader pen (not really needed for drawj2d) ..
Announcement on Reddit Geometric shapes in rM notebooks - Drawj2d updated to support reMarkable Pro colours Drawj2d is a tool to create technical line drawings in vector format (pdf, svg, ...). It can also write reMarkable notebook pages (rmdoc / rmn / rm). These notebooks are editable on the tablet, thus select/copy/paste works. The command line program reads a text file that describes the drawing. The input language consists of commands such as line or label. Coordinates are given in natural units,...
Drawj2d 1.3.4 released
Tagging the release 1.3.4
resources/ enhance wiki for reMarkable Pro
reMarkable
reMarkable
reMarkable
reMarkable
doc/,resources/ Adapt doc to version 1.3.4
reMarkable
add doubleline command
enhance rm output: image command uses pen colour (png+svg)
deprecate --type rmapi
enhance rm output: more colours
Release 1.3.4 will add more colours for the reMarkable (-T rm / rmdoc / rmn). You can already test it if you download the source code and compile it. Requires JavaSDK (compiler) and ant.
enhance rm output: more colours
Glad it works.
Strange. While I have issues using rm2/rmPro in parallel (see below) I currently cannot reproduce the issue you describe. Do I understand correctly: drawj2d still creates these notebook files (e.g. rmdoc) but you cannot transfer them to the device anymore? Could you please collect some information: device type: rm2 or rmPro? drawj2d version (current is 1.3.3) device software version? how do you try to upload rmdoc? desktop app or USB web interface? error message? Observations? anything else that...
Examples_reMarkable_ShapesLib
Home
Examples_reMarkable_ShapesLib
Examples_reMarkable
reMarkable
Examples_reMarkable_ShapesLib
Correct: - RemarkableGraphics2D.java: function lineColour() - ReMarkablePage.java: class rmColour and maybe class rmPen for the new pen.
But rather than a fixed number of supported colors, could you not now support all colors? The lines format uses just index numbers (integers) for the colour. BLACK = 0, GREY = 1, WHITE = 2, BLUE = 6, RED = 7. Custom colours are not supported. At least it was like that when I added export colours to ReMarkablePage.java. Now they probably just have extended the range of colours. Drawj2d still uses the old (<= 2.15) lines format version 5. I am happy the rM notebooks are backward compatible as I am...
Unfortunately the "empty outlines" issue is not easy to solve. Pdf files usually define shapes by their outlines and tell the viewer program the shape has to be filled. The rM file format however does not support "fills" (at least I am not aware of). Instead it uses strokes with an attribute for the line width. Unfortunately it is not straight forward to implement a reliable algorithm that fills a polygon using strokes, as we would do by hand. Thus drawj2d just draws the outlines. As a work-around...
According to the discussion on reddit you have resolved the issue. The command to convert a pdf page to an rM notebook directly from the command line is echo image pageA5.pdf | drawj2d -Trmn On Mac and Linux the above command works if drawj2d has been added to the path (see manual). If you want to run an executable file from the local directory instead you need the prefix "./" echo image pageA5.pdf | ./drawj2d -Trmn In case of a permission error you might have to make the starting script executable...
Thanks for the answer! For your example double quotes solve the issue. If you want to use variables in drawj2d commands use single quotes instead: echo 'set file pageA4.pdf; image $file 1' | drawj2d -Tscreen
The echo command seems to work differently in PowerShell (compared to cmd.com). In PowerShell you'll need single quotes: echo 'image pageA4.pdf 1 0 0 0.7' | drawj2d -Trmdoc echo 'image {filename with spaces.pdf} 1 0 0 0.7' | drawj2d -Trm
Nice! On the github page you mention problems on Windows: Draft: Setup the project on a windows machine CURRENTLY THIS DOES NOT work as drawj2d is not working for me on windows (the command "echo image .pdf 0 0 0 0.7 | drawj2d -Trmdoc" is throwing an error) Drawj2d should work on windows. Can you post the error message? By the way in the command cited above the pdf file name seems to be incomplete (unless it is ".pdf"). Do the following commands work? echo image pageA4.pdf 1 0 0 0.7 | drawj2d -Trmdoc...
Nice! On the github page you mention problems on Windows: Draft: Setup the project on a windows machine CURRENTLY THIS DOES NOT work as drawj2d is not working for me on windows (the command "echo image .pdf 0 0 0 0.7 | drawj2d -Trmdoc" is throwing an error) Drawj2d should work on windows. Can you post the error message? By the way in the command cited above the pdf file name seems to be incomplete (unless it is ".pdf"). Does the following command work? echo image pageA4.pdf 1 0 0 0.7 | drawj2d -...
Drawj2d by itself does deal with single pages only (no matter if rmdoc or other output format). For multiple pages it has to be called in a loop and the resulting notebook pages have to be put together in a single notebook file (rmdoc, rmn or rmapi zip). That is what pdf2rmnotebook does. My current suggestion would be to use RCU (rmn file type). Rmapi does work in my experience. The problem is less the "new sync protocol" (not new anymore) but the fact that the main developer has declared the project...
Interesting question! Please try the following command: drawj2d -Trmdoc -X-26.5 -W210 -H157 landscape.hcl Upload out-landscape.rmdoc to the rM. On the rM tablet open the notebook (out-landscape) and select the menu option "Set to landscape". notes - assuming in landscape.hcl you draw within the coordinates 0 < x < 210 (width in mm) and 0 < y < 157 (height) - (157 - 210) / 2 = -26.5 - probably you can omit the -W and -H parameters - use -Trmn for RCU or -Trm for rmapi Does this work?
reMarkable
Home
It is actually called "USB web interface" (not web transfer) and refers to a method for transferring files using a USB cable and a browser.
Home
Examples_reMarkable
reMarkable
Drawj2d version 1.3.3 released. The issue "font command doesn't work with variables" should be fixed.
Drawj2d 1.3.3 released
Tagging the release 1.3.3
doc/,resources/ Adapt doc to version 1.3.3
add rmdoc output format (for reMarkable paper tablet Web Interface)
Home
The issue will be fixed in the next version. Thanks for reporting.
fix font command
version numbering
reMarkable
reMarkable
You are right, there is an issue. Thanks for reporting it. The work-around is to replace $text_size by [float $text_size]. In your linked example replace the following way (output of "diff -y --suppress-common-lines orginal.hcl modified.hcl") set fsvar 0 | set fsvar 1 font $font_name bold $title_size | font $font_name bold [float $title_size] font $font_name bold $text_size | font $font_name bold [float $text_size] font $font_name bold $title_size | font $font_name bold [float $title_size] font $font_name...