Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Importing PDF file

146 views
Skip to first unread message

San

unread,
Apr 18, 2004, 10:00:52 AM4/18/04
to corel.graphic_apps.draw-script

Hi, to all
Does anyone tried to import PDF file in Coreldraw 11 through VBA.
I need to import lot of PDF files through VBA.
I have written following VBA code, but neither it imports the file nor
displays any error message.
Please help me to solve the prob.

'*********************
Sub ImportPDF()
Dim fltr As ImportFilter
Dim sOptn As New StructImportOptions

sOptn.MaintainLayers = True

Set fltr =
ActiveDocument.ActivePage.ActiveLayer.ImportEx("C:\MyPdf.pdf", cdrPDF,
sOptn)
fltr.Finish
End Sub
'*********************

Thanks in advance.

Peter Clifton

unread,
Apr 24, 2004, 7:26:44 AM4/24/04
to corel.graphic_apps.draw-script

San spoke unto the group and said...

>
> Hi, to all
> Does anyone tried to import PDF file in Coreldraw 11 through VBA.
> I need to import lot of PDF files through VBA.
> I have written following VBA code, but neither it imports the file nor
> displays any error message.
> Please help me to solve the prob.
>
Not sure about the extended options, but this code snippet appears to
work

Sub Test()
Dim d As Document
Dim I As ImportFilter
Set d = CreateDocument
Set I = d.ActiveLayer.ImportEx("d:\test.pdf", cdrPDF)
I.Reset
I.Finish
End Sub

HTH

Peter

San

unread,
Apr 24, 2004, 2:45:38 PM4/24/04
to corel.graphic_apps.draw-script

Thanks Peter,

Your soluting is working fine but only with single page PDF documents.

In my case each PDF file has 4 pages.
When we normaly import a PDF file with more than 1 page CorelDraw displays a
dialog to
select pages to Import. Probabely this dialog is causing problem. If we
could able to
provide it the page number to import, it may work.
Any suggestions..


San

unread,
Apr 24, 2004, 3:29:53 PM4/24/04
to corel.graphic_apps.draw-script

I have solved the prob.

Thanks

Steven E. Eyrse

unread,
Apr 26, 2004, 12:13:57 AM4/26/04
to

what was the solution ?
Steve E


On Sun, 25 Apr 2004 00:59:53 +0530, "San" <gupta...@hotmail.com>
wrote:

Sean

unread,
Apr 26, 2004, 9:26:23 AM4/26/04
to corel.graphic_apps.draw-script

So what was your solution. I would like to know the solution for this as
well.

--
______________________________
Thank you, Sean
Artist/Production Manager
Please visit us at www.oatesflag.com
502-267-8200
502-267-8246 fax
"San" <gupta...@hotmail.com> wrote in message news:408abd38_3@cnews...

San

unread,
Apr 25, 2004, 5:08:40 PM4/25/04
to corel.graphic_apps.draw-script


> So what was your solution. I would like to know the solution for this as
> well.
>

Actually i have figured out that it was the problem with the PDF files. Each
file has only one page but it displays 4 pages in import dialog. Thats why
coreldraw is facing problem. These PDF files are exported from Mathematica.
I have just patched PDF files and now CorelDraw feels happy.


0 new messages