Image displayed as BLACK box - PDF - XSL:FO
Reported by
raijitha...@gmail.com,
Feb 14 2017
|
|||||||
Issue description
UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36
Steps to reproduce the problem:
1. Created PDF using xsl:fo
2. All images displayed on PDF as black box
3. Issue only in chrome browser, all other (IE,FF,Safari) works fine
What is the expected behavior?
Images should display as they are exist.
What went wrong?
Hello Team,
We have created a PDF using xsl:fo(ibex).
In the PDF all content displayed fine except the images.
All image displayed as black box like attached screen shot.
We have used below line of code to show image on the PDF file.
<fo:block>
<fo:external-graphic xsl:use-attribute-sets="img" src="url({$url}/images/logo.jpg)"/>
</fo:block>
With same code image displayed correctly in all other browser like (IE,FF,Safri etc....)
For you information, before last update in chrome the PDF was working fine, but now a time we got the issue.
Also when we save(from chrome) the PDF file and open in any browser or PDF reader image displayed correctly.
My current version of chrome is
"Version 56.0.2924.87 (64-bit)"
Got the same issue in 32 bit also.
I have try so much with changing content type also
<fo:external-graphic content-width="60%" content-height="60%" content-type="content-type:image/jpg">
Please help me to fix the issue.
Did this work before? Yes
Does this work in other browsers? N/A
Chrome version: 56.0.2924.87 Channel: stable
OS Version: 10.0
Flash Version: Shockwave Flash 24.0 r0
,
Feb 15 2017
@raijithakor679-- Could you please provide us the sample test case to reproduce the issue or the pdf in which you have used the code snippet given in comment #0 ,that would help us in traiging the issue better. Thanks!
,
Mar 7 2017
Hello, I am having a similar issue in that all of our PDFs in all environments using Chrome show black boxes for images. using asp.net, c#, and XSL:FO with ibex. The FO code is similar to comment 0. I have tried with multiple image formats with no luck. This issue exists in our production environment and users are having issues opening existing documents when using Chrome. This was working before, but unsure of how long ago. I cannot provide exact code, but I can provide the attached sample PDF of the issue. In the attached pdf, when opened in IE, FF, Edge, and Adobe it displays an image to the left of the THIS IS A TEST text. In Chrome, it doesnt show anything where the image is. When downloaded and viewed through chrome, it shows up with a black box. If I download the file with Chrome and open it in another browser/Adobe, it shows the image. Sample XSL:FO code: <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format"> <xsl:template match="/"> <fo:root> <fo:layout-master-set> <fo:simple-page-master master-name="StdPageFirst"> <fo:region-before extent="4cm" region-name="Header"/> <fo:region-body page-height="28cm" page-width="21.5cm" margin-top="4.25cm" margin-bottom="1cm" margin-left=".50cm" margin-right=".50cm"/> <fo:region-after extent="1.25cm" region-name="Footer"/> </fo:simple-page-master> <fo:simple-page-master master-name="StdPageOther"> <fo:region-before extent="4cm" region-name="Header"/> <fo:region-body page-height="28cm" page-width="21.5cm" margin-top="4.25cm" margin-bottom="1cm" margin-left=".50cm" margin-right=".50cm"/> <fo:region-after extent="1.25cm" region-name="Footer"/> </fo:simple-page-master> <fo:simple-page-master master-name="PortraitLayout" page-height="11in" page-width="8.5in" margin-top=".2in" margin-bottom=".25in"> <fo:region-before extent=".8in" region-name="Header" margin-left=".5in" margin-right=".5in"/> <fo:region-body margin-left=".5in" margin-right=".5in" margin-top=".8in" margin-bottom=".35in"/> <fo:region-after extent=".35in" region-name="Footer"/> </fo:simple-page-master> <fo:simple-page-master master-name="LandscapeLayout" page-height="8.5in" page-width="11in" margin-top=".2in" margin-bottom=".25in"> <fo:region-before extent=".8in" region-name="Header" margin-left=".5in" margin-right=".5in"/> <fo:region-body margin-left=".5in" margin-right=".5in" margin-top=".8in" margin-bottom=".35in"/> <fo:region-after extent=".35in" region-name="Footer"/> </fo:simple-page-master> <fo:simple-page-master master-name="PlainPortrait" page-height="11in" page-width="8.5in" margin-top=".2cm" margin-bottom=".2cm" margin-left=".15in" margin-right=".15in"> <fo:region-body/> </fo:simple-page-master> <fo:page-sequence-master master-name="StdPage"> <fo:repeatable-page-master-alternatives> <fo:conditional-page-master-reference master-reference="StdPageFirst" page-position="first"/> <fo:conditional-page-master-reference master-reference="StdPageOther" page-position="rest"/> <fo:conditional-page-master-reference master-reference="StdPageOther" page-position="last"/> </fo:repeatable-page-master-alternatives> </fo:page-sequence-master> </fo:layout-master-set> <fo:page-sequence master-reference="PortraitLayout"> <fo:flow flow-name="xsl-region-body"> <xsl:call-template name="PaymentAgreement"/> </fo:flow> </fo:page-sequence> </fo:root> </xsl:template> <xsl:template name="PaymentAgreement"> <fo:wrapper font-family="Times New Roman" font-size="12pt"> <fo:block text-align="center" font-size="14pt"> <fo:external-graphic content-width="24%"> <xsl:attribute name="src"> C:\Test.png </xsl:attribute> </fo:external-graphic> THIS IS A TEST. </fo:block> </fo:wrapper> </xsl:template> </xsl:stylesheet> Sample Create code: // do the transform to FO var foStream = CreateFO(doc, xslCompiledTransform); Generator.setRuntimeKey("RUNTIME KEY"); var ibex = new FODocument(); ibex.Settings.DefaultFontFamily = "Times New Roman"; // create the Pdf var pdfStream = new MemoryStream(); foStream.Seek(0, SeekOrigin.Begin); ibex.generate(foStream, pdfStream, false); foStream.Close(); foStream.Dispose(); return pdfStream; Please note: This affects existing documents that cannot be changed. We have a workaround using PDFTron, but need it to work for existing documents. Thanks!
,
Mar 13 2017
Regarding comment #3, I can reproduce but I'm unsure if it's the same bug as the initial (no image as opposed to black box). Some questions: Did this work before? What Chrome version are you using?
,
Mar 13 2017
@comment 4, Yes, This was working before. I am unsure of which version it stopped working in. It first got reported to us in Nov 2016. Current version of chrome: 56.0.2924.87 As for the black box, I cant seem to reproduce it consistently (black box vs no image). Note that I am getting both Black Boxes and No Image, depending on which PDF file I look at in our system. I am not sure if they are the same Issue or separate. I will Update with attached PDF and sample code when I am able to get the black box.
,
Mar 14 2017
I have managed to reproduce the issue. It seems to be specific to the image used. Replacing Test Image with the header we used for for documents, I was able to get the black box. Attached is a document that has 2 images in it; one appears with a black box the other appears blank.
,
Mar 14 2017
Thanks! hdodda@ this is marked as a regression, can we get a bisect? Or otherwise confirmation of this not being a regression.
,
Mar 15 2017
I haven't checked if the original bug reporter's problem and the problem with the PDF in comment 6 are the same. For the one in comment 6, it was broken in Chromium 47 as well, so that's not a recent regression.
,
Mar 15 2017
The comment 6 issue may be related to https://bugs.chromium.org/p/pdfium/issues/detail?id=675 (restricted due to personal info being accidentally posted) but it's the same symptom and both PDFs have images with color profiles.
,
Mar 16 2017
Tested on mac os 10.12.2 , ubuntu 14.04 and windows 7 & 10 using M57 #57.0.2987.98 and M59 #59.0.3042.0 and issue is reproduced. Issue is seen from M40 #40.0.2172.0 and is a non-regression issue. Attached screencast for reference. Thanks!
,
Mar 16 2017
Leroy's problem is the same as pdfium 675. I'll have that fixed shortly. We still need a sample from the original bug reporter to see if the original bug is the same as Leroy's.
,
Mar 16 2017
Leroy: Did you create "DisplayReport (2).pdf" ? If yes, can we add it to one of our test suites to ensure it renders correctly in the future?
,
Mar 16 2017
I face the issue same as leroy.eb...@gmail.com as well used same coding style to generate PDF. We face the issue since last 1 year , before that we had not such issue. So please have a look at it and let me know if any chnages required in coding to solve the issue. Thanks Raiji Thakor
,
Mar 16 2017
@Comment12, Yes, I created the "DisplayReport (2).pdf". Yes, that is fine to add it to a test suite. There is not any information on the PDF that is not public info. Thanks, -LeRoy
,
Mar 16 2017
Raiji, if you have a sample PDF we can test, I can confirm for certain it's the same issue. Otherwise please wait a bit and we'll have this fixed in Chrome 59 soon.
,
Mar 17 2017
The following revision refers to this bug: https://pdfium.googlesource.com/pdfium/+/ac6e2a059dbd74f6f9f1c216600496cfa5676387 commit ac6e2a059dbd74f6f9f1c216600496cfa5676387 Author: Lei Zhang <thestig@chromium.org> Date: Fri Mar 17 22:11:51 2017 Bring CPDF_ICCBasedCS closer to PDF spec. The spec says the N dictionary field is required and must be set to a valid value. Adjust the code based on this assertion. BUG=pdfium:675, chromium:691967 , chromium:702238 Change-Id: Iaa76fa0e16ce4aaa9822ad471668cbf8af5fb7cb Reviewed-on: https://pdfium-review.googlesource.com/3112 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org> [modify] https://crrev.com/ac6e2a059dbd74f6f9f1c216600496cfa5676387/core/fpdfapi/page/cpdf_colorspace.cpp [modify] https://crrev.com/ac6e2a059dbd74f6f9f1c216600496cfa5676387/core/fpdfapi/page/pageint.h [modify] https://crrev.com/ac6e2a059dbd74f6f9f1c216600496cfa5676387/core/fpdfapi/page/fpdf_page_colors.cpp
,
Mar 17 2017
Issue pdfium:675 has been merged into this issue.
,
Mar 17 2017
,
Mar 18 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/3a77757bbeed5a9f744f68982fe6911c79227925 commit 3a77757bbeed5a9f744f68982fe6911c79227925 Author: pdfium-deps-roller <pdfium-deps-roller@chromium.org> Date: Sat Mar 18 02:36:56 2017 Roll src/third_party/pdfium/ 7630907c7..85f019a8e (5 commits) https://pdfium.googlesource.com/pdfium.git/+log/7630907c7ecb..85f019a8e7d3 $ git log 7630907c7..85f019a8e --date=short --no-merges --format='%ad %ae %s' 2017-03-17 thestig Add pdfium::clamp() as a placeholder for std::clamp(). 2017-03-17 thestig Use std::vector in CPDF_StreamContentParser. 2017-03-17 thestig Bring CPDF_ICCBasedCS closer to PDF spec. 2017-03-17 tsepez Replace CLines class with std::vector<Cline>. 2017-03-17 npm HardClip points a bit better in fx_agg_driver Created with: roll-dep src/third_party/pdfium BUG= 691967 , 702238 , 699982 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+/master/autoroll/README.md If the roll is causing failures, see: http://www.chromium.org/developers/tree-sheriffs/sheriff-details-chromium#TOC-Failures-due-to-DEPS-rolls TBR=dsinclair@chromium.org Review-Url: https://codereview.chromium.org/2756303003 Cr-Commit-Position: refs/heads/master@{#457932} [modify] https://crrev.com/3a77757bbeed5a9f744f68982fe6911c79227925/DEPS
,
Mar 21 2017
Verified the issue on Mac os 10.12.3 , ubuntu 14.04 and win 7 using chrome M59 #59.0.3047.0 and issue is fixed. Images are displayed correctly in pdf. Attached screenshot for reference. Adding TE-verified labels. Thanks!
,
Mar 31 2017
The following revision refers to this bug: https://pdfium.googlesource.com/pdfium_tests/+/97859592483784e59741c1a93014366ea973da3e commit 97859592483784e59741c1a93014366ea973da3e Author: Lei Zhang <thestig@chromium.org> Date: Fri Mar 31 01:31:17 2017 Add user provided test case for colorspaces. BUG= chromium:691967 Change-Id: Ic0d89ee82c6d148442f96ec586d726e058808c6c Reviewed-on: https://pdfium-review.googlesource.com/3115 Reviewed-by: dsinclair <dsinclair@chromium.org> [add] https://crrev.com/97859592483784e59741c1a93014366ea973da3e/pdfium/bug_691967.pdf [add] https://crrev.com/97859592483784e59741c1a93014366ea973da3e/pdfium/bug_691967_expected.pdf.0.png
,
Mar 31 2017
The following revision refers to this bug: https://pdfium.googlesource.com/pdfium/+/d4ba0f7866026869136952185d2fb70592e6be2f commit d4ba0f7866026869136952185d2fb70592e6be2f Author: Lei Zhang <thestig@chromium.org> Date: Fri Mar 31 02:10:16 2017 Roll DEPS for testing corpus to 9785959. Add user provided test case for colorspaces. BUG= chromium:691967 TBR=dsinclair@chromium.org Change-Id: I8131a591ab24ca7217fee09879e623fc21bb1667 Reviewed-on: https://pdfium-review.googlesource.com/3471 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> [modify] https://crrev.com/d4ba0f7866026869136952185d2fb70592e6be2f/DEPS
,
Mar 31 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/0d65c79254abc0ca2cad40bc495d7f92ca1f0b9c commit 0d65c79254abc0ca2cad40bc495d7f92ca1f0b9c Author: pdfium-deps-roller <pdfium-deps-roller@chromium.org> Date: Fri Mar 31 04:12:55 2017 Roll src/third_party/pdfium/ 3efc06752..d4ba0f786 (2 commits) https://pdfium.googlesource.com/pdfium.git/+log/3efc06752c56..d4ba0f786602 $ git log 3efc06752..d4ba0f786 --date=short --no-merges --format='%ad %ae %s' 2017-03-30 thestig Roll DEPS for testing corpus to 9785959. 2017-03-30 thomasanderson Revert "Remove download_binaries.py from DEPS" Created with: roll-dep src/third_party/pdfium BUG= 691967 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+/master/autoroll/README.md If the roll is causing failures, see: http://www.chromium.org/developers/tree-sheriffs/sheriff-details-chromium#TOC-Failures-due-to-DEPS-rolls TBR=dsinclair@chromium.org Review-Url: https://codereview.chromium.org/2789793002 Cr-Commit-Position: refs/heads/master@{#461022} [modify] https://crrev.com/0d65c79254abc0ca2cad40bc495d7f92ca1f0b9c/DEPS |
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by nyerramilli@google.com
, Feb 14 2017