JPEG Converter

These different converters modules enables you to convert your existin documents to the above formats. These are all parts of our Document Converter produt.
Here you can post all the installation and usage issues related to the document converters including our latest DOCX Converter
Post Reply
karri72
Posts: 2
Joined: Mon Jul 05 2004

JPEG Converter

Post by karri72 »

I am working with demo JPEG converter 2.1 i,
The output file does not me show any image,
My option settings are
cdiPDF.FileNameOptionsEx = 1 + 2 + 60000 + 10000000 ' NoPrompt + UseFileName + High quality JPeg compression of 24-bit images; this is equivalent to level 9 in the user interface + Export to JPEG

cdiPDF.PaperSize = 9 ' set default paper size to A4
cdiPDF.Orientation = 1 ' set paper orientation to Landscape
cdiPDF.Resolution = 600 ' set output resolution to 600 DPI
cdiPDF.JPEGCompression = True ' activate JPeg image compression
cdiPDF.JPegLevel = 3 ' activate high compression to reduce file size
cdiPDF.ImageOptions = 2 ' downsampling adjusts the image to output resolution
ccdiPDF.SetDefaultConfig ' make value default for all apllications

can anybody help really apreciated

Thanks in advance
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan »

Hello,

I am not sure why you are setting Jpeg compression and Jpeg level both in CDIntf and in the driver (by using cdiPDF), please set these in one place only.

Also please convert the Hexadecimal values in your call to FileNameOptionsEx to Decimal values and use them instead.

Hope this helps.
karri72
Posts: 2
Joined: Mon Jul 05 2004

Post by karri72 »

Thank you for your reply, I have changed the setting that you suggested but still same problem. it will generate the output file but there was no picture in side. if objserve the properties resolution,bit depth and other becomes empty

I am giving the whole code below, please suggest me what's wrong.

----------------

Private Function PrintToJPEG()
Dim cdiJpeg As Object, objWord As Object
Dim strFileName As String, strPrinterName As String
Dim strLicensee As String, strLicCode As String

strFileName = "C:\Temp\TestingJpeg.doc"
strPrinterName = "Amyuni Document Converter"
strLicensee = "Converter Evaluation Developer"
strLicCode = "07EFCDAB010001005508708341FA27688B4677FD9F0949D06B3E571BA69FAED5D5C39249776339468C6EA491C4EE6A623009DBB774A2FE1156D8FB96104CA5A98A09553A526E0BD5D52E18005B567947D12396CEE8582B247059535C597904B32F14CD1245B1"

Set cdiJpeg = CreateObject("CDIntfEx.CDIntfEx")

cdiJpeg.PDFDriverInit (strPrinterName)
cdiJpeg.PrinterLanguage = 1 'English
cdiJpeg.EnablePrinter strLicensee, strLicCode
cdiJpeg.FileNameOptionsEx = &H1 + &H2 + &HEA60 + &H989680 ' 1 + 2 + 60000 + 10000000 ' NoPrompt + UseFileName + High quality JPeg compression of 24-bit images; this is equivalent to level 9 in the user interface + Export to JPEG
cdiJpeg.PaperSize = 9 ' set default paper size to A4
cdiJpeg.Orientation = 1 ' set paper orientation to Landscape
cdiJpeg.Resolution = 600 ' set output resolution to 600 DPI
cdiJpeg.ImageOptions = 2 ' downsampling adjusts the image to output resolution
cdiJpeg.SetDefaultConfig ' make value default for all apllications
cdiJpeg.DefaultFileName = Replace(strFileName, "doc", "jpg", , , vbTextCompare) ' set output file name

Set objWord = CreateObject("Word.Application")

objWord.Visible = True
objWord.Documents.Open strFileName, False, False
objWord.ActivePrinter = strPrinterName
objWord.PrintOut
objWord.Quit False
Set objWord = Nothing

cdiJpeg.RestoreDefaultPrinter
cdiJpeg.DriverEnd
Set cdiJpeg = Nothing
End Function
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan »

Hello,

Please try to call:
cdiPDF.FileNameOptionsEx = 1 + 2 + 268435456
Or
cdiPDF.FileNameOptionsEx= 1 + 2 + 393216 + 268435456

This should help, if not you may send me your sample Word document and the output pdf and jpeg files to forum@amyuni.com so I can check these closer.

Thanks.
Post Reply