|
|
Problem creating PDF, two examples (scaling, footer too large)
Last post 04-29-2008, 1:46 PM by mgs. 25 replies.
-
04-24-2008, 11:00 AM |
-
mgs
-
-
-
Joined on 07-11-2007
-
-
Posts 71
-
-
-
-
Issues: PDFNET-4923
|
Problem creating PDF, two examples (scaling, footer too large)
Attachment: Present (inaccessible)
I just downloaded Aspose.PDF v3.6.2.0 for evaluation. I already own Aspose.Words and use v4.4.2.0. I had several problems creating a good PDF output. Here is what I tried.
With the following code
Dim doc As Aspose.Words.Document = Nothing Dim pdf As Aspose.Pdf.Pdf = Nothing
doc = New Aspose.Words.Document("C:\Temp\Aspose\PDF\test-1.doc") doc.Save("C:\Temp\Aspose\PDF\test-1.xml", Aspose.Words.SaveFormat.AsposePdf) pdf = New Aspose.Pdf.Pdf() pdf.BindXML("C:\Temp\Aspose\PDF\test-1.xml", Nothing) pdf.Save("C:\Temp\Aspose\PDF\test-1.pdf")
doc = New Aspose.Words.Document("C:\Temp\Aspose\PDF\test-2.doc") doc.Save("C:\Temp\Aspose\PDF\test-2.xml", Aspose.Words.SaveFormat.AsposePdf) pdf = New Aspose.Pdf.Pdf() pdf.BindXML("C:\Temp\Aspose\PDF\test-2.xml", Nothing) pdf.Save("C:\Temp\Aspose\PDF\test-2.pdf")
I try to convert two Word documents to PDF files. I attached all files to this post.
The first file test-1.doc only contains some "this is a test" text. It renders some output. However, it is scaled incorrectly. The DOC has a size of 210mm x 297mm, which is the European A4 format. If I open the created PDF in Acrobat Reader, it says that the size is 2100mm x 2970mm. The characters are extremely tiny.
The seconds file test-2.doc is a real world sample. When executing "pdf.save", an error is thrown "footer is to large". The footer is 5 lines long, there is enough space on all sides.
Michael G. Schneider
|
|
-
04-24-2008, 2:00 PM |
-
AdeelTaseer
-
-
-
Joined on 12-15-2006
-
-
Posts 2,437
-
-
-
-
|
Re: Problem creating PDF, two examples (scaling, footer too large)
Hi,
I have tested your files with Aspose.Words 5.1.0.0 and Aspose.Pdf 3.6.2.0 and didn't get any problems. Please update to the latest version of Aspose.Words.
Thanks.
|
|
-
04-24-2008, 2:46 PM |
-
mgs
-
-
-
Joined on 07-11-2007
-
-
Posts 71
-
-
-
-
|
Re: Problem creating PDF, two examples (scaling, footer too large)
Thanks a lot for the answer. I will update the version of Aspose.Words this weekend. I will post the result here.
I also sent to you the XML files that were generated by
|
|
-
04-24-2008, 3:57 PM |
-
AdeelTaseer
-
-
-
Joined on 12-15-2006
-
-
Posts 2,437
-
-
-
-
|
Re: Problem creating PDF, two examples (scaling, footer too large)
Hi,
I had tested the xml files that you provide and was able to reproduce the error with those. Updating Aspose.Words will solve your problems with these files.
Thanks.
|
|
-
04-25-2008, 4:29 AM |
-
mgs
-
-
-
Joined on 07-11-2007
-
-
Posts 71
-
-
-
-
|
Re: Problem creating PDF, two examples (scaling, footer too large)
Hello - It seems as if a non-breaking-space were not supported.
- It seems as if hyphenation were not supported.
- It seems as if in one case a font were not handled correctly (a barcode font).
Is the above possible? Should I look at it more deeply and prepare test cases? Michael G. Schneider
|
|
-
04-25-2008, 6:52 AM |
-
forever
-
-
-
Joined on 05-27-2003
-
-
Posts 7,170
-
-
-
-
|
Re: Problem creating PDF, two examples (scaling, footer too large)
Dear Michael,
Point 1 and 3 should be supported. If it won't work for you please provide the examples that can reproduce this error.
Tommy Wang Lead Developer Aspose Changsha Team About Us Contact Us
|
|
-
04-25-2008, 8:09 AM |
-
mgs
-
-
-
Joined on 07-11-2007
-
-
Posts 71
-
-
-
-
|
Re: Problem creating PDF, two examples (scaling, footer too large)
Attachment: Present (inaccessible)
Hello Tommy,
attached to this post you will find two test cases.
test-1 shows a non-breaking-space which is broken. In front of the word "Loremipsum" there is a non-breaking space.
test-2 shows a barcode, which is not generated to the PDF file. The barcode is in the footer on page 2. I do not know the exact reason. I have seen cases where the barcode can be seen in the PDF, and there have been cases where it cannot be seen in the PDF.
Regarding automatic hyphenation, would you please comment on that. Why isn't it supported? Is this an Aspose.Words issue? Or Aspose.PDF? I think it is important and should be supported by the Aspose.Words/PDF combination.
Michael G. Schneider
|
|
-
04-25-2008, 1:30 PM |
-
AdeelTaseer
-
-
-
Joined on 12-15-2006
-
-
Posts 2,437
-
-
-
-
|
Re: Problem creating PDF, two examples (scaling, footer too large)
|
-
04-25-2008, 2:42 PM |
-
mgs
-
-
-
Joined on 07-11-2007
-
-
Posts 71
-
-
-
-
|
Re: Problem creating PDF, two examples (scaling, footer too large)
Hello Adeel,
thanks a lot for the answer.
Regarding non-breaking-space. So what can we learn from it? Is this a special situation, where a non-breaking-space is handled incorrectly? Or aren't they supported in general?
Regarding the barcode. I think this is not the answer. When evaluating, I tested with several hundred automatically generated files. They were all converted by the same Aspose.Words/PDF code. Some of these made the barcode show in the PDF, some did not. I am sure that if I play with the test document (delete some text, insert some text, move the barcode to another position) it will suddenly work.
Regarding automatic hyphenation. Would you please comment on that.
Thank you.
Michael G. Schneider
|
|
-
04-26-2008, 12:16 AM |
-
mgs
-
-
-
Joined on 07-11-2007
-
-
Posts 71
-
-
-
-
|
Re: Problem creating PDF, two examples (scaling, footer too large)
Attachment: Present (inaccessible)
Hello Adeel,
I did some more tests on the "barcode is not visible" problem.
The given post about embedding fonts was no solution. I tried the code and the results were the same. The barcode still is not inside the PDF.
Next, I played with the DOC. Delete some text, move the barcode around. Then suddenly the barcode appears inside the PDF - without changing anything in the original code.
I send two tests cases. "test-2" is the same file as yesterday. It has a barcode in the footer of page 2, which is not generated into the PDF. "test-1" has been created from "test-2" by copying and then moving some text around. Now the barcode is visible inside the PDF.
Michael G. Schneider
|
|
-
04-27-2008, 8:28 AM |
-
forever
-
-
-
Joined on 05-27-2003
-
-
Posts 7,170
-
-
-
-
|
Re: Problem creating PDF, two examples (scaling, footer too large)
|
-
04-27-2008, 10:05 AM |
-
mgs
-
-
-
Joined on 07-11-2007
-
-
Posts 71
-
-
-
-
|
Re: Problem creating PDF, two examples (scaling, footer too large)
Hello Tommy,
thanks a lot for your offer to look into it. The files are on their way.
Michel G. Schneider
|
|
-
04-27-2008, 7:09 PM |
-
forever
-
-
-
Joined on 05-27-2003
-
-
Posts 7,170
-
-
-
-
|
Re: Problem creating PDF, two examples (scaling, footer too large)
Hi Michael,
I have reproduced this error. This bug has been fixed but we have not publish the hotfix. We will provide a beta version to you before we publishing the hotfix.
Let me explain font embedding. If the font is not embedded, the barcode can be displayed well only when the font is installed well in your system. If you embed the font as Adeel said, the barcode can be displayed well without the font being installed.
Tommy Wang Lead Developer Aspose Changsha Team About Us Contact Us
|
|
-
04-28-2008, 12:38 AM |
-
mgs
-
-
-
Joined on 07-11-2007
-
-
Posts 71
-
-
-
-
|
Re: Problem creating PDF, two examples (scaling, footer too large)
Hello Tommy, thanks a lot for the answer. Sorry, I do not understand the "font embedding" issue at all. I see the following... - there is a file test-2.doc with a barcode in the footer of page 2
- when creating a PDF from test-2.doc, the barcode will not show
- I then copy test-2.doc to test-1.doc
- then in test-1.doc I delete some text and move the barcode characters to page 1
- when creating a PDF from test-1.doc, now the barcode will show
What do you mean by "font is not installed well on your system"? I am sure, it is installed well. But even it were not installed well, it would not make a difference for test-1.doc and test-2.doc. The barcode would not show up in both test cases. Moreover, I tried the suggestion about font embedding that Adeel gave to me. It was about running through the document and setting a IsUnicode property to True. This made no difference. Even with this code the barcode would not be shown with test-2.doc. I really appreciated a statement about non-breaking-space and automatic hyphenation. Would you please comment on that. Thank you very much. Michael G. Schneider
|
|
-
04-28-2008, 3:35 AM |
-
forever
-
-
-
Joined on 05-27-2003
-
-
Posts 7,170
-
-
-
-
|
Re: Problem creating PDF, two examples (scaling, footer too large)
Dear Michael,
Sorry for not making it clear. In fact it is a bug of Aspose.Pdf that the barcode is not displayed in your PDF. This bug has nothing to do with font embedding and embedding font can't resolve your problem. Now we have fixed that bug. With the new version of Aspose.Pdf, the barcode in the PDF can be displayed well. But if your customers have not installed the barcode font you used, they can't see the Barcode in the PDF. However, if you embedding the font into the PDF, your customer can view the barcode without installing the font.
Tommy Wang Lead Developer Aspose Changsha Team About Us Contact Us
|
|
Page 1 of 2 (26 items)
1
|
|