Hi I'm, in need of sending multiple Legal size Word documents to a single PDF. I have purchased Amyuni 3.0, developer edition and have read numerous posts along with the Common Driver Interface 300 doc. I'll get to the point. No matter what I try I can't get the PDF to capture and display the entire legal size document. I've tried everything from PaperSize = 5 to PaperSize = 256 with the correcsponding settings such as PaperWidth and PaperHeight. No matter, it always displays as 8 1/2 by 11. Originally, Word would give me an "outside the margins" error. After looking at the post by mike1174 from Nov 8 2005, I copied some of that code and now I no longer get the error, but it still prints 8 1/2 by 11. As is common, I have a tight deadline and I really need a hand. Any advice would be appreciated. Here is the basic code I've tried which does not give the Word error, but also does not send the complete document to PDF. Thanks in advance
Private Sub Command2_Click()
Dim appWD As Object
Dim pdf As Object
Dim PDFPrinter$
Dim doc As Object
PDFPrinter = "My PDF Converter"
Set pdf = CreateObject("CDIntfEx.CDIntfEx")
Set appWD = Nothing
Set appWD = CreateObject("Word.application.8")
Set doc = appWD.Documents.Open(FileName:="C:\Amyuni Test Program\Test BEO File.doc")
' Printer initialization
pdf.PDFDriverInit (PDFPrinter)
pdf.EnablePrinter strLicenseTo, strActivationCode
' ***** Printing a Word document to PDF *****
' Set file name options
pdf.FileNameOptionsEx = 1 + 2
pdf.PaperSize = 5
pdf.SetDefaultConfig
pdf.DefaultFileName = "c:\amyuni test program\test.pdf"
' Enable the printer before each printout
pdf.EnablePrinter strLicenseTo, strActivationCode
doc.Application.ActivePrinter = PDFPrinter
' Print the Word document (concatenated to the first pdf file)
doc.PrintOut Background:=False
' Reset 0ptions to zero
pdf.FileNameOptions = 0
pdf.DriverEnd
Set pdf = Nothing
Set doc = Nothing
appWD.quit
Set appWD = Nothing
End Sub
VB6 - Word - Legal Size Issues
Re: VB6 - Word - Legal Size Issues
Hello,
What is the page setting of the original Word document?
I tried to print a legal word document to the PDF Printer and whether i set the printer page settings to legal or not i get a legal size PDF file 8.5 x 14 inches.
I made my test using the UI of the PDF Printer and not programatically. I used version 3.03 of the PDF Converter
What is the page setting of the original Word document?
I tried to print a legal word document to the PDF Printer and whether i set the printer page settings to legal or not i get a legal size PDF file 8.5 x 14 inches.
I made my test using the UI of the PDF Printer and not programatically. I used version 3.03 of the PDF Converter
Custom Brand the Amyuni PDF Printer Driver http://www.amyuni.com/en/developer/branding/index.html
Amyuni PDF Converter tested for true PDF performance. View results - http://www.amyuni.com/benchmark
Amyuni PDF Converter tested for true PDF performance. View results - http://www.amyuni.com/benchmark
Re: VB6 - Word - Legal Size Issues
The page in Word is set to legal. I'm not going to be able to use the UI as this must be a batch process done programmatically. Thanks for your response though. ![Smile :)](./images/smilies/icon_smile.gif)
![Smile :)](./images/smilies/icon_smile.gif)
Re: VB6 - Word - Legal Size Issues
Hello
1) Can you try the latest 3.03 that is available on our site?
2) Try setting the printer margins to zero when printing e.g.
' Printer initialization
pdf.PDFDriverInit (PDFPrinter)
pdf.EnablePrinter strLicenseTo, strActivationCode
' ***** Printing a Word document to PDF *****
pdf.VerticalMargin = 0
pdf.HorizontalMargin = 0
pdf.PaperSize = 5
pdf.SetDefaultConfig
pdf.DefaultFileName = "c:\amyuni test program\test.pdf"
' Set file name options
pdf.FileNameOptionsEx = 1 + 2
' Enable the printer before each printout
pdf.EnablePrinter strLicenseTo, strActivationCode
Hope that helps
David
1) Can you try the latest 3.03 that is available on our site?
2) Try setting the printer margins to zero when printing e.g.
' Printer initialization
pdf.PDFDriverInit (PDFPrinter)
pdf.EnablePrinter strLicenseTo, strActivationCode
' ***** Printing a Word document to PDF *****
pdf.VerticalMargin = 0
pdf.HorizontalMargin = 0
pdf.PaperSize = 5
pdf.SetDefaultConfig
pdf.DefaultFileName = "c:\amyuni test program\test.pdf"
' Set file name options
pdf.FileNameOptionsEx = 1 + 2
' Enable the printer before each printout
pdf.EnablePrinter strLicenseTo, strActivationCode
Hope that helps
David
Amyuni Custom Development
Do you need a specific PDF solution? Are you looking for expertise that will enable you to start or complete a PDF integration project?
http://www.amyuni.com/en/company/services.php
Do you need a specific PDF solution? Are you looking for expertise that will enable you to start or complete a PDF integration project?
http://www.amyuni.com/en/company/services.php
Re: VB6 - Word - Legal Size Issues
I just purchased it a couple of days ago. I checked cdintf.dll and it says 3.0.3. Isn't this the most recent? I did try your idea about the margins to no avail. Thanks for the reply.