Conversion tif, dwg dgn to pdf

Discussions on NConvert - the command line tool for image conversion and manipulation

Moderators: XnTriq, helmut, xnview

AutoCadConverter
Posts: 8
Joined: Tue Oct 20, 2015 11:25 am

Conversion tif, dwg dgn to pdf

Post by AutoCadConverter »

Hi Experts,

I have the following requirement and need your help.

1. I I am converting tif to pdf via the command line. The PDF file as output is rather too large. How can I reduce this to be the same size but without any reduction in quality?
2. I want to convert DWG and DGN files to PDF as well. Do I need a plugin to do this?
3. More questions to come.

Your help is appreciated heaps.

Thanks.
cday
XnThusiast
Posts: 4164
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Conversion tif, dwg dgn to pdf

Post by cday »

AutoCadConverter wrote:I am converting tif to pdf via the command line. The PDF file as output is rather too large. How can I reduce this to be the same size but without any reduction in quality?
Do you have the NConvert Help file? If necessary, you can create a listing using this code:

Code: Select all

nconvert -help > Help.txt
To reduce the size of the PDF output file, you'll need to apply a suitable compression option depending on the bit-depth of the TIFF images you are converting; if the images are 1-bit black and white, or can be converted to 1-bit without loss, 'Fax' compression should be optimal and can be added using this code:

Code: Select all

-c 1
If the bit depth of the input image is 8-bit or 32-bit JPEG compression will normally minimise the output file size, but as a lossy compression method could potentially degrade the output image, especially if too much compression is applied, as you probably already know...

With optimal compression the PDF file created should be only marginally larger than the input TIFF file, or actually smaller if the TIFF file is not optimally compressed.
AutoCadConverter wrote:I want to convert DWG and DGN files to PDF as well. Do I need a plugin to do this?
DWG is listed as a supported file type (no plug-in required) but not DGN...
AutoCadConverter
Posts: 8
Joined: Tue Oct 20, 2015 11:25 am

Re: Conversion tif, dwg dgn to pdf

Post by AutoCadConverter »

Thank you very very much for your help.

Can I please ask:

I tried converting to pdf from dwg and it gave me an error.
The command was similar to the the one I wrote for TIF to PDF
The commands I used were:

nconvert -out pdf *.dwg -
nconvert -c 1 -out pdf *.dwg
First I got a warning that had status message 65534
and it also said Error: Can't read _____.dwg (There is only one file in the folder)

Also because I have so many TIF files to convert, I don't really want to open them all to verify.
The command -c 1: Will that completely remove all the color in the TIF? I mostly have BlacknWhite TIFs but there definitely a few color ones too.

Thanks so much for your help.
cday
XnThusiast
Posts: 4164
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Conversion tif, dwg dgn to pdf

Post by cday »

AutoCadConverter wrote:I tried converting to pdf from dwg and it gave me an error.
The command was similar to the the one I wrote for TIF to PDF
The commands I used were:

Code: Select all

nconvert -out pdf *.dwg

Code: Select all

nconvert -c 1 -out pdf *.dwg
First I got a warning that had status message 65534
and it also said Error: Can't read _____.dwg (There is only one file in the folder)
I'm not familiar with the DWG format, possibly someone else can help. :?:

I don't know if you might possibly require GhostScript to be installed (same x32 or x64 as the NConvert version you are using), or whether there might be different DWG format versions??
AutoCadConverter wrote:Also because I have so many TIF files to convert, I don't really want to open them all to verify.
The command -c 1: Will that completely remove all the color in the TIF? I mostly have BlacknWhite TIFs but there definitely a few color ones too.
If the files you load are mixed bit depths I'm not sure what the effect will be without testing it. 'Fax' compression is certainly specific to 1-bit depth images, but if you want to maintain the bit depth of images that aren't 1-bit I think it would probably be necessary either to separate them and then apply the optimal compression method to each, or possibly alternatively use more advanced scripting to test the bit depth, if that is possible, and then process each file appropriately.

Could you please post any new threads under the NConvert heading of the forum.
cday
XnThusiast
Posts: 4164
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Conversion tif, dwg dgn to pdf

Post by cday »

