Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Monday, June 5, 2006 3:37:01 AM(UTC)

PV2006  
PV2006

Groups: Registered
Posts: 17


I am using an evaluation version of Vector Imaging Pro from LEADTOOLS.

I would like to save a drawing file in vector format as a .pdf file. Its giving an "ERROR_FEATURE_NOT_SUPPORTED" error. Could someone help me with this please?

Thank you.

**************************************************************

Dim nRet As Integer

nRet = LEADVector1.Save("d:\testing.pdf", FILE_RAS_PDF)

If (nRet <> 0) Then

MsgBox "Cannot save file!"

End If

 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Monday, June 5, 2006 5:56:31 AM(UTC)

Bashar  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

The vector control cannot save as PDF.  You will need to use the
raster control to load the vector file and save it as PDF.  Please
refer to the Main COM help file for code samples.  Refer to the
Load and Save methods.  The help file is LTCOMN.CHM in the "...\LEADTOOLS 14.5\Help" folder on your machine.

 
#3 Posted : Monday, June 5, 2006 6:05:35 AM(UTC)

PV2006  
PV2006

Groups: Registered
Posts: 17


Does it mean I will not be able to convert a vector format file to a pdf using vector imaging pro? I read the following statement regarding this product in componentsource website and I thought it may support saving as pdf file. Is there any alternate way to perform this task? please suggest.

"With LEADTOOLS, vector images can also be converted and saved as any of the over 120 raster image and sub file formats supported by LEAD."

Thank you.

 
#4 Posted : Monday, June 5, 2006 6:18:02 AM(UTC)

Bashar  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

Yes, you can do that.  The raster COM objects can load vector
image and reasterize them in memory.  You can then save them to
any of the supported raster formats including raster PDF.  You
will need the Vector Imaging Pro toolkit to load vector file in the raster COM objects.

 
#5 Posted : Monday, June 5, 2006 7:32:42 AM(UTC)

PV2006  
PV2006

Groups: Registered
Posts: 17


Thank you for your quick response.

Our basic requirement is to view hpgl and other drawing files, scale them, rotate them etc. So, we are thinking of purchasing the Vector Imaging Pro.

The additional requirement is to open an hpgl file, mark it as 'ABCD' and save it as .pdf inorder for easy distribution to the other users.

Could you please suggest which product is ideal for these functionalities?

 

 
#6 Posted : Monday, June 5, 2006 10:48:11 PM(UTC)

Bashar  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

You will need Vector Imaging Pro for all the functionalities you
described, plus the PDF plug-in for PDF support (i.e. two
products).  The Vector Pro product has two engines: the vector
engine, and the raster engine.  If you want to manipulate
individual objects in vector files, you will need to use the vector
engine (i.e. LEADVector1 as in your first post).  On the other
hand, if you want to convert vector files to raster images, then you
will need to use the raster engine.  Since you are using VB, the
most appropriate programming interface is the COM objects.  With
the COM objects, use the LEADRasterIO.Load method to load a vector file, then call LEADRasterIO.Save to save it as PDF.

Will this information help?

 
#7 Posted : Tuesday, June 6, 2006 3:53:28 AM(UTC)

PV2006  
PV2006

Groups: Registered
Posts: 17


That was of great help.

I was trying to load a Vector object into RasterIO inorder to save it as a Raster object. But the following method needs a Raster object again. I checked if LEADRasterView1 has any load method that access Vector object, but couldn't find any. Could you please help me with this?

RasterIO.Load LEADRasterView1.Raster, "v:\images\arcade.bmp", 0, 0, 1

Thank you.

 
#8 Posted : Tuesday, June 6, 2006 4:43:05 AM(UTC)

PV2006  
PV2006

Groups: Registered
Posts: 17


    I could load a dxf file and save it as pdf, but the image in the pdf was cutoff.
   
    nRet = RasterIO.Load(RasterObj, "c:\random.dxf", 0, 1, 1)
    If (nRet <> 0) Then      MsgBox "Cannot Load file!"

    nRet = RasterIO.Save(RasterObj, "c:\random.pdf", FILE_RAS_PDF, 0, 0, SAVE_OVERWRITE)
    If (nRet <> 0) Then        MsgBox "Cannot save file!"

Now, if I have to add layers(for Marking) and save as pdf, I would like to load the dxf vector file from LeadVector1 object istead of a file from hard drive. I could think of
    - add layer to the vector
    - save vector to harddrive
    - load vector file into rasterobj like in the sample code
    - save it as pdf.
   
    But is there any simple way to do this?   

 
