Software Companions Support Forum
Sign up Calendar Latest Topics
 
 
 


Reply
  Author   Comment  
whoit

Registered:
Posts: 8
Reply with quote  #1 
Hi,

I am trying to convert gif files to pdf but I am getting an error from the convert function. The return code is "1 - Unknown Format". I have tried different files and always get this error.

I have looked at the manual and it says that gif files can be processed. Following is the code that I am using:

Dim sc As scConverterLib.Converter
Set sc = New scConverterLib.Converter

sc.SetSerialNumber "serial number"
sc.PDFLargeFormat = 1
sc.PDFWriteFormat = 0
sc.PDFLayers = 1
sc.MonochromeMode = false
sc.convert sInputFile, sOutputFile, "PDFRASTER", 1, 300, 8


I am using VB6 but I have also tried C#.

Q.1 - Can I convert gif files to pdf?
Q.2 - I looked at the sample files provided with the SDK and I was wondering if you had any sample files you can share with us with the extensions (hp, cg4, tg4, 906, 907)?

Thanks,
Mohsin

softcomp

Administrator
Registered:
Posts: 242
Reply with quote  #2 
Hi,

You should be able to convert GIF files to PDF.
Would it be possible to send us a GIF file that fails?

Sample files with the requested extensions will be provided later today.

Regards,
Support
whoit

Registered:
Posts: 8
Reply with quote  #3 

Hi,

I am just using files downloaded from the internet as sample. I have attached a couple of them with this post.

Q - Is there any command that I need to call specifically for gif files other than the ones that I have mentioned?

I am using the latest version of the dll's
scConverter.dll = 4.15.0.117
scrwGif.dll = 10.0.0.11

Please let me know if you need any other information.

Regards,
Mohsin

Attached Images
gif Background.gif (107.81 KB, 2 views)
gif CrabNebula.gif (5.82 MB, 5 views)

softcomp

Administrator
Registered:
Posts: 242
Reply with quote  #4 
Hi,

We will release a new update within a couple of days.
This will fix the GIF conversion error.

-support

whoit

Registered:
Posts: 8
Reply with quote  #5 
Hi,

Can you please also look into the sample files that I asked for?

Regards,
Mohsin
softcomp

Administrator
Registered:
Posts: 242
Reply with quote  #6 
Hi,

We will add demo files here:
https://github.com/SoftwareCompanions/ViewCompanion/tree/master/Demo%20Files

We hope to be able to provide sample files of all the formats you requested, but most of our files are provided by customers and we cannot share those.
 
-support
whoit

Registered:
Posts: 8
Reply with quote  #7 
Hi,

I tried converting the two sample files that you provided to PDFRaster format but i am getting the same error that I get with gif files. Can you please check it out?

Regards.
Mohsin
whoit

Registered:
Posts: 8
Reply with quote  #8 
Hi,

I downloaded the latest version 4.20.0.128 just now and installed and ran the tests on the two sample files plus the gif files that I attached earlier. I am still getting the same error.

Q. Is there a new installer that I can use?
Q. Can you provide me with the sample code that you are using for the conversions?

Regards,
Mohsin
softcomp

Administrator
Registered:
Posts: 242
Reply with quote  #9 
Hi,

This is very strange, we've successfully tried version 4.20 with all the files and the conversion do work.

The test code used in our test is as simple as possible:

HRESULT hr = E_FAIL;
CComPtr<IConverter> pIConverter;
pIConverter.CoCreateInstance( CComBSTR("scConverter.Converter") );
if (pIConverter)
{
hr = pIConverter->raw_Convert( L"D:\\Testfiles\\Demo Files\\PRODUCT.TG4", L"c:\\temp\\PRODUCT.pdf", L"PDF", 1.0, 1, 300 );

hr = pIConverter->raw_Convert( L"D:\\Testfiles\\Demo Files\\STARTREK.HP", L"c:\\temp\\STARTREK.pdf", L"PDF", 1.0, 1, 300 );
}

In both cases a PDF is created successfully (which I also sent by e-mail).

-support



softcomp

Administrator
Registered:
Posts: 242
Reply with quote  #10 
Hi,

I noticed one error in your code:

sc.convert sInputFile, sOutputFile, "PDFRASTER", 1, 300, 8

This gives bits per pixel of 300 (not supported) and dpi of 8.
It should be :

sc.convert sInputFile, sOutputFile, "PDFRASTER", 1, 8, 300

-support
whoit

Registered:
Posts: 8
Reply with quote  #11 
Hi,

The error with Dpi and Bits per pixel is just a typing error when i pasted the code.

The code that you posted is the one that I am using. 

I am using 32 bit version of the library and I have replaced all occurrences of the dll on the system. Uninstalled the old version and installed the new one. All references to scConverter.dll in registry point to the installation directory. I manually registered the dll using regsvr32.

I have two systems that I am running my tests on. System 1 is 32 bit Windows Server 2008 and System 2 is 64 bit Windows Server 2012 R2.

On System 1 i am using VB6. On System 2 i am using C#.

On System 1, Gif, Tg4 and Hp files all fail.

On System 2, Tg4 and Hp files fail but Gif files process. 

Please let me know if you need any other information.

Regards,
Mohsin
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.