PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Fri Nov 01, 2024 12:07 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Draw Image
PostPosted: Fri Feb 11, 2011 1:19 pm 
Offline

Joined: Tue Jan 18, 2011 1:05 pm
Posts: 3
Hi

I am having some issues with the pdfsharp graphics.drawimage command.

I have a barcode component that generates a Windows Metafile format image.

I tried using it with PDFSharp and got a "Format not supported" error.

So I added the following lines of code to get around it:

Dim ABCBarcode As New AbcnetLib.Abcnet
ABCBarcode.Caption = CStr(mdstPrintDetails.Tables(0).Rows(mintRowPoint).Item("BARCODE1"))
ABCBarcode.SerialNo = "6LDR1Q4QVZS2C??"
ABCBarcode.CodeType = AbcnetLib.Abcnet.bCode.Code_128
Dim picPicture As New PictureBox
picPicture.SizeMode = PictureBoxSizeMode.Zoom

picPicture.Image = Bitmap.FromStream(ABCBarcode.sBarcode(600, 600, System.Drawing.Imaging.ImageFormat.Bmp, 1))

(ABCBarcode.sBarcode(int hDpi, int vDpi) generates an image scaled to be suitable for printing on a device with horizontal and vertical resolutions of hDpi and vDpi dots per inch respectively. )



This works fine as long as there are not too many pages in the document I am trying to generate. But whenever my document gets above approx 25 pages I start getting some very strange errors e.g. Unspecified GDI+ error or "Parameter is missing"

The exact same code copes with up to 20 pages perfectly (although it is quite slow to run)

Any assistance gratefully accepted!

Roy


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 43 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group