Printing to PDF via command line

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

Printing to PDF via command line

mandeep7
Can I use LibreCAD to print my DXF file to PDF using command line?
I am using Linux and here are some details:

<q>
Version: master
SCM Revision: 2.0.8
Compiler: GNU GCC 5.3.0
Qt Version: 5.5.1
</q>

It may be some command like:
librecad demo.dxf --print demo.pdf

If it's not possible in LibreCAD, then can you suggest me something else?
Mandeep Singh
Reply | Threaded
Open this post in threaded view
|

Re: Printing to PDF via command line

dxli
There's a feature request of command line converter:

LibreCAD --convert foo.dxf foo.pdf
LibreCAD --convert foo.dxf foo.svg
LibreCAD --convert foo.dwg foo.dxf

it might worth to implement them. Would you like to help?

Another idea, implement a plugin. Need to read about LibreCAD plugin interface first.

mandeep7 wrote
Can I use LibreCAD to print my DXF file to PDF using command line?
I am using Linux and here are some details:

<q>
Version: master
SCM Revision: 2.0.8
Compiler: GNU GCC 5.3.0
Qt Version: 5.5.1
</q>

It may be some command like:
librecad demo.dxf --print demo.pdf

If it's not possible in LibreCAD, then can you suggest me something else?
Reply | Threaded
Open this post in threaded view
|

Re: Printing to PDF via command line

rolgiati
On Fri, 18 Dec 2015 12:28:53 -0700 (MST)
"dxli [via LibreCAD]" <[hidden email]> wrote:

> > If it's not possible in LibreCAD, then can you suggest me something else?  

> There's a feature request of command line converter:

There are plenty online dxf 2 pdf wepages...
 
Cheers,
 
Ron.
--
                     Always remember that you are unique.
                           Just like everyone else.
                                   
                   -- http://www.olgiati-in-paraguay.org --
 
Reply | Threaded
Open this post in threaded view
|

Re: Printing to PDF via command line

mandeep7
In reply to this post by dxli
On Sat, Dec 19, 2015 at 12:58 AM, dxli [via LibreCAD]
<[hidden email]> wrote:
>
> There's a feature request of command line converter:
>
> LibreCAD --convert foo.dxf foo.pdf
> LibreCAD --convert foo.dxf foo.svg
> LibreCAD --convert foo.dwg foo.dxf
>
> it might worth to implement them. Would you like to help?
Yes. How can I get started with that?

> Another idea, implement a plugin. Need to read about LibreCAD plugin interface first.
Can you point me to the relevant resources?

--
Mandeep Singh
http://mandeep7.wordpress.com
https://github.com/mandeeps708

“To err is human, but to really foul up everything, you need root password.”
Mandeep Singh
Reply | Threaded
Open this post in threaded view
|

Re: Printing to PDF via command line

dxli
Have a look at the class qc_applicationwindow, and slot slot functions for file open, file saving, and exporting.

May create a new slot to do the conversion and be called using cli parameters
mandeep7 wrote
On Sat, Dec 19, 2015 at 12:58 AM, dxli [via LibreCAD]
<[hidden email]> wrote:
>
> There's a feature request of command line converter:
>
> LibreCAD --convert foo.dxf foo.pdf
> LibreCAD --convert foo.dxf foo.svg
> LibreCAD --convert foo.dwg foo.dxf
>
> it might worth to implement them. Would you like to help?
Yes. How can I get started with that?

> Another idea, implement a plugin. Need to read about LibreCAD plugin interface first.
Can you point me to the relevant resources?

--
Mandeep Singh
http://mandeep7.wordpress.com
https://github.com/mandeeps708

“To err is human, but to really foul up everything, you need root password.”
Reply | Threaded
Open this post in threaded view
|

Re: Printing to PDF via command line

mandeep7
On Sat, Dec 19, 2015 at 3:13 AM, dxli [via LibreCAD]
<[hidden email]> wrote:
> Have a look at the class qc_applicationwindow, and slot slot functions for
> file open, file saving, and exporting.
>
> May create a new slot to do the conversion and be called using cli
> parameters

I gave Kabeja a try.
Can't we use it in LibreCAD as an extension?

It's Apache licensed.
http://kabeja.sourceforge.net/
https://github.com/fuzziness/kabeja

--
Mandeep Singh
http://mandeep7.wordpress.com
https://github.com/mandeeps708

“To err is human, but to really foul up everything, you need root password.”
Mandeep Singh
Reply | Threaded
Open this post in threaded view
|

Re: Printing to PDF via command line

ravas
Can you extend a C++ / Qt program with a Java library?
It seems nasty; and I think it would be overkill since we can already create PDF files.

To be clear: are you talking about the OS command line or the command line inside of LibreCAD?

Look at QC_ApplicationWindow::slotFilePrint
It could use some cleanup, and could be split into more than one function.
Also look at handleArgs in main.cpp
Reply | Threaded
Open this post in threaded view
|

Re: Printing to PDF via command line

mandeep7
On Sun, Dec 20, 2015 at 2:08 AM, ravas [via LibreCAD]
<[hidden email]> wrote:
> Can you extend a C++ / Qt program with a Java library?
> It seems nasty; and I think it would be overkill since we can already create
> PDF files.
>
> To be clear: are you talking about the OS command line or the command line
> inside of LibreCAD?
OS command line.