If you do need to process files with mixed bit depths, another option would be to use a compression method that is applicable to any bit depth such as LZW, if the resulting file sizes are acceptable.
User avatar
XnTriq
Moderator & Librarian
Posts: 6386
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Conversion tif, dwg dgn to pdf

Post by XnTriq »

cday wrote:I'm not familiar with the DWG format, possibly someone else can help. :?:
The AutoCAD formats are not “natively” supported by XnView and NConvert. For converting DWG files, a 3rd-party I/O plug-in is required which isn't included in the “Minimal” and “Standard” but in the “Extended” download package of XnView. The plug-in is also available as a separate download from xnview.com and cadsofttools.com.
XnTriq ([url=http://newsgroup.xnview.com/viewtopic.php?p=98957#p98957]cmd_WebPage for plugin-supported formats[/url]) wrote:
I had to install %ProgramFiles%\XnView\Plugins\CS_Manager.exe.
  • Image
  • Image
The settings are saved in the registry: HKEY_CURRENT_USER\Software\SoftGold\
Soft Gold ([url=http://www.cadsofttools.com/en/products/plugins_for_3d-party_programs.html]Plugins for 3d-party programs[/url] » CS_Manager) wrote:
Small free application allows to:
  • Input registration data
  • Change size of CAD image (DIB)
  • Change between color and black-white mode
AutoCadConverter
Posts: 8
Joined: Tue Oct 20, 2015 11:25 am

Re: Conversion tif, dwg dgn to pdf

Post by AutoCadConverter »

Thank you soo much!

I will ask my IT friend to help me install this and will try my first ever batch conversion of DWG files.
I will come back with update.

Thank you very much again.
AutoCadConverter
Posts: 8
Joined: Tue Oct 20, 2015 11:25 am

Re: Conversion tif, dwg dgn to pdf

Post by AutoCadConverter »

XnTriq wrote:
cday wrote:I'm not familiar with the DWG format, possibly someone else can help. :?:
The AutoCAD formats are not “natively” supported by XnView and NConvert. For converting DWG files, a 3rd-party I/O plug-in is required which isn't included in the “Minimal” and “Standard” but in the “Extended” download package of XnView. The plug-in is also available as a separate download from xnview.com and cadsofttools.com.
XnTriq ([url=http://newsgroup.xnview.com/viewtopic.php?p=98957#p98957]cmd_WebPage for plugin-supported formats[/url]) wrote:
I had to install %ProgramFiles%\XnView\Plugins\CS_Manager.exe.
  • Image
  • Image
The settings are saved in the registry: HKEY_CURRENT_USER\Software\SoftGold\
Soft Gold ([url=http://www.cadsofttools.com/en/products/plugins_for_3d-party_programs.html]Plugins for 3d-party programs[/url] » CS_Manager) wrote:
Small free application allows to:
  • Input registration data
  • Change size of CAD image (DIB)
  • Change between color and black-white mode
Again Thank you.
I just read the other posts and saw that we have to pay 10Euros. I am fine with that but can you please tell me if :

The DWG files will be converted to PDF like for like. A0 size to A0 size pdf , A3 to A3 and so on.
Some of my DWG files are really old and when converting there usually is a line problem, which gets fixed when I change the line weight settings. Will I be able to overcome this?
User avatar
XnTriq
Moderator & Librarian
Posts: 6386
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Conversion tif, dwg dgn to pdf

Post by XnTriq »

AutoCadConverter wrote:I just read the other posts and saw that we have to pay 10Euros. I am fine with that but can you please tell me if :

The DWG files will be converted to PDF like for like. A0 size to A0 size pdf , A3 to A3 and so on.
Some of my DWG files are really old and when converting there usually is a line problem, which gets fixed when I change the line weight settings. Will I be able to overcome this?
I'm afraid I can't give you a definitive answer. :-|
It's possible to specify a Maximum Width or Height of Drawing in pixels with the “CADSoftTools plugins Manager”, but there's no DPI setting.
AutoCadConverter
Posts: 8
Joined: Tue Oct 20, 2015 11:25 am

Re: Conversion tif, dwg dgn to pdf

Post by AutoCadConverter »

XnTriq wrote:
AutoCadConverter wrote:I just read the other posts and saw that we have to pay 10Euros. I am fine with that but can you please tell me if :

The DWG files will be converted to PDF like for like. A0 size to A0 size pdf , A3 to A3 and so on.
Some of my DWG files are really old and when converting there usually is a line problem, which gets fixed when I change the line weight settings. Will I be able to overcome this?
I'm afraid I can't give you a definitive answer. :-|
It's possible to specify a Maximum Width or Height of Drawing in pixels with the “CADSoftTools plugins Manager”, but there's no DPI setting.

Thank again for your help. It has been very valuable.

Could you please answer another question for me:
This is in regard to Tiff to PDF

If I want my PDF to have these settings:
Navigation Tab: Page only
Page Layout: Single Page
Magnification: Fit Page

How can I pass these parameters in my nconvert command?

At the moment the command -
nconver -c 1 -out pdf *.tif
achieves Navigation Tab: Page only, but how do I achieve the other settings?

Thanks again!
User avatar
XnTriq
Moderator & Librarian
Posts: 6386
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Conversion tif, dwg dgn to pdf

Post by XnTriq »

AutoCadConverter wrote:If I want my PDF to have these settings:
Navigation Tab: Page only
Page Layout: Single Page
Magnification: Fit Page

How can I pass these parameters in my nconvert command?
As of now, XnView and NConvert don't have options for setting the viewer preferences of PDF documents.
I've been using BeCyPDFMetaEdit (freeware) in the past for post-processing XnView's output. “As an alternative to the dialog-based user interface, the tool supports operating in batch mode (for usage in batch files or links).”
I don't have any hands-on experience with the Reformat function of PlotSoft's free PDFill PDF Tools which depend on Adobe Reader and GhostScript.
AutoCadConverter
Posts: 8
Joined: Tue Oct 20, 2015 11:25 am

Re: Conversion tif, dwg dgn to pdf

Post by AutoCadConverter »

XnTriq wrote:
AutoCadConverter wrote:If I want my PDF to have these settings:
Navigation Tab: Page only
Page Layout: Single Page
Magnification: Fit Page

How can I pass these parameters in my nconvert command?
As of now, XnView and NConvert don't have options for setting the viewer preferences of PDF documents.
I've been using BeCyPDFMetaEdit (freeware) in the past for post-processing XnView's output. “As an alternative to the dialog-based user interface, the tool supports operating in batch mode (for usage in batch files or links).”
I don't have any hands-on experience with the Reformat function of PlotSoft's free PDFill PDF Tools which depend on Adobe Reader and GhostScript.
Thank you once again. You have been very kind and helpful!
User avatar
XnTriq
Moderator & Librarian
Posts: 6386
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Conversion tif, dwg dgn to pdf

Post by XnTriq »

AutoCadConverter wrote:Thank you once again. You have been very kind and helpful!
You're welcome :-)
AutoCadConverter
Posts: 8
Joined: Tue Oct 20, 2015 11:25 am

Re: Conversion tif, dwg dgn to pdf

Post by AutoCadConverter »

XnTriq wrote:
AutoCadConverter wrote:Thank you once again. You have been very kind and helpful!
You're welcome :-)
Can I please ask a last question:

If I want my output folder to be provided in the parameter

nconvert -c 1 -out pdf *.tif

Where do I place this parameter so that all my output goes to another folder?
User avatar
XnTriq
Moderator & Librarian
Posts: 6386
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Conversion tif, dwg dgn to pdf

Post by XnTriq »

AutoCadConverter wrote:Where do I place this parameter so that all my output goes to another folder?

Code: Select all

nconvert -c 1 -out pdf C:\Source\*.tif -o C:\Destination\%.pdf
Is that correct, cday?
XnTriq ([url=http://newsgroup.xnview.com/viewtopic.php?f=57&t=31734&p=126190#p126190]Choose File Location When Converting Image Size[/url]) wrote:
Mango Juice ([url=http://newsgroup.xnview.com/viewtopic.php?p=60592#p60592]bugs and suggestions for NConvert[/url]) wrote:
mrQQ wrote:and second, it would be really great to have an option to specify output path..
mrQQ: try using the -o parameter!

so: -o c:\downloads\filename.jpg
or: -o c:\downloads\%.jpg - if you're doing multiple files - % will become the source file name minus extension

Remember to use %% if you're running it out of a batch file.