Uploading a pdf file - نوشته شده در (1327 Views)
New Member
l2k man
مطلب: 74
74
I couldn't find anything in the forum on this subject.
I have a website built on Snitz 3.4.03 with various mods. One of them allows an upload of a file into a topic. Not sure which one, as it was added years ago. I recently had an issue that we couldn't upload a pdf file, getting Error, Invalid ID. After some investigation I found the file had been generated from an MSWord document using Save As and selecting pdf. However, when I created the pdf using the print function to a pdf printer (Bullzip) the file uploaded correctly. It's not an issue once understood, but not obvious. Comparing file sizes is interesting. The SaveAs is far larger than the Print to pdf file.
 پیش‌فرض مرتب‌سازی برای تاریخ DESC به معنی جدیدترین است  
 تعداد در صفحه 
نوشته شده در
Forum Admin
HuwR
مطلب: 20611
20611
can't think of any reason that the upload would fail TBH, I have never had any issues with save as pdf in word, a pdf is a pdf regardless of what created it. Most upload code relies on the file extension to decide what a file is, since there is little else you can use unless you know the exact format of the files header information, so you could just rename any file to .pdf and it ought to upload it.
نوشته شده در
New Member
l2k man
مطلب: 74
74
Originally posted by HuwR can't think of any reason that the upload would fail TBH, I have never had any issues with save as pdf in word, a pdf is a pdf regardless of what created it. Most upload code relies on the file extension to decide what a file is, since there is little else you can use unless you know the exact format of the files header information, so you could just rename any file to .pdf and it ought to upload it.

Nor could I but the SaveAs pdf is a much larger file
viz:
document.docx 37kb
document-saveas.pdf - 244kb
document-print.pdf - 70kb

It's not a problem as I just print to pdf, then upload.
نوشته شده در
Advanced Member
Carefree
مطلب: 4224
4224
Reason for size disparity is that MS embeds all of their MS Office coding, etc. into the file header. Depending on which upload program you're using, some of them actually check file header locations to determine whether files are legitimate (or possibly infected with virus, etc.).
 
شما باید یک متن وارد کنید