PDF does not create in Windows 8 Developer Preview

The Amyuni PDF Converter is our Printer Driver that enables you to convert any documents to PDF format. If you have any questions about installing and using the Amyuni PDF Converter please post them here.
Post Reply
DamianPM
Posts: 13
Joined: Thu May 07 2009

PDF does not create in Windows 8 Developer Preview

Post by DamianPM »

Hi,

We are currently using the Amyuni PDF converter 2.51 to print word documents to PDF.
This works well with Windows XP, 7, 2003 Server, 2008 Server.
In order for us to get ready with Windows 8, while testing our products for the compatibility we noticed that PDFs does not create with the Windows 8 Developer Preview.

OS used - Windows 8 Developer Preview 32 bit
MSOffice used – MS Office 2010
Programming language used - VFP9
Error description – PDF file gets created with 0 bytes.

Tried the following but it did not help to solve the problem.
=> Change the port assigned to the PDF printer to a local port, LPT1:, COM1, NUL:, to a newly created local port.
=> Tested with the latest trial version downloaded from the Amyuni website, 4.5.2.7

Following is a sample code we use which worked in previous version of Windows,
Please let know what can we can try further or any workaround.


#DEFINE pdf_AmyuniLicenseCompany "Amyuni PDF Converter Evaluation"
#DEFINE pdf_AmyuniLicenseCode "07EFCDAB0100010025AFF1806CB8441306C5739F7DC52654D393BA9CECBA2ADE79E3762A64FFC3540A8A5F4A5811BE3204A0A439F5BA"

*oPDFPrinter = CREATEOBJECT("CDINTFEX.CDINTFEX") && for Amyuni 2.50
oPDFPrinter = CREATEOBJECT("CDIntfEx.CDIntfEx.4.5") && for Amyuni 4.5

** Windows Default Printer and VFP printer is set to the PDF printer
oPDFPrinter.DriverInit("PDFPrinter")
oPDFPrinter.DefaultFileName = SYS(5) + ADDBS(SYS(2003)) + "Output.pdf"
oPDFPrinter.FileNameOptions = 1 + 2

oWord = CREATEOBJECT("Word.Application")
oWord.Documents.Open(SYS(5)+CURDIR()+"Print.doc",,.T.)
oWord.ActivePrinter = "PDFPrinter"

oPDFPrinter.EnablePrinter(pdf_AmyuniLicenseCompany, pdf_AmyuniLicenseCode)

oWord.ActiveDocument.PrintOut() && Output.pdf gets created with 0 bytes
oWord.Quit()
Rich
Posts: 76
Joined: Thu Jun 16 2011

Re: PDF does not create in Windows 8 Developer Preview

Post by Rich »

Ensure that under Printer properties | Advance tab of the Amyuni PDF Converter that the Print directly to the printer is selected. We have tested internally an install and normal testing under Windows 8 with good results. When Microsoft makes available the WHQL testing for Windows 8 http://msdn.microsoft.com/en-us/library ... e/hh833793 we will be getting the Amyuni PDF Converter certified for that version as well. Also, since version 2.5 the PDF Converter should be assigned to the NUL: port for 64-bit PC's.

ps. the Developer's Edition should not be used to print to PDF from Microsoft Office products. http://amyuni.com/en/developer/devlicense/
Efficient and accurate conversion to PDF, XPS, PDF/A and more. Free trials at - http://www.amyuni.com
DamianPM
Posts: 13
Joined: Thu May 07 2009

Re: PDF does not create in Windows 8 Developer Preview

Post by DamianPM »

Hi,

Tried with Amyuni PDF converter 4.5.2.7, with the option "Print directly to the printer" selected.
Tried with Windows 8 Release Preview(Build 8400).
Changed the PDF printer port to NUL: and other local ports.

But still the PDF did not get created successfully. Created PDF file size is 0 bytes.
Also noticed that once the PrintOut() command is issued, the print job gets stuck in the PDF printer queue right throughout.

Note that MS Word 2010 is installed on Windows 8, which openes the document file for printing.
Is there anything else that can be tried out? Please help.
Rich
Posts: 76
Joined: Thu Jun 16 2011

