Bitmaps

The PDF Creator enables you to create secure PDF documents and to view, print and process existing PDF documents.
If you have any questions about the installation and usage of the PDF Creator please post them here.
Post Reply
jggori
Posts: 10
Joined: Wed Oct 18 2006

Bitmaps

Post by jggori »

Is there anything that needs to be done differently to load a bitmap into a pdf versus a jpeg. It appears a Jpeg will load, but not a bitmap?

I do the following
Create
Set the filename
Set the Coordinates

if i do this with a jpeg BITMAPDATA has data,
if i Do this with a bitmap Nothing in BitmapData?

Sample code follows

oDest = CREATEOBJECT("PDFCreactiveX.PDFCreactiveX.3")
oDest.SetLicenseKey(CompanyName,ActivationCode)
oDest.InitBlank()
*oDest.DoCommandTool(acCommandToolPageView)
oDest.CurrentPage = 1
oDest.CreateObject(acObjectTypePicture,"Pic0")
lcFileName = ADDBS(SYS(5)+SYS(2003))+"joe.jpg"
oDest.ObjectAttributeStr("Pic0","FileName",lcFilename)
oDest.ObjectAttributeStr("Pic0","Top","1000")
oDest.ObjectAttributeStr("Pic0","Left","1000")
oDest.ObjectAttributeStr("Pic0","Right",ALLTRIM(STR(oDest.PageWidth)))
oDest.ObjectAttributeStr("Pic0","Left",ALLTRIM(STR(oDest.PageLength)))
oDest.RedrawObject("Pic0")
oPic = oDest.GetObjectByName("Pic0")
oPic.Refresh()
* Set the document in Run mode
* NEVER CHANGE THE MODE USING .ReportState = acReportStateRun
oDest.DoCommandTool(acCommandToolRunDocument)
oDest.Save("test2.pdf",acFileSaveView)
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan »

Hello,

inserting a picture whether it is a jpeg or bitmap is simlar.

Please check the following links
http://www.amyuni.com/forum/viewtopic.p ... ght=bitmap
http://www.amyuni.com/forum/viewtopic.p ... ght=bitmap

Hope this helps.
jggori
Posts: 10
Joined: Wed Oct 18 2006

Post by jggori »

:) My mistake, the Bitmap was corrupt. Another question with respect to bitmaps, what does the pallete object look like in the bitmap.
Post Reply