#9 Posted : Wednesday, June 7, 2006 3:13:23 AM(UTC)

PV2006  
PV2006

Groups: Registered
Posts: 17


"plus the PDF plug-in for PDF support "

Bashar, Do I really need this plug-in to save a file as pdf? I have a trial version of it installed on my machine. but I haven't referenced the dlls anywhere in my code project.

 
#10 Posted : Wednesday, June 7, 2006 4:44:22 AM(UTC)

Bashar  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

If you load the DXF file with the Main Raster API demo "...\Bin\demo32.exe", is it cut off as well?


If you want to manipulate the vector image in the vector control first,
then you can use the LEADVector1.Realize method to rasterize the vector image and draw it onto the bitmap property of the raster object.

Ragarding the PDF plug-in, yes you will need it to load/save PDF files.  Please visit

http://www.leadtools.com...ter/Raster-Addon-PDF.htm

to see what options we provide for this plug-in.
 
#11 Posted : Wednesday, June 7, 2006 5:30:21 AM(UTC)

PV2006  
PV2006

Groups: Registered
Posts: 17


If you load the DXF file with the Main Raster API demo "...\Bin\demo32.exe", is it cut off as well?

No, its showing up properly there. May be I will have to check my code that loads the dxf into Raster object.

If you want to manipulate the vector image in the vector control first, then you can use the LEADVector1.Realize method to rasterize the vector image and draw it onto the bitmap property of the raster object.

Thank you for this suggestion. I will try doing it.

Ragarding the PDF plug-in, yes you will need it to load/save PDF files.

My question here is, I was able to save stamped vector image  to a PDF without using any of the PDF plug-in referenced in my VB project. I need only the following function which is available in RasterIO. Isn't this sufficient? Do I still need to purchase a PDF Plug-in software? Please suggest.

nRet = RasterIO.Save(RasterObj, "D:\Test\MarkupTest_Stamped.pdf", FILE_RAS_PDF, 0, QFACTOR_ABCQ_ENHANCE, SAVE_OVERWRITE)

Thank you.

 
#12 Posted : Wednesday, June 7, 2006 7:35:36 AM(UTC)

Bashar  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

Yes, you still need the PDF plug-in.  The eval setup has all
products and modules of LEADTOOLS enabled.  This is why it works
for you.  If you purchase Vector Pro alone, PDF support will be locked.  You will need to purchase the plug-in to unlock it.

You do not need to explicitly reference any files for PDF support.  The Load method loads the necessary DLLs dynamically.

 
#13 Posted : Wednesday, June 7, 2006 7:43:10 AM(UTC)

PV2006  
PV2006

Groups: Registered
Posts: 17


"The eval setup has all products and modules of LEADTOOLS enabled"
 
 Thank you very much for your response.
 hmm.. I hope the following lines of code are not specific to Raster Imaging Pro. I assume these are part of Raster Engine that exists in Vector Imaging Pro. Could you please confirm?
 
 *************************************
   Dim RasterIO As LEADRasterIO
   Dim RasterObj As LEADRaster
  
    Set RasterIO = CreateObject("LEADRasterIO.LEADRasterIO" + ".140")
    RasterIO.EnableMethodErrors = False
    Set RasterObj = CreateObject("LEADRaster.LEADRaster" + ".140")
 
    nRet = LEADVector1.Load("D:\Test\MarkupTest.plt")
   
    AddVecLayer
 
    LEADVector1.ApplyTransformation
    LEADVector1.Save "D:\Test\MarkupTest_Stamped.plt", FILE_PLT
    LEADVector1.Free
   
     ' Set viewport mode to L2D_USE_WIDTH_HEIGHT
     RasterIO.RasterizeViewMode = L2D_USE_WIDTH_HEIGHT
     RasterIO.RasterizeViewportWidth = 1700
     RasterIO.RasterizeViewportHeight = 1700
    
     nRet = RasterIO.Load(RasterObj, "D:\Test\MarkupTest_Stamped.plt", 0, 1, 1)
     If (nRet <> 0) Then MsgBox nRet & "::" & "Cannot Load marked file!"
    
     nRet = RasterIO.Save(RasterObj, "D:\Test\MarkupTest_Stamped.pdf", FILE_RAS_PDF, 0, QFACTOR_ABCQ_ENHANCE, SAVE_OVERWRITE)
 
#14 Posted : Thursday, June 8, 2006 12:43:01 AM(UTC)

Bashar  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

Raster Pro is a subset of Vector Pro, so everything in the former is
also available in the latter.  Therefore, the code able will work under Vector Imaging Pro (and the PDF plug-in).

 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.125 seconds.