Two Pilots™    Home  |  Navigation  |  Site Map  |  Products  |  Download  |  Prices  |  For Partners  |  Support


All forums · Statistics · Search ·

Two Pilots forum / For software developers / How to automatically save file in a specific dir
Author Message
From japan
# Posted: 28 Feb 2007 06:04


Please help me with this problem :(PDFCreatorPilot 2)

I want PDF file be automatically saved in to a specific folder in websever when ASP page is loaded . How should I code ?
Normaly , a dialog box appears and ask me whenever I want to open or save file .
I dont want that dialog box open , I want PDF files be generated is to a specific folder .
Could you give me a hint .
Thank you so much .

Stanislav
Member
# Posted: 28 Feb 2007 06:15


Hello,

You can specify file location using code like

PDF.Filename = Server.MapPath('some data')

Where "some data" is a string with full path to required PDF file location, this string can be generatd in previous code or function.

Best regards,
Stanislav
Two Pilots
www.colorpilot.com

Phuc
# Posted: 28 Feb 2007 08:19


I created code like

PDF.Filename = "D:Temptest.pdf"

and

PDF.Filename = Server.MapPath("test.pdf")

But not create Test.pdf file

Please help me

Thank you so much !

Phuc
# Posted: 28 Feb 2007 08:21


I created code like

PDF.Filename = "D:Temptest.pdf"

and

PDF.Filename = Server.MapPath("test.pdf")

But not create Test.pdf file

Please help me

Thank you so much !

Stanislav
Member
# Posted: 28 Feb 2007 08:40 · Edited by: Stanislav


Hello,

In first case file cannot be created - usually you have no permissions to write using local filesystem paths, you should use Server.MapPath.

In second case you should get file test.pdf in C:Inetpubwwwrootyour_site.

If you cannot find file in C:Inetpub... , please check you're not using GenerateInMemoryFile property. If you're using GenerateInMemoryFile, file won't be created.

Best regards,
Stanislav
Two Pilots
www.colorpilot.com

Phuc
# Posted: 28 Feb 2007 08:50


If I use PDF.GenerateInMemoryFile = FALSE or delete => error::

Cannot create file test.asp

Stanislav
Member
# Posted: 28 Feb 2007 09:11


Hello,

"Cannot create file test.asp" means that file cannot be created - please check permissions for the ASP process.

Best regards,
Stanislav
Two Pilots
www.colorpilot.com

Phuc
# Posted: 28 Feb 2007 09:17


PDF.GenerateInMemoryFile = TRUE
' start document generation
PDF.BeginDoc

PDF.PDFPAGE_SetActiveFont "Verdana", False, False, False, False, 18, 128
PDF.PDFPAGE_TextOut 250, 50, 0, "test"

PDF.EndDoc

' write the PDF binary image to the Response output stream
response.BinaryWrite PDF.BinaryImage

PDF.Filename = "D: Temp test.pdf"

response.End
' disconnect from library
Set PDF = Nothing
------------------------------------------------------
=> Not create file test.pdf

Stanislav
Member
# Posted: 28 Feb 2007 09:26


Hello,

You can't use GenerateInMemoryFile and Filename together. EndDoc writes file on the disk only if you specify Filename, not GenerateInMemoryFile.

Best regards,
Stanislav
Two Pilots
www.colorpilot.com

Phuc
# Posted: 28 Feb 2007 13:19


Hello,
Thank you for your helping!
I solved my problem based on your helping!
Thank you so much!

Stanislav
Member
# Posted: 28 Feb 2007 13:24


Hello,

Feel free to contact us at any time.

Best regards,
Stanislav
Two Pilots
www.colorpilot.com

Phuc
# Posted: 2 Mar 2007 04:26


Hello,

- How to remove or disable highlight field check when open PDF file

- I can open file and write file PDF together, it's ok?

Thanks.

Stanislav
Member
# Posted: 2 Mar 2007 04:33


Hello,

Sorry, i didn't understand your first question.

About second question - if you want to join two PDF files, this is impossible using current version.

Best regards,
Stanislav
Two Pilots
www.colorpilot.com

Phuc
# Posted: 2 Mar 2007 05:44


Hello

Ok, i solved fitst problem.

Thank you so much.

Phuc
# Posted: 4 Mar 2007 23:14


Hello,

If I use MS GoThic font => file size is too large. Tell me the font name to decrease file size.

Ex:

PDF.PDFPAGE_SetActiveFont "MS PMincho", False, False, False, False, 14, 128
PDF.PDFPAGE_TextOut 70, 70, 0, "光熱費"
=> file size = 44 kb


Thanks.

Stanislav
Member
# Posted: 5 Mar 2007 03:58


Hello,

When you're using Unicode output, font's required glyphs are embedded into PDF, that's because fie size increases.

Best regards,
Stanislav
Two Pilots
www.colorpilot.com

 

 

Powered by miniBB 2.0 RC7 © 2001-2004 Page creation time (sec.): 0.015

 

Page top