Re: PDF does not create in Windows 8 Developer Preview

Post by Rich »

You can trial the Desktop Edition (4.5.2.7) by following this link: http://amyuni.com/en/enduser/pdfconverterend/download.
Simply open up Word and select File | Print and select the Amyuni PDF Converter, you should be prompted for a file name and destination folder. What we have seen also is the File name/Destination folder dialogue box that pops up gets hidden behind Word.

* open up the print queue and pause printing before you do File | Print - do you get a pdf in queue?
* within you application can you print to a hardware printer with the scenario that you described earlier?
Efficient and accurate conversion to PDF, XPS, PDF/A and more. Free trials at - http://www.amyuni.com
DamianPM
Posts: 13
Joined: Thu May 07 2009

Re: PDF does not create in Windows 8 Developer Preview

Post by DamianPM »

Hi,

As requested, the following was tried by it did not succeed.
Windows 8 Release Preview build 8400 was used with MS Word 2010 x32.

=> Downloaded and installed the trial the Desktop Edition (4.5.2.7) of the PDF converter given by the link.
=> Opened a document(doc, docx) from MS Word and printed to the Amyuni PDF printer, the dialog box from MS word appeared to enter a file name and the path of the PDF.
=> Once print job went into the print queue, it gave an error in the print queue(Error printing). At this time the PDF printer port was automatically set to LPT1: when it was installed.
=> Changed the port to nul: and tried again, the print job goes to the queue and goes off without any error, but the PDF file gets created by 0 bytes and cannot be opened with a PDF reader(Adobe Acrobat).

When printing from MS Word selected the "Microsoft Document XPS writer" printer an OXPS file was created.
Selected "Send to onenote 2010" printer and a file gets created.
These created files has a file size and can be opened.

Opened Note Pad and printed a text file to the above PDF converter and the PDF gets created.
From the VFP also this works fine with ShellExecute.
Printing VFP reports to the PDF printer also works fine and the PDFs can be opened with a PDF reader.

There seems to be something to do with MS Word 2010(may be other 2010 products as well, such as Excel, ect...) and the PDF Converter, where it does not create the PDF when printed through MS Word.

Please let us know what can be checked further or any workaround to solve the problem.
DamianPM
Posts: 13
Joined: Thu May 07 2009

Re: PDF does not create in Windows 8 Developer Preview

Post by DamianPM »

Hi,

Can someone please advice if it is possible to print a doc or docx file into PDF with the code sample as mentioned above, using the PDF converter with Office 2010 on Windows 8?
Printing Text Files with ShellExecute and Visual FoxPro reports into PDF using the PDF converter works fine.

Your help is appreciated.
Rich
Posts: 76
Joined: Thu Jun 16 2011

Re: PDF does not create in Windows 8 Developer Preview

Post by Rich »

Under the Printer properties | Advanced tab can you ensure that the "Print directly to the printer" is selected and try your test again. The PC that you installed Windows 8 RP is a 64-bit PC? Our software should detect the bitness and assign the printer to the correct port: 32-bit = LPT1 and 64-BIT either creates the NUL: port or assigns the PDF printer to the NUL: port if it exists.
Efficient and accurate conversion to PDF, XPS, PDF/A and more. Free trials at - http://www.amyuni.com
DamianPM
Posts: 13
Joined: Thu May 07 2009

Re: PDF does not create in Windows 8 Developer Preview

Post by DamianPM »

"Print directly to the printer" option is selected and this is Windows 8(32bit).

My question is this forks fine in [Windows 7(32bit), Office 2010(32bit)] and [Windows 7(64bit), Office 2010(64bit)] also, then what has happend in Windows 8, Office 2010?
DamianPM
Posts: 13
Joined: Thu May 07 2009

Re: PDF does not create in Windows 8 Developer Preview

Post by DamianPM »

Printed the document with PrintToFile parameter in PrintOut() function.
I changed

Code: Select all

oWord.ActiveDocument.PrintOut()
to

Code: Select all

oWord.ActiveDocument.PrintOut(.F. , , ,<targetPDFFileName>, , , , , , , .T.)
Then it worked.
Post Reply