Click here to Skip to main content
15,881,139 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
C#
//HtmlToPdf("http://localhost:32370/User/PerformancePDF.aspx", "D:\\New1.pdf");

when i use above .. simple folder directiory , its saving however when i use below nothing gets saved in the directory 

            HtmlToPdf("http://localhost:32370/User/PerformancePDF.aspx", "D:\\Projects\\Actus 6.9 Dev\\ActusAppraisalSystem\\ExportToPDFDocuments\\41\\120\\Objective\\objectives.pdf");
Posted
Comments
Any exceptions?
Torakami 17-Oct-14 14:38pm    
no dude .. there are no such exceptions ..

when i use simply D drive to save ..it gets saved , but not with other folder structure directiry ..

I was trying to create directory and tried to give that path as well ...but that didnt even worked out this
Might be a permission issue. Does that method log exceptions?
Torakami 10-Nov-14 1:01am    
hey man , thanks for your reply .. but i found the reason for this .. wkhtmltopdf doesnt take space between the folder names .. so was the issue
Okay. Cool. Please add one detailed explanation of the solution in the answer box.

1 solution

When we give the path to wkhtmltopdf , where pdf file should be generated after processing

C#
HtmlToPdf("http://localhost:32370/User/PerformancePDF.aspx", "D:\\Projects\\Actus 6.9 Dev\\ActusAppraisalSystem\\ExportToPDFDocuments\\41\\120\\Objective\\objectives.pdf");

This is my path as given below :-

D:\\Projects\\Actus 6.9 Dev\\ActusAppraisalSystem\\ExportToPDFDocuments\\41\\120\\Objective\\objectives.pdf"

Now here if you c , The folders i am choosing to save contain spaces in between

Actus 6.9

wkhtmltopdf doesnt take the space and dont process the generated the file into that location , and also dont even through the error .. its a bug into wkhtmltopdf ..

after reading so much .. i came to know the conclusion that if i remove spces from the folder name Actus 6.9 to Actus6.9 .. Now it detacts the proper location and saves the appropriate file
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900