> Look at QC_ApplicationWindow::slotFilePrint
> It could use some cleanup, and could be split into more than one function.
> Also look at handleArgs in main.cpp

Sorry, I've not undergone LC code as of now. As LibreCAD prints to PDF
from GUI. I just want to do it from Command line.

Thank you.

--
Mandeep Singh
http://mandeep7.wordpress.com
https://github.com/mandeeps708

“To err is human, but to really foul up everything, you need root password.”
Mandeep Singh
Reply | Threaded
Open this post in threaded view
|

Re: Printing to PDF via command line

mandeep7
In reply to this post by dxli
On Sat, Dec 19, 2015 at 12:58 AM, dxli [via LibreCAD]
<[hidden email]> wrote:

> There's a feature request of command line converter:
>
> LibreCAD --convert foo.dxf foo.pdf
> LibreCAD --convert foo.dxf foo.svg
> LibreCAD --convert foo.dwg foo.dxf
>
> it might worth to implement them. Would you like to help?
>
> Another idea, implement a plugin. Need to read about LibreCAD plugin
> interface first.

Hi there!
Is the project list for GSoC 2016 updated?

Can we consider this as a standalone project to be in GSoC?

--
Mandeep Singh
http://mandeep7.wordpress.com
https://github.com/mandeeps708

“To err is human, but to really foul up everything, you need root password.”
Mandeep Singh
Reply | Threaded
Open this post in threaded view
|

Re: Printing to PDF via command line

dxli
Hi,

I feel this can be a good warm-up project, but doesn't seem to fit the length of gsoc.

In addition, can we add basic piping to LibreCAD:

librecad <<EOF
line 0,0 10,10
circle 5,5 5
papersize letters
export output.svg
export output.pdf
EOF

Here we can have flexibility of what commands to support, to get a good project.

What do you think?
 
<quote author="mandeep7">
On Sat, Dec 19, 2015 at 12:58 AM, dxli [via LibreCAD]
<[hidden email]> wrote:
> There's a feature request of command line converter:
>
> LibreCAD --convert foo.dxf foo.pdf
> LibreCAD --convert foo.dxf foo.svg
> LibreCAD --convert foo.dwg foo.dxf
>
> it might worth to implement them. Would you like to help?
>
> Another idea, implement a plugin. Need to read about LibreCAD plugin
> interface first.

Hi there!
Is the project list for GSoC 2016 updated?

Can we consider this as a standalone project to be in GSoC?

--
Mandeep Singh
http://mandeep7.wordpress.com
https://github.com/mandeeps708

“To err is human, but to really foul up everything, you need root password.”
Reply | Threaded
Open this post in threaded view
|

Re: Printing to PDF via command line

ravas
In reply to this post by mandeep7
As rolgiati pointed out, there are a lot of free tools already available to batch convert dxf to pdf.
Let's avoid reinventing another wheel.

A GSoC project would preferably add something that is frequently requested:

- scripting
- properties dockwidget
- grouping of layers
- show the entities in each layer (tree view)

We aren't lacking in feature requests.

https://sourceforge.net/p/librecad/feature-requests/?source=navbar
https://github.com/LibreCAD/LibreCAD/labels/request

Reply | Threaded
Open this post in threaded view
|

Re: Printing to PDF via command line

hsrai
In reply to this post by rolgiati
On Sat, Dec 19, 2015 at 1:27 AM, rolgiati [via LibreCAD]
<[hidden email]> wrote:
> "dxli [via LibreCAD]" <[hidden email]> wrote:
>
>> > If it's not possible in LibreCAD, then can you suggest me something
>> > else?
>
>> There's a feature request of command line converter:
>
> There are plenty online dxf 2 pdf wepages...

I could not find any which is FOSS.

If I am missing any, please point out.

--
H.S.Rai
--
H.S.Rai
Reply | Threaded
Open this post in threaded view
|

Re: Printing to PDF via command line

R. van Twisk
Administrator
We have a simple version that can generate PDF in LibreCAD 3,
it's still work in progress though.

Ries

On Mar 15, 2016, at 4:15 PM, hsrai [via LibreCAD] <[hidden email]> wrote:

On Sat, Dec 19, 2015 at 1:27 AM, rolgiati [via LibreCAD]
<<a href="x-msg://75/user/SendEmail.jtp?type=node&amp;node=5713319&amp;i=0" target="_top" rel="nofollow" link="external" class="">[hidden email]> wrote:
> "dxli [via LibreCAD]" <[hidden email]> wrote:
>
>> > If it's not possible in LibreCAD, then can you suggest me something
>> > else?
>
>> There's a feature request of command line converter:
>
> There are plenty online dxf 2 pdf wepages...

I could not find any which is FOSS.

If I am missing any, please point out.

--
H.S.Rai
--
H.S.Rai



If you reply to this email, your message will be added to the discussion below:
http://forum.librecad.org/Printing-to-PDF-via-command-line-tp5712735p5713319.html
To start a new topic under LibreCAD-dev, email [hidden email]
To unsubscribe from LibreCAD, click here.
NAML