PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WEBDEV 2024 → PDF File Generation and Print
PDF File Generation and Print
Iniciado por Tony G, 15,dic. 2014 13:01 - 2 respuestas
Publicado el 15,diciembre 2014 - 13:01
Hello

Im using Webdev 18

Trying to generate a PDF to a subdirectory of the data directory - and then print it

All works well on the development PC, but not on the production server (IIS 7.5 on Win2008 server)

I have tried giving the world permission to the folder, with no joy.

I anyone could point my in the right direction to be able to create the .pdf in the folder I would be very grateful

Thank you



PROCEDURE PrintOrderConfirmation()

sFileName is string = fDataDir() + "\Upload\" + gnOrderNo + ".pdf"

iInitReportQuery(RPT_OrderConfirmation,gnOrderNo)

iDestination(iGenericPDF,sFileName)

iPrintReport(RPT_OrderConfirmation)

FileDisplay(sFileName)


the error is
What happened?
Unable to open <C:\WEBDEV Hosting\WEBDEV_USER1\data\weborder\Upload\24.pdf> file.

Error code: 0
Level: fatal error (EL_FATAL)

System error code: 2
System error message:
The system cannot find the file specified.

Dump of the error of 'WD180Session.exe' module (18.0.108.0).
Debugging information:
##(IXStream)-Handle=<FFFFFFFF>##
Additional Information:
EIT_SRCFILE : <C:\WEBDEV Hosting\WEBDEV_USER1\data\weborder\Upload\24.pdf>

(25, ERR_MSG_BOX)

The system cannot find the file specified. (2)




Publicado el 15,diciembre 2014 - 14:50
Hi Tony

By design, the data dir is not the right place to do that... Try instead
into a subdir of fwebdir

Best regards

--
Fabrice Harari
International WinDev, WebDev and WinDev mobile Consulting

NEW: WXReplication, your open source replication system is available on
my web site!!!
WXShowroom.com: Show your projects!
More information on http://www.fabriceharari.com

On 12/15/2014 7:01 AM, Tony G wrote:
Hello

Im using Webdev 18

Trying to generate a PDF to a subdirectory of the data directory - and
then print it
All works well on the development PC, but not on the production server
(IIS 7.5 on Win2008 server)

I have tried giving the world permission to the folder, with no joy.

I anyone could point my in the right direction to be able to create the
.pdf in the folder I would be very grateful

Thank you



PROCEDURE PrintOrderConfirmation()

sFileName is string = fDataDir() + "\Upload\" + gnOrderNo + ".pdf"

iInitReportQuery(RPT_OrderConfirmation,gnOrderNo)

iDestination(iGenericPDF,sFileName)

iPrintReport(RPT_OrderConfirmation)

FileDisplay(sFileName)


the error is
What happened?
Unable to open <C:\WEBDEV
Hosting\WEBDEV_USER1\data\weborder\Upload\24.pdf> file.

Error code: 0
Level: fatal error (EL_FATAL)

System error code: 2
System error message:
The system cannot find the file specified.

Dump of the error of 'WD180Session.exe' module (18.0.108.0).
Debugging information:
##(IXStream)-Handle=<FFFFFFFF>##
Additional Information:
EIT_SRCFILE : <C:\WEBDEV Hosting\WEBDEV_USER1\data\weborder\Upload\24.pdf>

(25, ERR_MSG_BOX)

The system cannot find the file specified. (2)





Publicado el 15,diciembre 2014 - 15:24
Hi

Thank you I have changed to fwebdir

But there's some 'silly' file permission - and I just carnt see it. If you could shed some light on my ignorance

The crazy thing is I've done this before and its worked....

Thanks

sFileName is string = fWebDir() + "\" + gnOrderNo + ".pdf"
OutputFile is string = gnOrderNo + ".pdf"

iInitReportQuery(RPT_OrderConfirmation,gnOrderNo)

iDestination(iGenericPDF,sFilename)

iPrintReport(RPT_OrderConfirmation)

FileDisplay(sFileName, "application/pdf",OutputFile)

and go this .........

What happened?
Unable to open <C:\WEBDEV Hosting\WEBDEV_USER1\sites\weborder\WEBORDER_WEB\24.pdf> file.

Error code: 0
Level: fatal error (EL_FATAL)

System error code: 2
System error message:
The system cannot find the file specified.

Dump of the error of 'WD180Session.exe' module (18.0.108.0).
Debugging information:
##(IXStream)-Handle=<FFFFFFFF>##
Additional Information:
EIT_SRCFILE : <C:\WEBDEV Hosting\WEBDEV_USER1\sites\weborder\WEBORDER_WEB\24.pdf>

(25, ERR_MSG_BOX)